{"record":{"id":"a8ce1bdb44d2d2b7","repo":"aaif-goose/goose","slug":"anthropic-provider-does-not-support-non-streaming","errorCode":null,"errorMessage":"Anthropic provider does not support non-streaming mode. All Claude models support streaming. Please remove 'supports_streaming: false' from your provider configuration.","messagePattern":"Anthropic provider does not support non-streaming mode\\. All Claude models support streaming\\. Please remove 'supports_streaming: false' from your provider configuration\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/goose-providers/src/anthropic.rs","lineNumber":460,"sourceCode":"        let mut header_map = reqwest::header::HeaderMap::new();\n        header_map.insert(\n            reqwest::header::HeaderName::from_static(\"anthropic-version\"),\n            reqwest::header::HeaderValue::from_static(ANTHROPIC_API_VERSION),\n        );\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    } else {\n        api_client = api_client.with_header(\"anthropic-version\", ANTHROPIC_API_VERSION)?;\n    }\n\n    let supports_streaming = config.supports_streaming.unwrap_or(true);\n\n    if !supports_streaming {\n        return Err(anyhow::anyhow!(\n            \"Anthropic provider does not support non-streaming mode. All Claude models support streaming. \\\n            Please remove 'supports_streaming: false' from your provider configuration.\"\n        ));\n    }\n\n    Ok(AnthropicProviderBuilder::new(api_client)\n        .supports_streaming(supports_streaming)\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        .format_options(format_options))\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n    use crate::api_client::AuthMethod;","sourceCodeStart":442,"sourceCodeEnd":478,"githubUrl":"https://github.com/aaif-goose/goose/blob/3810898a7447ec3299be72e223d3570a7aabf0ab/crates/goose-providers/src/anthropic.rs#L442-L478","documentation":"The Anthropic provider implementation is streaming-only: the code notes all Claude models support streaming and rejects a configuration that disables it. If a provider config entry of type anthropic has supports_streaming: false, construction fails immediately with this message instead of attempting an unsupported non-streaming mode.","triggerScenarios":"A custom or hand-edited providers entry with type: anthropic and supports_streaming: false. The check reads config.supports_streaming.unwrap_or(true), so only the explicit false triggers it — at provider construction, before any request.","commonSituations":"Copying a config from a provider that genuinely lacks streaming (some ollama/legacy endpoints) and flipping type to anthropic; users trying to work around proxy/SSE issues by disabling streaming; YAML templates that include supports_streaming: false as a leftover.","solutions":["Remove the supports_streaming: false line from the anthropic provider entry (streaming then defaults to true)","If streaming fails through your network (proxy stripping SSE), fix the proxy to pass text/event-stream responses instead of disabling streaming","If you truly need non-streaming Anthropic, use a compatible gateway that terminates SSE and exposes a plain chat-completions endpoint under a different provider type"],"exampleFix":"# before\nname: my-claude\ntype: anthropic\nsupports_streaming: false\n\n# after\nname: my-claude\ntype: anthropic","handlingStrategy":"validation","validationCode":"fn anthropic_streaming_config_ok(cfg: &ProviderConfig) -> bool {\n    cfg.supports_streaming.unwrap_or(true)\n}\n\nif !anthropic_streaming_config_ok(&cfg) {\n    anyhow::bail!(\"remove supports_streaming: false from the anthropic entry\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never copy supports_streaming: false into an anthropic-type provider entry","If a proxy breaks SSE, fix the proxy (accept text/event-stream, disable buffering) instead of disabling streaming","Lint provider configs for known-invalid key combinations per provider type"],"tags":["rust","anthropic","config","streaming","startup"],"backgroundTag":null,"analyzedSha":"3810898a7447ec3299be72e223d3570a7aabf0ab","analyzedAt":"2026-08-16T10:14:26.282Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}