fix(gateway): support openai image accept negotiation

This commit is contained in:
zhefox
2026-06-08 20:40:30 +08:00
parent 82040bfc21
commit 04ba8cbe9e
8 changed files with 273 additions and 10 deletions
@@ -2183,6 +2183,11 @@ async fn provider_query_execute_openai_image_test_candidate(
headers: &parts.headers,
auth_header: &auth_header,
auth_value: &auth_value,
accept: if is_codex || is_chatgpt_web {
"text/event-stream"
} else {
"application/json"
},
header_rules: transport.endpoint.header_rules.as_ref(),
provider_request_body: &provider_request_body,
original_request_body: &request_body,