You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Claude Code → Azure OpenAI: 400 Invalid 'user': string too long (metadata.user_id forwarded verbatim) #5705
Claude Code requests routed to an Azure OpenAI model fail with HTTP 400, because anthropicToResponsesTranslation copies metadata.user_id verbatim into the Responses user field.
Claude Code sends metadata.user_id as a JSON string (device id, account uuid, session id) of about 186 characters. OpenAI-compatible Responses backends such as Azure OpenAI cap user at 64 characters and reject the request. The ChatGPT backend accepts it, so Codex-native routes work, while every Azure route from Claude Code or the Claude Desktop Code tab fails.
The value is copied at src/claude/inbound.ts:445 (body.user = raw.metadata.user_id;). The same block already hashes user_id to build prompt_cache_key.
Reproduction
Configure an azure-openai provider (adapter: "azure-openai", base URL https://<resource>.services.ai.azure.com/openai/v1) with gpt-6-astra.
Apply the first-party Claude Desktop profile with ocx claude desktop apply, or launch through ocx claude.
Run claude -p "Reply only: OK" --model <slot alias of azure-openai/gpt-6-astra>.
The request fails. The same prompt sent with curl to /v1/messages without metadata succeeds, and a Codex-native slot such as gpt-5.6-sol (native) succeeds from Claude Code.
Version
2.64.0 (npm, latest)
Operating system
macOS (Darwin 27.0.0, arm64)
Provider and model
azure-openai / gpt-6-astra, gpt-5.6-sol
Logs or error output
API Error: 400 Invalid 'user': string too long. Expected a string with maximum length 64, but got a string with length 186 instead.
Suggested fix
Keep user when it has 64 characters or fewer. Otherwise send the SHA-256 hex digest (64 characters) that the block already computes for prompt_cache_key. I verified this locally: Azure slots answer normally from Claude Code, and native and Anthropic routes are unaffected. A PR follows.
Fixed on dev by bundle #5738 (squash-merged as df61bce); it will ship in the next release. Closing manually because dev is not the default branch, so GitHub does not auto-close. If you still see this on a build that includes df61bce, please reopen with the version and a redacted reproduction.
Activity
fix(responses): bundle L2 — Responses and streaming fixes (#5706, #5683…
lidge-jun commentedon Sep 24, 2026
Fixed on
devby bundle #5738 (squash-merged as df61bce); it will ship in the next release. Closing manually becausedevis not the default branch, so GitHub does not auto-close. If you still see this on a build that includes df61bce, please reopen with the version and a redacted reproduction.