fix(#604): model picker shows all configured providers#1126
Closed
bergeouss wants to merge 1 commit intonesquena:masterfrom
Closed
fix(#604): model picker shows all configured providers#1126bergeouss wants to merge 1 commit intonesquena:masterfrom
bergeouss wants to merge 1 commit intonesquena:masterfrom
Conversation
Two fixes to ensure the model picker surface every provider a user has configured: 1. Added env var detection for XAI_API_KEY (→ x-ai) and MISTRAL_API_KEY (→ mistralai). Previously these providers were only detectable via hermes auth or credential pool, not via environment variables. 2. Added config.yaml providers section scanning. Users who configure providers in config.yaml (e.g. providers.anthropic.api_key) without setting the corresponding env var will now see those providers in the model picker. Only providers with known model catalogs are added. - Added 12 regression tests
Collaborator
Triage Review ✅Clean targeted fix for the provider detection gap in #604. What it does:
Code review:
One note: XAI_API_KEY is added both to the list at line ~1413 and as an explicit Ready to merge. Addresses the core detection gap from #604. |
Collaborator
|
Absorbed and shipped in v0.50.223 (PR #1127). Thanks! |
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.
Summary
Partially addresses #604
Two fixes to ensure the model picker surfaces every provider a user has configured:
1. Env var detection for xAI and Mistral
Added
XAI_API_KEY→x-aiandMISTRAL_API_KEY→mistralaito the env var scanning. Previously these providers were only detectable via hermes auth or credential pool, not via environment variables.2. Config.yaml providers section scanning
Users who configure providers in
config.yaml(e.g.providers.anthropic.api_key) without setting the corresponding env var will now see those providers in the model picker. Only providers with known model catalogs in_PROVIDER_MODELSare added — no phantom entries.Changes
api/config.py: AddedXAI_API_KEY/MISTRAL_API_KEYenv var scanning + config.yamlproviderssection scanning for known providerstests/test_issue604_all_providers_model_picker.py: 12 regression testsNote
The full #604 feature (provider key management from WebUI settings) is a larger effort. This PR addresses the core detection gap.
Testing