# [Bug] `/v1/responses` endpoint forwards unsupported `user` parameter to upstream, causing 400 error
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 82/100
Research direction
Start in internal/service/openai_gateway_service.go around line 1914, where the Responses API unsupportedFields list is defined. Reproduce the POST /v1/responses request with a user field and verify that the forwarded request no longer includes it and the upstream 400 error is resolved.
Written by the indexing model from the issue text.
Description
[Bug] /v1/responses endpoint forwards unsupported user parameter to upstream, causing 400 error
Description
When clients (e.g., LobeHub v2) send requests to the /v1/responses endpoint with a user parameter, Sub2API forwards this parameter to the upstream OpenAI API without filtering it out. The upstream API rejects the request with a 400 Bad Request error: Unsupported parameter: user.
This issue affects models like gpt-5.4, gpt-5.3-codex, etc., when accessed through the Responses API endpoint.
Steps to Reproduce
- Send a POST request to
/v1/responses(or/responses) with a body that includes theuserfield:
{
"model": "gpt-5.4",
"stream": true,
"input": [
{"role": "user", "content": "hello"}
],
"user": "user_123"
}
-
Sub2API forwards the request to the upstream OpenAI API, including the
userparameter. -
The upstream API returns:
400 Bad Request - Unsupported parameter: user
Error Log
2026-03-24T19:44:46.925+0800 WARN handler/openai_gateway_handler.go:337 openai.forward_failed
{
"component": "handler.openai_gateway.responses",
"model": "gpt-5.4",
"stream": true,
"error": "upstream error: 400 message=Unsupported parameter: user"
}
Expected Behavior
The user parameter should be stripped from the request body before forwarding to the upstream API, similar to how other unsupported parameters (prompt_cache_retention, safety_identifier) are already handled.
Suggested Fix
In internal/service/openai_gateway_service.go, add "user" to the unsupportedFields list:
// Current code (line ~1914):
unsupportedFields := []string{"prompt_cache_retention", "safety_identifier"}
// Suggested fix:
unsupportedFields := []string{"prompt_cache_retention", "safety_identifier", "user"}
Environment
- Sub2API version: 0.1.104 (commit: 4f7629a4, built: 2026-03-20)
- Client: LobeHub v2.1.44
- Upstream: OpenAI API (OAuth accounts)
- Affected endpoint:
POST /v1/responsesandPOST /responses - Affected models: All models accessed via Responses API (gpt-5.4, gpt-5.3-codex, etc.)
Additional Context
- The
/v1/chat/completionsendpoint is NOT affected — only/v1/responses. - LobeHub v2 sends the
userparameter for user tracking purposes. The upstream OpenAI Responses API does not support this parameter. - Similar issues have been fixed before:
max_output_tokenswas handled in a similar way (ref: #831, PR #1107).
- Dominant language
- Go
- Stars
- 42.1k
- Forks
- 9k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 343
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Wei-Shaw/sub2api
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
All issues in Wei-Shaw/sub2api
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100