Skip to content

Implement ollama.auto_select_first from settings #30

@rosspeili

Description

@rosspeili

Problem Statement

rooms.settings.example.yaml defines ollama.auto_select_first, and OllamaSettings loads it, but nothing in the codebase reads this flag. Users with many local tags still type or hardcode model strings; beginners may not know which tag to use after ollama pull.

Proposed Solution

  • When ollama.auto_select_first: true and the effective model is an Ollama/LiteLLM local route, query Ollama’s model list (e.g. http://localhost:11434/api/tags or existing LiteLLM/Ollama helper) and use the first available tag if the configured model is missing or set to a sentinel like ollama/auto.
  • Default remains false; built-in default model stays ollama/gemma4:e2b when no file or flag is set.
  • Clear CLI message when Ollama is unreachable: fall back to configured defaults.litellm_model with a warning, do not hang the wizard.
  • Document behavior, limits, and failure modes in docs/ARCHITECTURE.md / docs/EXAMPLES.md.
  • Tests with mocked HTTP (no real Ollama in CI).

Alternatives Considered

  • Always pick first Ollama tag on every run — rejected; breaks users with intentional model pins in YAML.
  • Remove auto_select_first from the schema — rejected; field is already shipped in the example file; better to implement or deprecate explicitly in a separate change.

Priority

Low 🟢

Additional Context

Design needs explicit UX: only runs when enabled in settings, respects defaults.litellm_model as fallback. Consider interaction with future preset wiring (issue: presets in CLI).

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliImprovements to the interactive wizard or terminal output.enhancementNew feature or requesthelp wantedExtra attention is needed
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions