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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user