Skip to content

/models breaks when one provider returns 500 — need per-provider error resilience #3684

Description

@KooshaPari

ProblemThe /models endpoint (and forge list models) fetches models from all configured providers concurrently. Currently, if any provider returns an error (e.g. 500 from an overloaded or misconfigured endpoint), the entire operation fails — all models become unavailable even if other providers are working fine.This is caused by get_all_provider_models() in crates/forge_app/src/app.rs using collect::<anyhow::Result<Vec<_>>>() which short-circuits on the first error from any provider.## Expected Behavior- Individual provider failures should be logged as warnings.- Models from working providers should still be returned.- Only if every configured provider fails should an error be returned to the caller.## Proposed FixChange the concurrent result collection to separate successes from failures, log each failure via tracing::warn!, and only surface an error when all providers failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions