Skip to content

Free-tier and BYOK model resilience on 404/402 #5676

Description

@mvanhorn

Issue

None.

Version and model info

None.

Problem

Free-tier and BYOK users hit vanishing model IDs and 402/credit errors. Onboarding still pins openrouter/deepseek/deepseek-r1:free. Related issues (#4289, #3264, #3936) show the pain; none implement a live catalog probe + explicit fallback when the selected model hard-fails.

Proposed approach

  1. Centralize failure classification in exceptions.py / models send path.
  2. Add suggest_free_fallback(model) using OpenRouter manager.
  3. Hook from base coder retry path; update onboarding default to "resolve at runtime" rather than a single pinned ID.
  4. Tests with fixtures for 404/402 and catalog stubs.

I'm happy to open a PR implementing this if the direction works for you.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions