fix: remove unsupported 'user' parameter from OpenAI Responses API requests - #3144
Open
mweichert wants to merge 1 commit into
Open
fix: remove unsupported 'user' parameter from OpenAI Responses API requests#3144mweichert wants to merge 1 commit into
mweichert wants to merge 1 commit into
Conversation
mweichert
force-pushed
the
bugfix/openai-responses-user
branch
2 times, most recently
from
January 24, 2026 03:06
38df742 to
85b2527
Compare
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
force-pushed
the
bugfix/openai-responses-user
branch
from
January 31, 2026 17:46
85b2527 to
adbfa63
Compare
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 unsupporteduserparameter.Problem
When using models routed through OpenAI's Responses API (
/v1/responses), requests fail with:This happens because Letta unconditionally sets the
userparameter for all OpenAI requests, but the Responses API does not support it.Evidence
The
userparameter is not supported by the Responses API:useris not among them.useras available in the Responses API.useris a Chat Completions-specific parameter.Solution
I've removed the
userparameter assignment from thebuild_request_data_responsesmethod inletta/llm_api/openai_client.py.Note: The Chat Completions API (
/v1/chat/completions) does support theuserparameter, so the equivalent code inbuild_request_dataremains unchanged.Thanks for reviewing! Let me know if you have any questions.