Skip to content

fix(llm): replace retired ollama_cloud default gemma3:27b with gemma4:31b-cloud#23

Open
yuzushi-dev wants to merge 2 commits into
mainfrom
fix/ollama-cloud-default-model
Open

fix(llm): replace retired ollama_cloud default gemma3:27b with gemma4:31b-cloud#23
yuzushi-dev wants to merge 2 commits into
mainfrom
fix/ollama-cloud-default-model

Conversation

@yuzushi-dev

Copy link
Copy Markdown
Owner

Problem

gemma3:27b was retired upstream on Ollama Cloud — it now returns 410 Gone on every key. It was the ollama_cloud default in both DEFAULT_LLM_MODEL and the model catalog.

Blast radius (verified on prod, read-only)

No active LLM step of the default tenant hits this default today: HyDE, chat.generation and the 10 configured llm_steps all resolve their model via tenant-config overrides (glm-5.2:cloud / per-step models), so the retired constant is a dormant last-resort fallback. It is still a landmine for any future tenant or step that falls through to the provider default.

gemma4:31b-cloud was tested live on the ollama_cloud pool (clean completion) and is already used by the tenant's per-step overrides.

Change

  • model_registry.py: DEFAULT_LLM_MODEL["ollama_cloud"] and the catalog entry → gemma4:31b-cloud.
  • tests/unit/test_model_registry_defaults.py: guard that every provider default exists in the catalog and that the ollama_cloud default is not the retired model (catches this drift class going forward).

Not included (separate, needs restart)

The runtime last-resort fallback is the env var DEFAULT_LLM_MODEL in .env / docker-compose.yml, still gemma3:27b. Updating it requires an api+worker restart (prod config change) and is tracked separately.

Correction to earlier triage

An earlier diagnostic reported "HyDE broken in prod" — that was a test artifact (empty tenant_config bypassed the DB override and fell to this broken env default). With real tenant config, HyDE resolves to glm-5.2:cloud and works. This PR only removes the dormant landmine.

…:31b-cloud

gemma3:27b was retired upstream on Ollama Cloud (returns 410 Gone on every
key). It was the `ollama_cloud` entry in both DEFAULT_LLM_MODEL and the model
catalog. No active step of the default tenant hits this default today (all LLM
steps resolve their model via tenant config overrides), so this is a dormant
last-resort fallback — but it is a landmine for any future tenant or step that
falls through to the provider default.

- model_registry.py: DEFAULT_LLM_MODEL["ollama_cloud"] and the catalog entry
  now point at gemma4:31b-cloud (verified reachable on the ollama_cloud pool).
- test_model_registry_defaults.py: guard that every provider default exists in
  the catalog, and that the ollama_cloud default is not the retired model.

Note: the runtime last-resort fallback is the env var DEFAULT_LLM_MODEL
(.env / docker-compose), which is a separate prod-config change requiring an
api/worker restart — not included here.
PR left the retired gemma3:27b in three places that override or contradict the
new registry default, risking a split-brain where prod still points at the
retired model:
- .env.example: cutover template DEFAULT_LLM_MODEL example -> gemma4:31b-cloud.
- docs/changelogs/v1.4.0.md: registry-default note and the cutover runbook line
  (an operator following it verbatim would set the retired model via env, which
  overrides the code default).
- tests/integration/test_usage_metrics.py: fixture default model.

Note (not addressed here): a wrong/retired model id still surfaces as a generic
ProviderUnavailableError and trips the circuit breaker like a transient outage
(retry storm). Classifying "model not found" as permanent is a separate
hardening; gemma4:31b-cloud is confirmed present in the live Ollama Cloud
catalog, so this is latent, not active.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant