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
Ollama tag discovery is implemented inline in rooms/ollama_preflight.py. PR #44 and issue #30 add a second urlopen + JSON parse path in settings.py. Tag matching rules (name vs model, :latest) should live in one place.
Proposed Solution
Add e.g. rooms/ollama_client.py (or extend ollama_preflight.py) with:
Problem Statement
Ollama tag discovery is implemented inline in
rooms/ollama_preflight.py. PR #44 and issue #30 add a secondurlopen+ JSON parse path insettings.py. Tag matching rules (namevsmodel,:latest) should live in one place.Proposed Solution
Add e.g.
rooms/ollama_client.py(or extendollama_preflight.py) with:fetch_ollama_tags(base_url, timeout=3.0) -> list[str]tag_is_available(configured_tag, available_tags) -> boolRefactor
run_ollama_preflight()to use the helper.When feat: support ollama.auto_select_first model resolution #44/Implement ollama.auto_select_first from settings #30 land,
resolve_ollama_model()uses the same helper.Unit tests for tag matching edge cases (exact,
:latest, empty list, unreachable server).Acceptance criteria
/api/tagsfetch and tag normalizationAlternatives Considered
Priority
Medium 🟡
Additional Context
No response