mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-27 00:04:32 +00:00
When a /responses forwarding loop has attempted an OpenAI passthrough account, sanitize every subsequent non-passthrough attempt by deriving its body from the immutable canonical request and dropping provider-specific encrypted reasoning input items in full. This prevents Bedrock-compatible accounts from rejecting Kiro reasoning IDs and encrypted_content, including on same-account retries and later non-passthrough failovers. Preserve JSON numbers exactly while sanitizing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>