Repository navigation
fix(autoRouting): recognize auto/\<family\> combos in classifyAutoModel - #8866
Merged
Conversation
classifyAutoModel() checks VALID_AUTO_VARIANTS and parseAutoSuffix but never isValidModelFamily, so auto/glm, auto/minimax, auto/llama etc. are rejected as "Unknown built-in auto combo" before chatHelpers.ts or builtinCatalog.ts can handle them. Fix: import isValidModelFamily and ModelFamily, add family to spec type, check family suffixes before returning unrecognized. Mirrors the pattern already in builtinCatalog.ts createBuiltinAutoCombo. Closes: auto/\<family\> combos listed in /api/combos/auto but unusable at /v1/chat/completions.
…gment
The PR changed production code with no test — nothing in tests/ referenced
classifyAutoModel. Since it is module-private, the new suite exercises it through
the public resolveAutoRoutingState().
Verified it guards something real: against the release tip without this fix the
family case fails ("auto/glm should be a recognized built-in auto model"), and
passes with it. Also pins that a category suffix does not pick up spec.family and
that an unknown suffix stays unrecognized.
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
diegosouzapw
merged commit Jul 28, 2026
bf77648
into
cheaper-inference:release/v3.8.49
3 checks passed
diegosouzapw
added a commit
that referenced
this pull request
Jul 28, 2026
…redited) Second aggregation pass, for the PRs merged after the main reconciliation: #8860, #8861, #8862, #8863, #8865, #8866. The `### 📝 Maintenance` heading added to the living section in 26a7783 held — [3.8.47] stays at its 234 bullets instead of absorbing this cycle's maintenance entries. Credits attached where the fragment carried the number only in its filename: @HouMinXi (#8860, #8865), @artickc (#8863), @rafaeldrincon (#8866). #8862 already carried its own link and credit. [3.8.49]: 1172 -> 1178 bullets · contributors 155 -> 156 · 42 i18n mirrors synced.
Merged
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…el (cheaper-inference#8866) * fix(autoRouting): recognize auto/\<family\> combos in classifyAutoModel classifyAutoModel() checks VALID_AUTO_VARIANTS and parseAutoSuffix but never isValidModelFamily, so auto/glm, auto/minimax, auto/llama etc. are rejected as "Unknown built-in auto combo" before chatHelpers.ts or builtinCatalog.ts can handle them. Fix: import isValidModelFamily and ModelFamily, add family to spec type, check family suffixes before returning unrecognized. Mirrors the pattern already in builtinCatalog.ts createBuiltinAutoCombo. Closes: auto/\<family\> combos listed in /api/combos/auto but unusable at /v1/chat/completions. * test(autoRouting): cover auto/<family> classification + changelog fragment The PR changed production code with no test — nothing in tests/ referenced classifyAutoModel. Since it is module-private, the new suite exercises it through the public resolveAutoRoutingState(). Verified it guards something real: against the release tip without this fix the family case fails ("auto/glm should be a recognized built-in auto model"), and passes with it. Also pins that a category suffix does not pick up spec.family and that an unknown suffix stays unrecognized. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: rafaeldrincon <rafaeldrincon@users.noreply.github.com> Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…redited) Second aggregation pass, for the PRs merged after the main reconciliation: cheaper-inference#8860, cheaper-inference#8861, cheaper-inference#8862, cheaper-inference#8863, cheaper-inference#8865, cheaper-inference#8866. The `### 📝 Maintenance` heading added to the living section in ae5bf9e held — [3.8.47] stays at its 234 bullets instead of absorbing this cycle's maintenance entries. Credits attached where the fragment carried the number only in its filename: @HouMinXi (cheaper-inference#8860, cheaper-inference#8865), @artickc (cheaper-inference#8863), @rafaeldrincon (cheaper-inference#8866). cheaper-inference#8862 already carried its own link and credit. [3.8.49]: 1172 -> 1178 bullets · contributors 155 -> 156 · 42 i18n mirrors synced.
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.
Problem
auto/glm,auto/minimax,auto/llamaetc. return "Unknown built-in auto combo" at/v1/chat/completionseven though they are listed in/api/combos/autowith valid candidate pools.Root Cause
classifyAutoModel()insrc/sse/handlers/autoRouting.tschecksVALID_AUTO_VARIANTSandparseAutoSuffixbut neverisValidModelFamily. When the suffix is "glm" (not a valid variant, not a category:tier), it setsrecognizedBuiltInAutoto the fallback value andcreateVirtualAutoComboimmediately returns 400.The family combo logic exists in
builtinCatalog.ts(createBuiltinAutoComboalready callsisValidModelFamily) butautoRouting.tsshort-circuits beforechatHelpers.tscan reach it.Fix
isValidModelFamilyandModelFamilyfrommodelFamily.tsfamily?: ModelFamilytoAutoRoutingState.spectypeclassifyAutoModelbefore the fallback returnTested
All work correctly after fix:
auto/glm→ routes to GLM model (5 provider candidates)auto/minimax→ routes to MiniMax model (4 provider candidates)auto/llama→ routes to Llama model (2 provider candidates)auto/coding,auto/best-chat, persisted combos continue working unchanged