mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-07 18:07:47 +08:00
Normalize canonical API formats
This commit is contained in:
@@ -501,7 +501,7 @@ async fn gateway_locally_denies_disallowed_claude_api_format_without_hitting_con
|
||||
assert_eq!(payload["error"]["type"], "http_error");
|
||||
assert_eq!(
|
||||
payload["error"]["message"],
|
||||
"当前密钥不允许访问 claude:chat 格式"
|
||||
"当前密钥不允许访问 claude:messages 格式"
|
||||
);
|
||||
assert_eq!(*auth_context_hits.lock().expect("mutex should lock"), 0);
|
||||
assert_eq!(*public_hits.lock().expect("mutex should lock"), 0);
|
||||
@@ -625,7 +625,7 @@ async fn gateway_locally_denies_disallowed_gemini_model_without_hitting_control_
|
||||
let mut snapshot = sample_currently_usable_auth_snapshot("key-gemini-123", "user-gemini-123");
|
||||
snapshot.api_key_allowed_providers = Some(vec!["gemini".to_string()]);
|
||||
snapshot.user_allowed_providers = Some(vec!["gemini".to_string()]);
|
||||
snapshot.api_key_allowed_api_formats = Some(vec!["gemini:chat".to_string()]);
|
||||
snapshot.api_key_allowed_api_formats = Some(vec!["gemini:generate_content".to_string()]);
|
||||
snapshot.api_key_allowed_models = Some(vec!["gemini-1.5-pro".to_string()]);
|
||||
let repository = Arc::new(InMemoryAuthApiKeySnapshotRepository::seed(vec![(
|
||||
Some(hash_api_key("gemini-client-key-123")),
|
||||
|
||||
Reference in New Issue
Block a user