Skip to content

fix: remove unsupported 'user' parameter from OpenAI Responses API requests - #3144

Open
mweichert wants to merge 1 commit into
letta-ai:mainfrom
mweichert:bugfix/openai-responses-user
Open

fix: remove unsupported 'user' parameter from OpenAI Responses API requests#3144
mweichert wants to merge 1 commit into
letta-ai:mainfrom
mweichert:bugfix/openai-responses-user

Conversation

@mweichert

Copy link
Copy Markdown

Hi Letta team! 👋

This PR fixes an issue where requests to the OpenAI Responses API (used by models like gpt-5.2-codex) fail with a 400 error due to an unsupported user parameter.

Problem

When using models routed through OpenAI's Responses API (/v1/responses), requests fail with:

Error code: 400 - {'detail': 'Unsupported parameter: user'}

This happens because Letta unconditionally sets the user parameter for all OpenAI requests, but the Responses API does not support it.

Evidence

The user parameter is not supported by the Responses API:

  1. Azure OpenAI Responses API docs: Lists all supported request parameters; user is not among them.
  2. Roo-Code #6862: Documents similar 400 errors for unsupported parameters in the Responses API.
  3. API comparison guides: Do not mention user as available in the Responses API.
  4. Chat Completions API reference: Confirms user is a Chat Completions-specific parameter.

Solution

I've removed the user parameter assignment from the build_request_data_responses method in letta/llm_api/openai_client.py.

Note: The Chat Completions API (/v1/chat/completions) does support the user parameter, so the equivalent code in build_request_data remains unchanged.

Thanks for reviewing! Let me know if you have any questions.

@mweichert
mweichert force-pushed the bugfix/openai-responses-user branch 2 times, most recently from 38df742 to 85b2527 Compare January 24, 2026 03:06
The OpenAI Responses API (/v1/responses) does not support the 'user'
parameter. This was causing 400 errors when using models like gpt-5.2-codex
that route through the Responses API.

The Chat Completions API (/v1/chat/completions) does support 'user', so
that code path remains unchanged.
@mweichert
mweichert force-pushed the bugfix/openai-responses-user branch from 85b2527 to adbfa63 Compare January 31, 2026 17:46
huangyingting pushed a commit to repomesh/letta that referenced this pull request May 17, 2026
huangyingting pushed a commit to repomesh/letta that referenced this pull request May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant