feat: opt-in to vercel ai gateway leaderboard (#9259)
This commit is contained in:
@@ -849,6 +849,16 @@ mod tests {
|
|||||||
);
|
);
|
||||||
assert_eq!(config.supports_streaming, Some(true));
|
assert_eq!(config.supports_streaming, Some(true));
|
||||||
assert!(!config.models.is_empty());
|
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]
|
#[test]
|
||||||
|
|||||||
@@ -5,6 +5,10 @@
|
|||||||
"description": "Unified gateway to OpenAI, Anthropic, Google, xAI, and many more frontier models via Vercel AI Gateway",
|
"description": "Unified gateway to OpenAI, Anthropic, Google, xAI, and many more frontier models via Vercel AI Gateway",
|
||||||
"api_key_env": "AI_GATEWAY_API_KEY",
|
"api_key_env": "AI_GATEWAY_API_KEY",
|
||||||
"base_url": "https://ai-gateway.vercel.sh/v1/chat/completions",
|
"base_url": "https://ai-gateway.vercel.sh/v1/chat/completions",
|
||||||
|
"headers": {
|
||||||
|
"http-referer": "https://goose-docs.ai",
|
||||||
|
"x-title": "goose"
|
||||||
|
},
|
||||||
"models": [
|
"models": [
|
||||||
{
|
{
|
||||||
"name": "anthropic/claude-sonnet-4.6",
|
"name": "anthropic/claude-sonnet-4.6",
|
||||||
|
|||||||
Reference in New Issue
Block a user