Repository navigation
fix(models): list router-known ids in ocx models
#8187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -94,9 +94,17 @@ function collectModels(config: OcxConfig, providerFilter?: string): ModelEntry[] | |
| // defaultModel first | ||
| if (prov.defaultModel) addModel(prov.defaultModel, true); | ||
|
|
||
| // models array | ||
| if (prov.models) { | ||
| for (const m of prov.models) addModel(m, m === prov.defaultModel); | ||
| // Keep the CLI list current when this config predates a provider's registry seed. | ||
| // knownModelIdsForProvider is the router's own derivation: config models first, then | ||
| // registry seeds, hint-map keys, and live-discovered cache ids (registry-derived | ||
| // sources only enter when the transport guard matches -- a custom endpoint named like | ||
| // a registry provider gets none of them), then customModels. Because hint-map keys | ||
| // are included, wire-only ids a provider's collapsed picker hides still appear here; | ||
| // that is router parity. A model the user pruned from `models` reappears if the | ||
| // registry still seeds it -- the list is a union, not the user's curation. The | ||
| // user's saved models remain first and are never discarded. | ||
| for (const m of [...(prov.models ?? []), ...knownModelIdsForProvider(provName, prov, config)]) { | ||
| addModel(m, m === prov.defaultModel); | ||
|
Comment on lines
+106
to
+107
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| } | ||
| } | ||
|
|
||
|
|
@@ -392,7 +400,7 @@ function handleConfiguredModels(args: string[]): void { | |
| if (wantsJson) { | ||
| console.log(JSON.stringify({ | ||
| models, | ||
| note: "Static config models only. Providers with liveModels=true may have additional models at runtime.", | ||
| note: "Saved config models and router-known models (registry seeds, hint-map keys, and discovered cache ids). Providers with liveModels=true may have additional models at runtime.", | ||
| }, null, 2)); | ||
| return; | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the CLI reference for the expanded list.
docs-site/src/content/docs/reference/cli/providers-accounts.md, Line 1048, still describes only models seeded in configured providers. Document the registry and custom-model union, including that it is not the live catalog. (raw.githubusercontent.com)As per coding guidelines: “Update
docs-site/when the change affects user-visible behavior or configuration.”Source: Coding guidelines