mirror of
https://github.com/katanemo/plano.git
synced 2026-06-17 15:25:17 +02:00
fixed integration tests for llm_gateway
This commit is contained in:
parent
983f3fb882
commit
f23f0811dd
2 changed files with 4 additions and 3 deletions
|
|
@ -145,7 +145,7 @@ impl StreamContext {
|
|||
Some(SupportedAPIs::AnthropicMessagesAPI(_)) => {
|
||||
// Anthropic API requires x-api-key and anthropic-version headers
|
||||
// Remove any existing Authorization header since Anthropic doesn't use it
|
||||
self.set_http_request_header("authorization", None);
|
||||
self.set_http_request_header("Authorization", None);
|
||||
self.set_http_request_header("x-api-key", Some(llm_provider_api_key_value));
|
||||
self.set_http_request_header("anthropic-version", Some("2023-06-01"));
|
||||
}
|
||||
|
|
@ -154,7 +154,7 @@ impl StreamContext {
|
|||
// Remove any existing x-api-key header since OpenAI doesn't use it
|
||||
self.set_http_request_header("x-api-key", None);
|
||||
let authorization_header_value = format!("Bearer {}", llm_provider_api_key_value);
|
||||
self.set_http_request_header("authorization", Some(&authorization_header_value));
|
||||
self.set_http_request_header("Authorization", Some(&authorization_header_value));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,8 @@ fn request_headers_expectations(module: &mut Tester, http_context: i32) {
|
|||
Some("x-arch-llm-provider"),
|
||||
Some("openai"),
|
||||
)
|
||||
.expect_replace_header_map_value(
|
||||
.expect_remove_header_map_value(Some(MapType::HttpRequestHeaders), Some("x-api-key"))
|
||||
.expect_add_header_map_value(
|
||||
Some(MapType::HttpRequestHeaders),
|
||||
Some("Authorization"),
|
||||
Some("Bearer secret_key"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue