Skip to content

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

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

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

Conversation

@warelik

@warelik warelik commented Aug 22, 2026

Copy link
Copy Markdown
Owner

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.

All existing internal/translator/..., internal/cache/..., and internal/runtime/executor/... tests pass; go build -o cli-proxy-api ./cmd/server is green.

- 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.
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