mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-01 17:00:21 +08:00
fix(gateway): avoid low OpenAI-compatible test token cap
This commit is contained in:
@@ -169,7 +169,11 @@ pub(super) async fn maybe_build_local_test_connection_route_response(
|
||||
}
|
||||
|
||||
let mut provider_request_body = match format_value.as_str() {
|
||||
"openai:chat" | "claude:messages" => json!({
|
||||
"openai:chat" => json!({
|
||||
"model": model,
|
||||
"messages": [{"role": "user", "content": "Health check"}],
|
||||
}),
|
||||
"claude:messages" => json!({
|
||||
"model": model,
|
||||
"messages": [{"role": "user", "content": "Health check"}],
|
||||
"max_tokens": 5,
|
||||
|
||||
@@ -1920,6 +1920,10 @@ async fn gateway_handles_public_test_connection_without_hitting_fallback_probe()
|
||||
);
|
||||
assert_eq!(body_json["model"], "gpt-5");
|
||||
assert_eq!(body_json["messages"][0]["content"], "Health check");
|
||||
assert!(
|
||||
body_json.get("max_tokens").is_none(),
|
||||
"public OpenAI-compatible test connection must not force a tiny max_tokens value"
|
||||
);
|
||||
Json(json!({"id": "resp_local_test"})).into_response()
|
||||
}
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user