Skip to content

fix(translator): sanitize foreign encrypted_content in WithCompat paths - #224

Open
warelik wants to merge 2 commits into
kaitranntt:mainfrom
warelik:fix/encrypted-content-withcompat
Open

fix(translator): sanitize foreign encrypted_content in WithCompat paths#224
warelik wants to merge 2 commits into
kaitranntt:mainfrom
warelik:fix/encrypted-content-withcompat

Conversation

@warelik

@warelik warelik commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Stops two WithCompat request translators from forwarding raw, foreign, or opaque reasoning signatures to non-Grok upstreams before the xAI gate.

  • ConvertOpenAIResponsesRequestToClaudeWithCompat now clears the signature field for incompatible encrypted_content instead of using the raw value.
  • ConvertClaudeRequestToGeminiWithCompat now normalizes or replaces incompatible thinking.signature values with the Gemini bypass sentinel instead of copying them verbatim.

Same fix is proposed upstream in stock via router-for-me/CLIProxyAPI#5167.

Integration counterpart (fork PR with full CI run): warelik#5

- TestDegradationRequestEffortMapping exercises all 33 registered
  request pairs (stream and non-stream) for high and no-reasoning
  payload shapes.
- TestDegradationResponseDoctrines marks the four known current-main
  violations with their open PRs: kaitranntt#190, kaitranntt#191, kaitranntt#193.
warelik added a commit to warelik/CLIProxyAPIPlus that referenced this pull request Aug 22, 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