Skip to content

epic: dynamic model discovery with per-provider API listing and 1-day cache #991

@bug-ops

Description

@bug-ops

Goal

Replace the static `list_models()` returning only the configured model with a dynamic
`list_models_remote()` async method that queries each provider's API and returns the
full set of available models. Results are cached on disk with a 1-day TTL so repeated
calls are cheap.

Motivation

  • `/model` command and TUI model picker currently show only the single configured model.
  • Users cannot discover what models are available without consulting external docs.
  • Ollama users especially benefit from seeing all locally pulled models.

Scope

Provider Endpoint Auth
Ollama `GET /api/tags` none
Claude `GET https://api.anthropic.com/v1/models\` `x-api-key`
OpenAI `GET https://api.openai.com/v1/models\` Bearer
CompatibleProvider (Gemini, Grok, Groq, vLLM…) `GET {base_url}/models` Bearer
Candle static (loaded model name)

Child Issues

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    epicMilestone-level tracking issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions