mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-04 16:37:46 +08:00
Add Antigravity v1internal gateway adapter
This commit is contained in:
@@ -69,6 +69,14 @@ pub fn resolve_execution_runtime_stream_plan_kind(
|
||||
));
|
||||
}
|
||||
|
||||
if route_family == Some("antigravity")
|
||||
&& route_kind == Some("stream_generate_content")
|
||||
&& *method == Method::POST
|
||||
&& path == "/v1internal:streamGenerateContent"
|
||||
{
|
||||
return Some(GEMINI_CLI_STREAM_PLAN_KIND);
|
||||
}
|
||||
|
||||
if route_family == Some("openai")
|
||||
&& is_openai_responses_route_kind(route_kind)
|
||||
&& *method == Method::POST
|
||||
@@ -679,6 +687,32 @@ mod tests {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn resolves_antigravity_v1internal_stream_plan_kind_as_gemini_cli_stream() {
|
||||
assert_eq!(
|
||||
resolve_execution_runtime_stream_plan_kind(
|
||||
Some("ai_public"),
|
||||
Some("antigravity"),
|
||||
Some("stream_generate_content"),
|
||||
Some("bearer_like"),
|
||||
&Method::POST,
|
||||
"/v1internal:streamGenerateContent",
|
||||
),
|
||||
Some(GEMINI_CLI_STREAM_PLAN_KIND)
|
||||
);
|
||||
assert_eq!(
|
||||
resolve_execution_runtime_sync_plan_kind(
|
||||
Some("ai_public"),
|
||||
Some("antigravity"),
|
||||
Some("stream_generate_content"),
|
||||
Some("bearer_like"),
|
||||
&Method::POST,
|
||||
"/v1internal:streamGenerateContent",
|
||||
),
|
||||
None
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn stream_path_detection_handles_gemini_method_paths_with_query() {
|
||||
assert!(request_path_implies_stream_request(
|
||||
|
||||
Reference in New Issue
Block a user