fix: live model discovery for custom providers in /model picker#20763
Closed
hamletmachine wants to merge 1 commit into
Closed
fix: live model discovery for custom providers in /model picker#20763hamletmachine wants to merge 1 commit into
hamletmachine wants to merge 1 commit into
Conversation
Section 4 of list_authenticated_providers() builds the model list for custom_providers entries from the static model: and models: config fields only. This means any custom provider endpoint with multiple models on its /v1/models API shows only the single model configured under the model: field. Section 3 already fetches the live /v1/models list for providers: entries (via fetch_api_models). Add the same live model discovery for custom_providers: entries so the interactive /model picker shows all models the endpoint exposes. - Store api_key in the group dict so the fetch call can access it - Call fetch_api_models() when api_url and api_key are configured - Merge live models with any statically configured models - Graceful fallback to static config on any error (network, auth, timeout) Closes NousResearch#20582
Collaborator
This was referenced May 6, 2026
Contributor
|
Closing as already fixed on Triage notes (high confidence): If you still see this on the latest version, please reopen with reproduction steps. (Bulk-closed during a CLI triage sweep.) |
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
list_authenticated_providers()Section 4 (custom_providers) only reads the staticmodel:andmodels:fields from config.yaml when building the model list for the/modelpicker. Any custom provider hosting multiple models on its/v1/modelsendpoint shows only the single model configured under themodel:field.Section 3 (user-defined
providers:entries) already fetches the live model list viafetch_api_models(). This PR adds the same behavior to Section 4.Changes
api_keyin the group dict so the fetch call can access it/v1/modelsdiscovery for custom provider endpoints whenapi_urlandapi_keyare configuredFix for
Closes #20582
Provider-agnostic
Works for any OpenAI-compatible endpoint that exposes
/v1/models. No provider-specific code.