fix(translator): strip client_metadata when converting openai-responses to openai

client_metadata is an OpenAI Responses API-specific field. When translating
openai-responses requests to openai (Chat Completions), it leaked through
to providers like NVIDIA, which rejected it with a 400 "Unsupported
parameter". Strip it in the Responses-specific cleanup block alongside
input, instructions, store, and reasoning.
This commit is contained in:
qianze
2026-07-15 17:38:22 +07:00
committed by decolua
parent 542a088c04
commit e567ba800f

View File

@@ -189,6 +189,7 @@ export function openaiResponsesToOpenAIRequest(model, body, stream, credentials)
delete result.prompt_cache_key;
delete result.store;
delete result.reasoning;
delete result.client_metadata;
return result;
}