{"record":{"id":"49acbdc96fb7cc41","repo":"aaif-goose/goose","slug":"ollama-provider-does-not-support-non-streaming-mod","errorCode":null,"errorMessage":"Ollama provider does not support non-streaming mode. All Ollama models support streaming. Please remove 'supports_streaming: false' from your provider configuration.","messagePattern":"Ollama provider does not support non-streaming mode\\. All Ollama models support streaming\\. Please remove 'supports_streaming: false' from your provider configuration\\.","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/goose-providers/src/ollama.rs","lineNumber":351,"sourceCode":"    };\n\n    let mut api_client =\n        ApiClient::with_timeout_and_tls(base_url.to_string(), auth, timeout, tls_config)?;\n\n    if let Some(headers) = &config.headers {\n        let mut header_map = reqwest::header::HeaderMap::new();\n        for (key, value) in headers {\n            let header_name = reqwest::header::HeaderName::from_bytes(key.as_bytes())?;\n            let header_value = reqwest::header::HeaderValue::from_str(value)?;\n            header_map.insert(header_name, header_value);\n        }\n        api_client = api_client.with_headers(header_map)?;\n    }\n\n    let supports_streaming = config.supports_streaming.unwrap_or(true);\n\n    if !supports_streaming {\n        return Err(anyhow::anyhow!(\n            \"Ollama provider does not support non-streaming mode. All Ollama models support streaming. \\\n            Please remove 'supports_streaming: false' from your provider configuration.\"\n        ));\n    }\n\n    Ok(OllamaProviderBuilder::new(api_client)\n        .name(config.name.clone())\n        .custom_models(custom_models)\n        .dynamic_models(config.dynamic_models)\n        .skip_canonical_filtering(config.skip_canonical_filtering))\n}\n\nimpl ProviderDescriptor for OllamaProvider {\n    fn metadata() -> ProviderMetadata {\n        ProviderMetadata::new(\n            OLLAMA_PROVIDER_NAME,\n            \"Ollama\",\n            \"Local open source models\",","sourceCodeStart":333,"sourceCodeEnd":369,"githubUrl":"https://github.com/aaif-goose/goose/blob/3810898a7447ec3299be72e223d3570a7aabf0ab/crates/goose-providers/src/ollama.rs#L333-L369","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Delete the \"supports_streaming\" field (or set it to true) from the Ollama provider JSON","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","If you truly need one-shot responses, consume the stream and aggregate — the agent layer already does this"],"exampleFix":"// before\n{ \"name\": \"my-ollama\", \"engine\": \"ollama\", \"base_url\": \"http://localhost:11434\",\n  \"supports_streaming\": false }\n\n// after\n{ \"name\": \"my-ollama\", \"engine\": \"ollama\", \"base_url\": \"http://localhost:11434\" }","handlingStrategy":"validation","validationCode":"fn ollama_config_streaming_ok(cfg: &serde_json::Value) -> bool {\n    cfg.get(\"supports_streaming\").and_then(|v| v.as_bool()) != Some(false)\n}","typeGuard":null,"tryCatchPattern":"if cfg.get(\"engine\").and_then(|e| e.as_str()) == Some(\"ollama\")\n    && cfg.get(\"supports_streaming\") == Some(&serde_json::json!(false)) {\n    anyhow::bail!(\"remove 'supports_streaming: false' — Ollama engine is stream-only\");\n}","preventionTips":["Per-engine config templates: keep Ollama templates free of streaming flags copied from other engines","Fix proxy-induced streaming problems at the proxy (buffering off), never by disabling streaming","Remember supports_streaming defaults to true — simply omit it for Ollama"],"tags":["ollama","json-config","streaming","validation"],"backgroundTag":null,"analyzedSha":"3810898a7447ec3299be72e223d3570a7aabf0ab","analyzedAt":"2026-08-16T10:14:26.282Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}