docs: document OpenRouter model ID invalidation and fallback best practices - #40087
Closed
alaamohanad169-ship-it wants to merge 1 commit into
Closed
docs: document OpenRouter model ID invalidation and fallback best practices#40087alaamohanad169-ship-it wants to merge 1 commit into
alaamohanad169-ship-it wants to merge 1 commit into
Conversation
…ctices Adds a new Known Pitfall entry to AGENTS.md explaining that OpenRouter model IDs (like accounts/fireworks/models/deepseek-v4-pro) can be invalidated by upstream hosting providers without notice. Documents: - How the error classifier already handles this (model_not_found with retryable=False, should_fallback=True) - That _classify_400(), _is_model_not_found_error(), and the conversation_loop fallback mechanism all cover this case - Best practice: configure fallback_providers and pin cron/worker sessions to stable direct-serving endpoints Closes #40066
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new Known Pitfall entry to AGENTS.md documenting the OpenRouter model ID invalidation issue (tracked in #40066).
What's Documented
accounts/fireworks/models/deepseek-v4-pro→ HTTP 400 "is not a valid model ID"model_not_foundwithretryable=False, should_fallback=True_classify_400()catches "is not a valid model" in 400 responses_is_model_not_found_error()covers cron/worker/compression pathsfallback_providers, pin cron to stable direct-serving endpointsVerification
agent/error_classifier.py—_classify_400()line ~984 checks_MODEL_NOT_FOUND_PATTERNSagent/auxiliary_client.py—_is_model_not_found_error()covers same patternsagent/conversation_loop.py— non-retryable client errors route to_try_activate_fallback()Closes #40066