Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🐛 fix: add end-user info on OpenAI Responses API call (#12134)

Antoine Roux72a85ac1515e
diff --git a/packages/model-runtime/src/core/openaiCompatibleFactory/index.ts b/packages/model-runtime/src/core/openaiCompatibleFactory/index.ts
index d5fbc5dd394..1d5cd470f1a 100644
--- a/packages/model-runtime/src/core/openaiCompatibleFactory/index.ts
+++ b/packages/model-runtime/src/core/openaiCompatibleFactory/index.ts
@@ -907,6 +907,7 @@ export const createOpenAICompatibleRuntime = <T extends Record<string, any> = an
store: false,
stream: !isStreaming ? undefined : isStreaming,
tools: tools?.map((tool) => this.convertChatCompletionToolToResponseTool(tool)),
+ user: options?.user,
} as OpenAI.Responses.ResponseCreateParamsStreaming | OpenAI.Responses.ResponseCreateParams;
if (debugParams?.responses?.()) {