aaif-goose/goose · error

Anthropic provider does not support non-streaming mode. All

Error message

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

What it means

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.

Source

Thrown at crates/goose-providers/src/anthropic.rs:460

        let mut header_map = reqwest::header::HeaderMap::new();
        header_map.insert(
            reqwest::header::HeaderName::from_static("anthropic-version"),
            reqwest::header::HeaderValue::from_static(ANTHROPIC_API_VERSION),
        );
        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)?;
    } else {
        api_client = api_client.with_header("anthropic-version", ANTHROPIC_API_VERSION)?;
    }

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

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

    Ok(AnthropicProviderBuilder::new(api_client)
        .supports_streaming(supports_streaming)
        .name(config.name.clone())
        .custom_models(custom_models)
        .dynamic_models(config.dynamic_models)
        .skip_canonical_filtering(config.skip_canonical_filtering)
        .format_options(format_options))
}

#[cfg(test)]
mod tests {
    use super::*;
    use crate::api_client::AuthMethod;

View on GitHub (pinned to 3810898a74)

Solutions

  1. Remove the supports_streaming: false line from the anthropic provider entry (streaming then defaults to true)
  2. If streaming fails through your network (proxy stripping SSE), fix the proxy to pass text/event-stream responses instead of disabling streaming
  3. 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

Example fix

# before
name: my-claude
type: anthropic
supports_streaming: false

# after
name: my-claude
type: anthropic
Defensive patterns

Strategy: validation

Validate before calling

fn anthropic_streaming_config_ok(cfg: &ProviderConfig) -> bool {
    cfg.supports_streaming.unwrap_or(true)
}

if !anthropic_streaming_config_ok(&cfg) {
    anyhow::bail!("remove supports_streaming: false from the anthropic entry");
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


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