mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 09:20:22 +08:00
migrate ai format conversion to responses adapters
This commit is contained in:
@@ -2448,7 +2448,7 @@ mod tests {
|
||||
})),
|
||||
stream: false,
|
||||
client_api_format: "claude:cli".to_string(),
|
||||
provider_api_format: "openai:cli".to_string(),
|
||||
provider_api_format: "openai:responses".to_string(),
|
||||
model_name: Some("gpt-5.4".to_string()),
|
||||
proxy: None,
|
||||
tls_profile: None,
|
||||
@@ -2515,7 +2515,7 @@ mod tests {
|
||||
body: RequestBody::from_json(json!({"model": "gpt-5.4"})),
|
||||
stream: true,
|
||||
client_api_format: "claude:cli".to_string(),
|
||||
provider_api_format: "openai:cli".to_string(),
|
||||
provider_api_format: "openai:responses".to_string(),
|
||||
model_name: Some("gpt-5.4".to_string()),
|
||||
proxy: None,
|
||||
tls_profile: None,
|
||||
@@ -2572,7 +2572,7 @@ mod tests {
|
||||
body: RequestBody::from_json(json!({"model": "gpt-5.4"})),
|
||||
stream: false,
|
||||
client_api_format: "claude:cli".to_string(),
|
||||
provider_api_format: "openai:cli".to_string(),
|
||||
provider_api_format: "openai:responses".to_string(),
|
||||
model_name: Some("gpt-5.4".to_string()),
|
||||
proxy: None,
|
||||
tls_profile: None,
|
||||
@@ -2583,7 +2583,7 @@ mod tests {
|
||||
report_kind: "claude_cli_sync_success".to_string(),
|
||||
report_context: Some(json!({
|
||||
"client_api_format": "claude:cli",
|
||||
"provider_api_format": "openai:cli",
|
||||
"provider_api_format": "openai:responses",
|
||||
"needs_conversion": true,
|
||||
"original_request_body": nested,
|
||||
"provider_request_body": {"input": "safe"}
|
||||
@@ -2635,7 +2635,7 @@ mod tests {
|
||||
},
|
||||
stream: true,
|
||||
client_api_format: "openai:chat".to_string(),
|
||||
provider_api_format: "openai:cli".to_string(),
|
||||
provider_api_format: "openai:responses".to_string(),
|
||||
model_name: Some("gpt-5.4".to_string()),
|
||||
proxy: None,
|
||||
tls_profile: None,
|
||||
@@ -2646,7 +2646,7 @@ mod tests {
|
||||
report_kind: "openai_chat_stream_success".to_string(),
|
||||
report_context: Some(json!({
|
||||
"client_api_format": "openai:chat",
|
||||
"provider_api_format": "openai:cli",
|
||||
"provider_api_format": "openai:responses",
|
||||
"needs_conversion": true
|
||||
})),
|
||||
status_code: 200,
|
||||
@@ -2730,7 +2730,7 @@ mod tests {
|
||||
},
|
||||
stream: true,
|
||||
client_api_format: "openai:chat".to_string(),
|
||||
provider_api_format: "openai:cli".to_string(),
|
||||
provider_api_format: "openai:responses".to_string(),
|
||||
model_name: Some("gpt-5.4".to_string()),
|
||||
proxy: None,
|
||||
tls_profile: None,
|
||||
@@ -2746,7 +2746,7 @@ mod tests {
|
||||
report_kind: "openai_chat_stream_success".to_string(),
|
||||
report_context: Some(json!({
|
||||
"client_api_format": "openai:chat",
|
||||
"provider_api_format": "openai:cli",
|
||||
"provider_api_format": "openai:responses",
|
||||
"needs_conversion": true
|
||||
})),
|
||||
status_code: 200,
|
||||
@@ -2761,6 +2761,7 @@ mod tests {
|
||||
response_id: Some("resp_summary_1".to_string()),
|
||||
model: Some("gpt-5.4".to_string()),
|
||||
observed_finish: true,
|
||||
unknown_event_count: 0,
|
||||
parser_error: None,
|
||||
}),
|
||||
telemetry: None,
|
||||
@@ -2799,8 +2800,8 @@ mod tests {
|
||||
body_ref: None,
|
||||
},
|
||||
stream: true,
|
||||
client_api_format: "openai:cli".to_string(),
|
||||
provider_api_format: "openai:cli".to_string(),
|
||||
client_api_format: "openai:responses".to_string(),
|
||||
provider_api_format: "openai:responses".to_string(),
|
||||
model_name: Some("gpt-5.5".to_string()),
|
||||
proxy: None,
|
||||
tls_profile: None,
|
||||
@@ -2852,8 +2853,8 @@ mod tests {
|
||||
trace_id: "trace-stream-provider-chunks-usage-1".to_string(),
|
||||
report_kind: "openai_cli_stream_success".to_string(),
|
||||
report_context: Some(json!({
|
||||
"client_api_format": "openai:cli",
|
||||
"provider_api_format": "openai:cli",
|
||||
"client_api_format": "openai:responses",
|
||||
"provider_api_format": "openai:responses",
|
||||
})),
|
||||
status_code: 200,
|
||||
headers: BTreeMap::new(),
|
||||
@@ -2869,6 +2870,7 @@ mod tests {
|
||||
response_id: Some("resp_123".to_string()),
|
||||
model: Some("gpt-5.5".to_string()),
|
||||
observed_finish: true,
|
||||
unknown_event_count: 0,
|
||||
parser_error: None,
|
||||
}),
|
||||
telemetry: None,
|
||||
@@ -2904,8 +2906,8 @@ mod tests {
|
||||
body_ref: None,
|
||||
},
|
||||
stream: true,
|
||||
client_api_format: "openai:cli".to_string(),
|
||||
provider_api_format: "openai:cli".to_string(),
|
||||
client_api_format: "openai:responses".to_string(),
|
||||
provider_api_format: "openai:responses".to_string(),
|
||||
model_name: Some("gpt-5.4".to_string()),
|
||||
proxy: None,
|
||||
tls_profile: None,
|
||||
@@ -2924,8 +2926,8 @@ mod tests {
|
||||
trace_id: "trace-stream-usage-2".to_string(),
|
||||
report_kind: "openai_cli_stream_success".to_string(),
|
||||
report_context: Some(json!({
|
||||
"client_api_format": "openai:cli",
|
||||
"provider_api_format": "openai:cli",
|
||||
"client_api_format": "openai:responses",
|
||||
"provider_api_format": "openai:responses",
|
||||
})),
|
||||
status_code: 200,
|
||||
headers: BTreeMap::new(),
|
||||
@@ -3135,8 +3137,8 @@ mod tests {
|
||||
body_ref: None,
|
||||
},
|
||||
stream: false,
|
||||
client_api_format: "openai:cli".to_string(),
|
||||
provider_api_format: "openai:cli".to_string(),
|
||||
client_api_format: "openai:responses".to_string(),
|
||||
provider_api_format: "openai:responses".to_string(),
|
||||
model_name: Some("gpt-5.4".to_string()),
|
||||
proxy: None,
|
||||
tls_profile: None,
|
||||
@@ -3146,8 +3148,8 @@ mod tests {
|
||||
trace_id: "trace-sync-upstream-stream-1".to_string(),
|
||||
report_kind: "openai_cli_sync_success".to_string(),
|
||||
report_context: Some(json!({
|
||||
"client_api_format": "openai:cli",
|
||||
"provider_api_format": "openai:cli",
|
||||
"client_api_format": "openai:responses",
|
||||
"provider_api_format": "openai:responses",
|
||||
"upstream_is_stream": true
|
||||
})),
|
||||
status_code: 200,
|
||||
@@ -3315,8 +3317,8 @@ mod tests {
|
||||
body_ref: Some("blob://provider-request-1".to_string()),
|
||||
},
|
||||
stream: false,
|
||||
client_api_format: "openai:cli".to_string(),
|
||||
provider_api_format: "openai:cli".to_string(),
|
||||
client_api_format: "openai:responses".to_string(),
|
||||
provider_api_format: "openai:responses".to_string(),
|
||||
model_name: Some("gpt-5.4".to_string()),
|
||||
proxy: None,
|
||||
tls_profile: None,
|
||||
@@ -3326,8 +3328,8 @@ mod tests {
|
||||
trace_id: "trace-sync-body-ref-1".to_string(),
|
||||
report_kind: "openai_cli_sync_success".to_string(),
|
||||
report_context: Some(json!({
|
||||
"client_api_format": "openai:cli",
|
||||
"provider_api_format": "openai:cli",
|
||||
"client_api_format": "openai:responses",
|
||||
"provider_api_format": "openai:responses",
|
||||
"trace_id": "trace-sync-body-ref-1"
|
||||
})),
|
||||
status_code: 200,
|
||||
@@ -3379,7 +3381,7 @@ mod tests {
|
||||
},
|
||||
stream: true,
|
||||
client_api_format: "openai:chat".to_string(),
|
||||
provider_api_format: "openai:cli".to_string(),
|
||||
provider_api_format: "openai:responses".to_string(),
|
||||
model_name: Some("gpt-5.4".to_string()),
|
||||
proxy: None,
|
||||
tls_profile: None,
|
||||
@@ -3390,7 +3392,7 @@ mod tests {
|
||||
report_kind: "openai_chat_stream_success".to_string(),
|
||||
report_context: Some(json!({
|
||||
"client_api_format": "openai:chat",
|
||||
"provider_api_format": "openai:cli",
|
||||
"provider_api_format": "openai:responses",
|
||||
"trace_id": "trace-stream-bytes-1"
|
||||
})),
|
||||
status_code: 200,
|
||||
@@ -3464,8 +3466,8 @@ mod tests {
|
||||
body_ref: None,
|
||||
},
|
||||
stream: true,
|
||||
client_api_format: "openai:cli".to_string(),
|
||||
provider_api_format: "openai:cli".to_string(),
|
||||
client_api_format: "openai:responses".to_string(),
|
||||
provider_api_format: "openai:responses".to_string(),
|
||||
model_name: Some("gpt-5.4".to_string()),
|
||||
proxy: None,
|
||||
tls_profile: None,
|
||||
@@ -3475,8 +3477,8 @@ mod tests {
|
||||
trace_id: "trace-stream-usage-large-1".to_string(),
|
||||
report_kind: "openai_cli_stream_success".to_string(),
|
||||
report_context: Some(json!({
|
||||
"client_api_format": "openai:cli",
|
||||
"provider_api_format": "openai:cli",
|
||||
"client_api_format": "openai:responses",
|
||||
"provider_api_format": "openai:responses",
|
||||
})),
|
||||
status_code: 200,
|
||||
headers: BTreeMap::new(),
|
||||
@@ -3531,7 +3533,7 @@ mod tests {
|
||||
})),
|
||||
stream: false,
|
||||
client_api_format: "claude:cli".to_string(),
|
||||
provider_api_format: "openai:cli".to_string(),
|
||||
provider_api_format: "openai:responses".to_string(),
|
||||
model_name: Some("gpt-5.4".to_string()),
|
||||
proxy: None,
|
||||
tls_profile: None,
|
||||
@@ -3542,7 +3544,7 @@ mod tests {
|
||||
report_kind: "claude_cli_sync_success".to_string(),
|
||||
report_context: Some(json!({
|
||||
"client_api_format": "claude:cli",
|
||||
"provider_api_format": "openai:cli",
|
||||
"provider_api_format": "openai:responses",
|
||||
"needs_conversion": true,
|
||||
"original_request_body": null,
|
||||
})),
|
||||
@@ -3585,7 +3587,7 @@ mod tests {
|
||||
body: RequestBody::from_json(json!({"model": "gpt-5.4"})),
|
||||
stream: false,
|
||||
client_api_format: "claude:cli".to_string(),
|
||||
provider_api_format: "openai:cli".to_string(),
|
||||
provider_api_format: "openai:responses".to_string(),
|
||||
model_name: Some("gpt-5.4".to_string()),
|
||||
proxy: None,
|
||||
tls_profile: None,
|
||||
@@ -3596,7 +3598,7 @@ mod tests {
|
||||
report_kind: "claude_cli_sync_success".to_string(),
|
||||
report_context: Some(json!({
|
||||
"client_api_format": "claude:cli",
|
||||
"provider_api_format": "openai:cli",
|
||||
"provider_api_format": "openai:responses",
|
||||
"needs_conversion": true,
|
||||
})),
|
||||
status_code: 200,
|
||||
|
||||
Reference in New Issue
Block a user