diff --git a/crates/goose/src/config/declarative_providers.rs b/crates/goose/src/config/declarative_providers.rs index e46bec35..a4bb1d35 100644 --- a/crates/goose/src/config/declarative_providers.rs +++ b/crates/goose/src/config/declarative_providers.rs @@ -849,6 +849,16 @@ mod tests { ); assert_eq!(config.supports_streaming, Some(true)); assert!(!config.models.is_empty()); + + let headers = config + .headers + .as_ref() + .expect("vercel_ai_gateway should set attribution headers"); + assert_eq!( + headers.get("http-referer").map(String::as_str), + Some("https://goose-docs.ai") + ); + assert_eq!(headers.get("x-title").map(String::as_str), Some("goose")); } #[test] diff --git a/crates/goose/src/providers/declarative/vercel_ai_gateway.json b/crates/goose/src/providers/declarative/vercel_ai_gateway.json index 4e32d05b..aec9e1de 100644 --- a/crates/goose/src/providers/declarative/vercel_ai_gateway.json +++ b/crates/goose/src/providers/declarative/vercel_ai_gateway.json @@ -5,6 +5,10 @@ "description": "Unified gateway to OpenAI, Anthropic, Google, xAI, and many more frontier models via Vercel AI Gateway", "api_key_env": "AI_GATEWAY_API_KEY", "base_url": "https://ai-gateway.vercel.sh/v1/chat/completions", + "headers": { + "http-referer": "https://goose-docs.ai", + "x-title": "goose" + }, "models": [ { "name": "anthropic/claude-sonnet-4.6",