fix: use live probe + bank merge for Chat UI model list (#282) - #317
Open
404-Page-Found wants to merge 1 commit into
Open
fix: use live probe + bank merge for Chat UI model list (#282)#317404-Page-Found wants to merge 1 commit into
404-Page-Found wants to merge 1 commit into
Conversation
The GET /api/v1/services/models endpoint (used by ChatPage) previously only returned hardcoded bank models. Models added to SiliconCloud after the bank was published (e.g. DeepSeek-V4-Flash) appeared in the Config page but not in the Chat UI. Now uses listModelsForService() which performs a live /models probe merged with bank metadata, matching the Config page behavior.
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.
Fixes #282
Problem
Models added to SiliconCloud after the hardcoded bank was published (e.g. \deepseek-ai/DeepSeek-V4-Flash) appear in the Config page's test connection results but are missing from the Chat UI's model picker, making them impossible to select in conversations.
Root Cause
The \GET /api/v1/services/models\ endpoint (consumed by \ChatPage) only returned hardcoded bank models from \siliconcloud.ts. The Config page uses a separate endpoint (\GET /api/v1/services/:service/models) that performs a live /models\ probe merged with bank metadata.
Fix
Changed \GET /api/v1/services/models\ to use \listModelsForService()\ — the same live probe + bank merge function used by the Config page endpoint. This ensures newly available models are discovered at runtime and displayed in the Chat UI.
Before: \�p.models.filter(enabled).filter(textChat)\ — bank-only, no live discovery
After: \�wait listModelsForService(ep.id, apiKey)\ → \ilterTextChatModels(enriched)\ — live probe + bank merge with 10-min caching
Verification