Skip to content

Task 158 follow-up: centralize LiteLLM provider metadata for UX hints #348

@spinje

Description

@spinje

Context

Phase A now advertises LiteLLM's broader provider support, but provider-specific UX helpers still only know the core providers in a few places.

Problems

  • _derive_env_var_for_model() currently maps Anthropic/OpenAI/Gemini, so non-core provider errors may suggest a generic or wrong env var.
  • Provider/model detection logic is duplicated across llm_client.py, llm_reasoning_map.py, and exceptions.py.
  • Docs mention providers such as OpenRouter, Ollama, Mistral, Bedrock, Azure, and Vertex, but error hints do not consistently reflect those names.

Scope

  • Create a small provider metadata/helper layer for common LiteLLM provider prefixes.
  • Use it for env-var suggestions and model-family predicates where appropriate.
  • Keep the first pass boring: cover documented/common providers; fall back gracefully for unknown prefixes.

Candidate providers

OpenRouter, Mistral, Cohere, Bedrock/AWS, Azure OpenAI, Vertex/Gemini, Ollama/local providers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions