Skip to content

Setting a local model as primary rewrites cascade rows to the old primary's provider (drops ollama base_url) #149

Description

@juniperbevensee

Observed on Matilde (h_matilde) 2026-07-05. Cascade before the change (correct, per fleet-wide GLM rollout): anthropic/fable -> anthropic/opus -> ollama/glm4:9b (base_url) -> ollama/qwen3:30b (base_url).

After switching the primary to glm4:9b in the HSM models UI, config.yaml came out as:

model:
  provider: anthropic     # <- old primary's provider kept
  default: glm4:9b
fallback_providers:
  - {provider: anthropic, model: glm4:9b}    # <- base_url dropped
  - {provider: anthropic, model: qwen3:30b}  # <- base_url dropped
  - {provider: anthropic, model: claude-fable-5}

Every request then went to the Anthropic API with model=glm4:9b -> 404 -> 'provider failed after retries' in chat. Fallback rows could not rescue it because they were rewritten to anthropic too.

Same family as #126 (models-PUT col-0 corruption). Suspect: the UI/route derives provider for all rows from the harness's top-level provider instead of preserving each row's provider+base_url when reordering the primary.

Workaround applied: PUT /api/harnesses/h_matilde/models with explicit fallback_providers (ollama+base_url rows) + quick restart — works.

🤖 Generated with Claude Code

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