Repository navigation
fix(auto-combo): skip non-chat models in virtual auto candidate pools - #14584
Merged
diegosouzapw merged 2 commits intoSep 24, 2026
Conversation
The credentialed branch of prepareVirtualAutoComboInputs() adds every synced/custom model id to the auto/* candidate pool without looking at what surface it serves; only no-auth providers are gated (serviceKinds). Image, video, music and TTS models that a provider lists next to its chat models (x.ai /v1/models returns grok-imagine-*, local nodes sync Wan/TTS, suno chirp-*) therefore get scored and dispatched for chat turns and can only fail, burning a fallback hop each time. Skip synced/custom models whose modelType is non-chat or whose supportedEndpoints name no chat-capable surface (chat/responses), and tag x.ai grok-imagine-* during discovery since /v1/models carries no type field.
Collaborator
|
Verified the fix directly — |
diegosouzapw
merged commit Sep 24, 2026
ffa1703
into
cheaper-inference:release/v3.8.51
3 checks passed
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
prepareVirtualAutoComboInputs()only filters non-chat models for no-auth providers (serviceKinds). For credentialed providers it adds every synced/custom id to the candidate pool regardless of surface. A provider whose/v1/modelslists chat and media together — x.ai returnsgrok-imagine-*next togrok-4.x, local nodes syncWan2.2/TTS/STT alongside the chat models — therefore scores and dispatches non-chat ids for chat turns. The result is one wasted fallback hop per request and a noisy pool (auto/codingandauto/smartboth pick these on this install).Fix
isDeclaredNonChatModel()(open-sse/services/autoCombo/virtualFactory.ts) flags a synced or custom entry whosemodelTypeis non-chat or whosesupportedEndpointsname no chat-capable surface (chat/responses). Pool-building drops those ids.grok-imagine-image*assupportedEndpoints: ["images"]andgrok-imagine-video*as["videos"]inproviderModelsConfig.tsso they hit the same filter on the next sync.hasUserModelsis computed before dropping non-chat ids so an image-only sync does not fall back to the static catalog (regression-tested).Relationship to open PRs
supportedEndpointsfield it carries is now actually enforced by the pool.Tests
tests/unit/auto-pool-skip-non-chat-models.test.ts— predicate behaviour, mixed catalog test (chat/responses kept; images/embed/video dropped), image-only sync keeps the static catalog out, and x.ai tagging coversgrok-imagine-image*/grok-imagine-video*.A changelog fragment will follow once the PR number is assigned.