Skip to content

fix(proxy): normalize Responses user identifiers - #468

Open
romius wants to merge 1 commit into
codemie-ai:mainfrom
romius:fix/profiles-codemie-codex
Open

fix(proxy): normalize Responses user identifiers#468
romius wants to merge 1 commit into
codemie-ai:mainfrom
romius:fix/profiles-codemie-codex

Conversation

@romius

@romius romius commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes Azure Responses API failures caused by project profiles producing user identifiers longer than Azure’s 64-character limit. The fix applies consistently to Codex, OpenCode, CodeMie Code, and VS Code BYOK traffic.

Changes

  • Generalized the VS Code-specific normalizer for all supported Responses API clients.
  • Adds a short client fallback when user is missing or invalid.
  • Preserves short identifiers and replaces long ones with stable 32-character SHA-256 hashes.
  • Retains the existing VS Code plugin export for backward compatibility.
  • Recalculates Content-Length without logging identity values.

Impact

Before: Codex and OpenCode requests using affected project profiles could fail with Invalid 'user': string too long.

After: Responses API requests carry a bounded, stable identifier before downstream namespacing. Personal profiles and non-Responses traffic remain unchanged.

Checklist

  • Self-reviewed
  • Manual testing performed
  • Documentation updated (if needed)
  • No breaking changes (or clearly documented)

@romius
romius marked this pull request as ready for review August 6, 2026 08:29
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