aaif-goose/goose · error · anyhow::Error

Ollama provider does not support non-streaming mode. All Oll

Error message

Ollama provider does not support non-streaming mode. All Ollama models support streaming. Please remove 'supports_streaming: false' from your provider configuration.

What it means

The Ollama integration in goose is implemented on top of streaming (SSE) and has no non-streaming code path, so a declarative config that sets "supports_streaming": false is rejected outright at provider construction with a message telling you to remove the field. supports_streaming defaults to true (unwrap_or(true)), so the error only fires on an explicit opt-out.

Source

Thrown at crates/goose-providers/src/ollama.rs:351

    };

    let mut api_client =
        ApiClient::with_timeout_and_tls(base_url.to_string(), auth, timeout, tls_config)?;

    if let Some(headers) = &config.headers {
        let mut header_map = reqwest::header::HeaderMap::new();
        for (key, value) in headers {
            let header_name = reqwest::header::HeaderName::from_bytes(key.as_bytes())?;
            let header_value = reqwest::header::HeaderValue::from_str(value)?;
            header_map.insert(header_name, header_value);
        }
        api_client = api_client.with_headers(header_map)?;
    }

    let supports_streaming = config.supports_streaming.unwrap_or(true);

    if !supports_streaming {
        return Err(anyhow::anyhow!(
            "Ollama provider does not support non-streaming mode. All Ollama models support streaming. \
            Please remove 'supports_streaming: false' from your provider configuration."
        ));
    }

    Ok(OllamaProviderBuilder::new(api_client)
        .name(config.name.clone())
        .custom_models(custom_models)
        .dynamic_models(config.dynamic_models)
        .skip_canonical_filtering(config.skip_canonical_filtering))
}

impl ProviderDescriptor for OllamaProvider {
    fn metadata() -> ProviderMetadata {
        ProviderMetadata::new(
            OLLAMA_PROVIDER_NAME,
            "Ollama",
            "Local open source models",

View on GitHub (pinned to 3810898a74)

Solutions

  1. Delete the "supports_streaming" field (or set it to true) from the Ollama provider JSON
  2. If streaming broke behind a proxy, fix the proxy (disable response buffering, e.g. nginx proxy_buffering off; set correct Content-Type passthrough) rather than disabling streaming
  3. If you truly need one-shot responses, consume the stream and aggregate — the agent layer already does this

Example fix

// before
{ "name": "my-ollama", "engine": "ollama", "base_url": "http://localhost:11434",
  "supports_streaming": false }

// after
{ "name": "my-ollama", "engine": "ollama", "base_url": "http://localhost:11434" }
Defensive patterns

Strategy: validation

Validate before calling

fn ollama_config_streaming_ok(cfg: &serde_json::Value) -> bool {
    cfg.get("supports_streaming").and_then(|v| v.as_bool()) != Some(false)
}

Try / catch

if cfg.get("engine").and_then(|e| e.as_str()) == Some("ollama")
    && cfg.get("supports_streaming") == Some(&serde_json::json!(false)) {
    anyhow::bail!("remove 'supports_streaming: false' — Ollama engine is stream-only");
}

Prevention

When it happens

Trigger: A custom Ollama provider JSON copied from an OpenAI-compatible provider template that included "supports_streaming": false, or a user trying to force buffered/complete responses from Ollama by disabling streaming.

Common situations: Templates for other engines carry the field and get reused for Ollama; users hit SSE proxy buffering issues and try to 'turn streaming off' as a workaround — for Ollama the supported fixes are proxy config or timeout tuning instead.

Related errors


AI-assisted analysis of aaif-goose/goose@3810898a74 (2026-08-16). Data as JSON: /api/errors/49acbdc96fb7cc41. Report an issue: GitHub.