feat(models): route normal to DeepSeek V4 Flash, classifier to gpt-oss-120b - #272
Merged
Conversation
…s-120b Alternative to the GLM base (#268), which regressed: GLM 5.3 Flash via OpenRouter did not emit real tool_calls and was too slow for the 2s classifier timeout. - Make deepseek-v4-flash the first lite entry so normal complexity resolves to it on OpenRouter (falls through to gpt-5.4-mini with no OpenRouter key). It tests clean for tool calling. - Pin the complexity classifier to gpt-oss-120b (cheap, fast, native structured output) via a new catalog.resolved_by_id, decoupled from the base model. Bump AUTO_MODEL_TIMEOUT_SECONDS 2 -> 5 for OpenRouter first-token latency headroom. - gpt-5.5 stays first overall, so the no-tier fallback and the complex/pro default are unchanged (5.5 > 5.4).
gpt-oss is OpenAI-branded but open-weight and multi-provider on OpenRouter, so :nitro routes the classifier to the fastest provider (it isn't single-provider like proprietary openai/* models). Refine the nitro-rule tests to treat gpt-oss as multi-provider so it requires :nitro rather than forbidding it.
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.
What
Alternative to the GLM base in #268, which regressed in testing: GLM 5.3 Flash via OpenRouter did not emit real
tool_calls(the agent hallucinated the whole tool loop as text, so nothing hit the board) and was too slow for the 2s classifier timeout (it took ~2030ms, so the classifier always fell back tomediumand complex routing died).DeepSeek V4 Flash tests clean for tool calling. This routes:
deepseek/deepseek-v4-flash:nitro, OpenRouter) when an OpenRouter key is present; falls through togpt-5.4-miniwith no key.openai/gpt-oss-120b): open-weight, native structured output, ~$0.03/$0.17 per M tokens. Pinned by id so it stays independent of the base model.How
models.yml:deepseek-v4-flashbecomes the firstliteentry (auto base); addgpt-oss-120b(lite, no:nitrosince theopenai/route is single-provider).gpt-5.5stays the first entry overall, so the no-tier fallback and complex default are unchanged (the no-tier-default lesson from feat(models): route normal to GLM 5.3 Flash, complex to gpt-5.4 #268's review).catalog.resolved_by_id(id): resolve a specific model by canonical id.auto_model.py: pin the classifier togpt-oss-120b, falling back to the lite default then any model. BumpAUTO_MODEL_TIMEOUT_SECONDS2 -> 5 for OpenRouter first-token latency headroom.BYOK fallback
DeepSeek and gpt-oss are OpenRouter-only, so with no OpenRouter key the base falls to
gpt-5.4-miniand the classifier to the lite default, both native OpenAI. No one is stranded.Test plan
ruff check topix test/unit: cleanpytest test/unit: 706 passed (addedresolved_by_idtests)Notes