mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-05 00:47:48 +08:00
对齐原生 Antigravity 控制面与显示模型
This commit is contained in:
@@ -1963,7 +1963,10 @@ async fn gateway_executes_openai_chat_antigravity_cross_format_sync_via_local_fi
|
||||
"trace-openai-chat-antigravity-sync-123"
|
||||
);
|
||||
assert_eq!(seen_execution_runtime_request.model, "claude-sonnet-4-5");
|
||||
assert_eq!(seen_execution_runtime_request.user_agent, "antigravity");
|
||||
assert_eq!(
|
||||
seen_execution_runtime_request.user_agent,
|
||||
aether_provider_transport::antigravity::ANTIGRAVITY_REQUEST_USER_AGENT
|
||||
);
|
||||
assert_eq!(seen_execution_runtime_request.request_type, "agent");
|
||||
assert_eq!(seen_execution_runtime_request.contents_len, 1);
|
||||
assert!(!seen_execution_runtime_request.request_has_model);
|
||||
|
||||
@@ -1558,7 +1558,7 @@ async fn gateway_executes_openai_responses_antigravity_cross_format_upstream_str
|
||||
);
|
||||
assert_eq!(
|
||||
seen_remote_execution_runtime_request.user_agent,
|
||||
"antigravity"
|
||||
aether_provider_transport::antigravity::ANTIGRAVITY_REQUEST_USER_AGENT
|
||||
);
|
||||
assert_eq!(seen_remote_execution_runtime_request.request_type, "agent");
|
||||
assert_eq!(seen_remote_execution_runtime_request.contents_len, 1);
|
||||
|
||||
@@ -2143,7 +2143,7 @@ async fn gateway_executes_antigravity_gemini_cli_sync_upstream_stream_via_local_
|
||||
);
|
||||
assert_eq!(
|
||||
seen_remote_execution_runtime_request.user_agent,
|
||||
"antigravity"
|
||||
aether_provider_transport::antigravity::ANTIGRAVITY_REQUEST_USER_AGENT
|
||||
);
|
||||
assert_eq!(seen_remote_execution_runtime_request.request_type, "agent");
|
||||
assert_eq!(seen_remote_execution_runtime_request.contents_len, 0);
|
||||
|
||||
@@ -2031,7 +2031,10 @@ async fn gateway_executes_antigravity_gemini_cli_stream_via_local_decision_gate_
|
||||
"trace-antigravity-cli-oauth-local-stream-123"
|
||||
);
|
||||
assert_eq!(seen_execution_runtime_request.model, "claude-sonnet-4-5");
|
||||
assert_eq!(seen_execution_runtime_request.user_agent, "antigravity");
|
||||
assert_eq!(
|
||||
seen_execution_runtime_request.user_agent,
|
||||
aether_provider_transport::antigravity::ANTIGRAVITY_REQUEST_USER_AGENT
|
||||
);
|
||||
assert_eq!(seen_execution_runtime_request.request_type, "agent");
|
||||
assert_eq!(seen_execution_runtime_request.contents_len, 0);
|
||||
assert!((seen_execution_runtime_request.exact_temperature - 0.2).abs() < f64::EPSILON);
|
||||
|
||||
@@ -2334,7 +2334,10 @@ async fn gateway_executes_antigravity_gemini_cli_sync_via_local_decision_gate_af
|
||||
"trace-antigravity-cli-oauth-local-sync-123"
|
||||
);
|
||||
assert_eq!(seen_execution_runtime_request.model, "claude-sonnet-4-5");
|
||||
assert_eq!(seen_execution_runtime_request.user_agent, "antigravity");
|
||||
assert_eq!(
|
||||
seen_execution_runtime_request.user_agent,
|
||||
aether_provider_transport::antigravity::ANTIGRAVITY_REQUEST_USER_AGENT
|
||||
);
|
||||
assert_eq!(seen_execution_runtime_request.request_type, "agent");
|
||||
assert_eq!(seen_execution_runtime_request.contents_len, 0);
|
||||
assert!((seen_execution_runtime_request.exact_temperature - 0.2).abs() < f64::EPSILON);
|
||||
|
||||
@@ -949,6 +949,10 @@ async fn gateway_handles_antigravity_v1internal_control_plane_without_proxying()
|
||||
"/v1internal:fetchAvailableModels",
|
||||
json!({"project": "aether-antigravity-local"}),
|
||||
),
|
||||
(
|
||||
"/v1internal:retrieveUserQuotaSummary",
|
||||
json!({"project": "aether-antigravity-local"}),
|
||||
),
|
||||
(
|
||||
"/v1internal:fetchUserInfo",
|
||||
json!({"project": "aether-antigravity-local"}),
|
||||
@@ -966,6 +970,10 @@ async fn gateway_handles_antigravity_v1internal_control_plane_without_proxying()
|
||||
"metrics": []
|
||||
}),
|
||||
),
|
||||
(
|
||||
"/v1internal:writeTrajectoryAcls",
|
||||
json!({"trajectoryId": "trajectory-ant-123"}),
|
||||
),
|
||||
(
|
||||
"/v1internal:setUserSettings",
|
||||
json!({"userSettings": user_settings.clone()}),
|
||||
@@ -1012,18 +1020,58 @@ async fn gateway_handles_antigravity_v1internal_control_plane_without_proxying()
|
||||
);
|
||||
}
|
||||
"/v1internal:fetchAvailableModels" => {
|
||||
assert_eq!(payload["defaultAgentModelId"], "gemini-3.1-flash-lite");
|
||||
assert_eq!(payload["defaultAgentModelId"], "gemini-3.5-flash-low");
|
||||
assert_eq!(
|
||||
payload["tieredModelIds"]["flash"],
|
||||
json!(["gemini-3-flash-agent"])
|
||||
);
|
||||
assert_eq!(
|
||||
payload["models"]["gemini-3.5-flash-low"]["displayName"],
|
||||
"Gemini 3.5 Flash Medium"
|
||||
payload["tieredModelIds"]["pro"],
|
||||
json!(["gemini-3.1-pro-low"])
|
||||
);
|
||||
assert_eq!(
|
||||
payload["models"]["gemini-3-flash-agent"]["displayName"],
|
||||
"Gemini 3.5 Flash High"
|
||||
"Gemini 3.5 Flash (High)"
|
||||
);
|
||||
assert_eq!(
|
||||
payload["models"]["gemini-3.5-flash-low"]["displayName"],
|
||||
"Gemini 3.5 Flash (Medium)"
|
||||
);
|
||||
assert_eq!(
|
||||
payload["models"]["gemini-3.5-flash-extra-low"]["displayName"],
|
||||
"Gemini 3.5 Flash (Low)"
|
||||
);
|
||||
assert_eq!(
|
||||
payload["models"]["gemini-pro-agent"]["displayName"],
|
||||
"Gemini 3.1 Pro (High)"
|
||||
);
|
||||
assert_eq!(
|
||||
payload["models"]["claude-opus-4-6-thinking"]["displayName"],
|
||||
"Claude Opus 4.6 (Thinking)"
|
||||
);
|
||||
assert_eq!(
|
||||
payload["models"]["gpt-oss-120b-medium"]["displayName"],
|
||||
"GPT-OSS 120B (Medium)"
|
||||
);
|
||||
assert_eq!(
|
||||
payload["models"]["gemini-pro-agent"]["model"],
|
||||
"MODEL_PLACEHOLDER_M16"
|
||||
);
|
||||
assert_eq!(
|
||||
payload["models"]["gemini-3.1-pro-high"]["model"],
|
||||
"MODEL_PLACEHOLDER_M37"
|
||||
);
|
||||
assert_eq!(
|
||||
payload["models"]["gemini-3.5-flash-extra-low"]["model"],
|
||||
"MODEL_PLACEHOLDER_M187"
|
||||
);
|
||||
assert_eq!(
|
||||
payload["models"]["claude-sonnet-4-6"]["apiProvider"],
|
||||
"API_PROVIDER_ANTHROPIC_VERTEX"
|
||||
);
|
||||
assert_eq!(
|
||||
payload["models"]["gpt-oss-120b-medium"]["apiProvider"],
|
||||
"API_PROVIDER_OPENAI_VERTEX"
|
||||
);
|
||||
assert_eq!(
|
||||
payload["models"]["gemini-3.5-flash-low"]["apiProvider"],
|
||||
@@ -1036,18 +1084,26 @@ async fn gateway_handles_antigravity_v1internal_control_plane_without_proxying()
|
||||
assert_eq!(
|
||||
payload["agentModelSorts"][0]["groups"][0]["modelIds"],
|
||||
json!([
|
||||
"gemini-3.1-flash-lite",
|
||||
"gemini-3.5-flash-low",
|
||||
"gemini-3-flash-agent",
|
||||
"gemini-3.5-flash-extra-low",
|
||||
"gemini-3.1-pro-low",
|
||||
"gemini-3.5-flash-low"
|
||||
"gemini-pro-agent",
|
||||
"claude-sonnet-4-6",
|
||||
"claude-opus-4-6-thinking",
|
||||
"gpt-oss-120b-medium"
|
||||
])
|
||||
);
|
||||
assert_eq!(payload["deprecatedModelIds"], json!({}));
|
||||
assert_eq!(
|
||||
payload["deprecatedModelIds"]["gemini-3.1-pro-high"]["newModelId"],
|
||||
"gemini-pro-agent"
|
||||
);
|
||||
assert_eq!(payload["commandModelIds"], json!(["gemini-3-flash"]));
|
||||
assert_eq!(
|
||||
payload["imageGenerationModelIds"],
|
||||
json!(["gemini-3.1-flash-image"])
|
||||
);
|
||||
assert_eq!(payload["tabModelIds"], json!(["chat_20706", "chat_23310"]));
|
||||
assert_eq!(payload["mqueryModelIds"], json!(["gemini-3.1-flash-lite"]));
|
||||
assert_eq!(
|
||||
payload["webSearchModelIds"],
|
||||
@@ -1062,9 +1118,13 @@ async fn gateway_handles_antigravity_v1internal_control_plane_without_proxying()
|
||||
assert_eq!(payload["regionCode"], "US");
|
||||
assert_eq!(
|
||||
payload["userSettings"]["preferredModelId"],
|
||||
"gemini-3.1-flash-lite"
|
||||
"gemini-3.5-flash-low"
|
||||
);
|
||||
}
|
||||
"/v1internal:retrieveUserQuotaSummary" => {
|
||||
assert_eq!(payload["description"], "");
|
||||
assert_eq!(payload["groups"], json!([]));
|
||||
}
|
||||
"/v1internal:fetchAdminControls" => {
|
||||
assert_eq!(payload, json!({}));
|
||||
}
|
||||
@@ -1075,6 +1135,9 @@ async fn gateway_handles_antigravity_v1internal_control_plane_without_proxying()
|
||||
"/v1internal:recordCodeAssistMetrics" => {
|
||||
assert_eq!(payload, json!({}));
|
||||
}
|
||||
"/v1internal:writeTrajectoryAcls" => {
|
||||
assert_eq!(payload, json!({}));
|
||||
}
|
||||
"/v1internal:setUserSettings" => {
|
||||
assert_eq!(payload["userSettings"], user_settings);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user