Conversation
… family list PR #3327 added dot-separator normalization for custom-provider model IDs but left two model families out of _candidate_supports_reasoning: - GLM (ZAI / Zhipu AI): zai.glm-5, zai.glm-4.7, glm-5, etc. all have reasoning=true in models.dev but the family was never added to the heuristic. - Claude family-before-version naming: claude-opus-4-8, claude-haiku-4-5, anthropic.claude-opus-4-8 use the pattern <family>-<version> rather than claude-3-... / claude-4-..., so the existing startswith("claude-3","claude-4") check misses them. Adds: - glm- prefix check for GLM models - claude- + {3,4} token intersection for the new Claude naming convention - 11 new parametrized test cases (28 total, all pass)
This was referenced Jun 2, 2026
Collaborator
|
Closing as superseded by #3379, shipped in v0.51.211 (Release GE). Thanks @Carry00 — your additions (GLM models + Claude family-before-version naming like |
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
PR #3327 added dot-separator normalization so custom-provider model IDs like
deepseek.v3.2correctly surface the reasoning-effort selector. However, two model families were left out of_candidate_supports_reasoningand remain broken after that fix.GLM (ZAI / Zhipu AI) —
zai.glm-5,zai.glm-4.7,glm-5, etc.All modern GLM generations (4.5+) have
reasoning: truein models.dev, butglmwas never added to the heuristic family list. The dot-stripping from #3327 correctly surfacesglm-5as a candidate — it just has nowhere to match.Claude family-before-version naming —
claude-opus-4-8,claude-haiku-4-5,anthropic.claude-opus-4-8The existing check is
startswith("claude-3", "claude-4"), which matches the oldclaude-3-5-sonnet-...format. The newer naming convention puts the family before the version (claude-opus-4-8), so it starts withclaude-opus, notclaude-4, and silently misses.Changes
api/config.py— two additions to_candidate_supports_reasoning:glm-prefix for the GLM familyclaude-+{3, 4}token intersection for the new Claude naming conventiontests/test_custom_provider_bare_model_reasoning.py— 11 new parametrized cases (28 total, all pass)CHANGELOG.md— user-visible entryVerification
Models now correctly detected (were all
[]before):zai.glm-5[]zai.glm-4.7[]anthropic.claude-opus-4-8[]anthropic.claude-haiku-4-5[]deepseek.v3.2Non-reasoning models unchanged (
meta.llama-3.1-70b,thinkinghub.*→[]).Note on the underlying design
This is a targeted fix but also a band-aid. The heuristic family list (
_candidate_supports_reasoning) will need a new entry every time a provider uses an unfamiliar naming convention — GLM and Claude are the two that surfaced this week, but there will be more.A more durable solution would be to allow per-model capability overrides in the custom provider config, so users (or aggregator presets) can declare
reasoning: truewithout requiring a code change. Happy to prototype that if maintainers think it's worth pursuing — just want to flag the root cause before closing it with another patch.