Skip to content

[Bug]: Ollama provider times out on local model cold-start and does not work with :cloud models #2252

Description

@orrinwitt

Bug Description

Ollama provider does not work with :cloud model variants (e.g., kimi-k3:cloud, gpt-oss:cloud). Two distinct symptoms observed:

  1. Local models timeout on cold start: A local 9B model fails to load within the default Ollama timeout (120s). The model cold-start (loading weights into memory) exceeds the timeout, causing the request to fail before inference even begins.

  2. :cloud models appear not to attempt at all: When switching the model name to a :cloud variant (e.g., kimi-k3:cloud), the provider does not seem to actually send the request to Ollama — no observable load attempt or inference occurs.

Environment

  • SparkyFitness deployed via TrueNAS app (Docker)
  • Ollama provider configured with custom URL pointing to Ollama server
  • Models tested: local 9B model, kimi-k3:cloud, other :cloud variants

Expected Behavior

  • :cloud models should be passed through to Ollama, which proxies them to Ollama Cloud
  • The timeout should be long enough for local model cold-starts, or configurable

Additional Context

The Ollama default timeout in providerDispatch.ts is OLLAMA_DEFAULT_TIMEOUT_MS = 120_000 (120s). This may be insufficient for:

  • Local model cold-starts (loading a 9B model into VRAM can take >120s on slower hardware)
  • Cloud model initialization

The provider.timeout field exists in ProviderConfig and is used in resolveTimeout(), but there does not appear to be a UI-exposed setting to configure it.

Regarding :cloud models: the native Ollama API path (/api/chat) is used for the raw dispatch path, while the chat service path uses the OpenAI-compatible endpoint (/v1/chat/completions). The :cloud models may behave differently between these two endpoints.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions