You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fetch models from models_gateway and prefer gateway-served models in picker #1606
area/agentFor work that has to do with the general agent loop/agentic features of the apparea/providersFor features/issues/fixes related to LLM providers (Bedrock, LiteLLM, Qwen, custom, etc.)area/providers/docker-model-runnerDocker Model Runner (DMR) local inferencearea/tuiFor features/issues/fixes related to the TUI
When a models_gateway is configured, cagent currently assumes gateway supports core providers and shows a static list (configured models + models.dev catalog). It does not query the gateway for a live list of models. This causes incorrect/irrelevant models to appear in the model picker.
Proposal
Add gateway model discovery when models_gateway is set: query <gateway>/v1/models (OpenAI-style) or a configurable metadata endpoint and use the returned model list to populate/suppress models in the picker.
Acceptance criteria
When models_gateway is set and /v1/models returns a list, the model picker shows only models served by that gateway (merged with explicitly defined models in config).
Provide an opt-in config flag models_gateway.discover: true/false to control discovery.
Add unit tests and an integration test that mocks gateway responses.
Document behavior in AGENTS.md and README.md.
Notes
If gateway does not support /v1/models, fall back to current behavior.
Consider caching the model list and exposing a refresh button in the TUI.
area/agentFor work that has to do with the general agent loop/agentic features of the apparea/providersFor features/issues/fixes related to LLM providers (Bedrock, LiteLLM, Qwen, custom, etc.)area/providers/docker-model-runnerDocker Model Runner (DMR) local inferencearea/tuiFor features/issues/fixes related to the TUI
Activity
feat(runtime): discover gateway-served models for the model picker