Skip to content

Ollama failover UX — show which local model was attempted before switching #10

@Dhwanil25

Description

@Dhwanil25

Current behaviour

When Ollama is configured but the requested model isn't loaded, the agent silently fails (returns < 20 chars of output) and switches to the next available provider. The user sees ↻ Provider unavailable but doesn't know which Ollama model was attempted or why it failed.

Expected behaviour

The failover notice should be more descriptive:

↻ Ollama — llama3.2 not found locally (is it pulled?)
  Switched to Anthropic / claude-haiku-4-5

And in the agent card, show a tooltip or expandable section with:

  • Which model was attempted
  • The error received (e.g. model not found, connection refused)
  • A hint: Run: ollama pull llama3.2

Root cause

In multiAgentEngine.ts, streamWithFailover() catches the error and sets the notice string but discards the original error message. The Ollama-specific error (model not found) is lost.

Fix

  1. In streamOllama(), throw a descriptive error: throw new Error(Ollama: model '${modelId}' not found — run: ollama pull ${modelId})
  2. In streamWithFailover(), include the caught error message in the notice string
  3. Surface the full message in the agent card output

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions