Skip to content

fix(translator): drop invalid reasoning signatures in interactions→Responses - #225

Open
warelik wants to merge 1 commit into
kaitranntt:mainfrom
warelik:ao/airouters-17-gpt-codex-reasoning
Open

fix(translator): drop invalid reasoning signatures in interactions→Responses#225
warelik wants to merge 1 commit into
kaitranntt:mainfrom
warelik:ao/airouters-17-gpt-codex-reasoning

Conversation

@warelik

@warelik warelik commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Summary

The Interactions → OpenAI Responses response translator was copying unvalidated reasoning signatures from thought steps (thoughtSignature, signature, encrypted_content from non-GPT providers) into reasoning.encrypted_content. This violates the GPT/Codex doctrine that only valid GPT/Codex reasoning blobs can appear in Responses reasoning items.

Fix

  • Add interactionsReasoningEncryptedContent helper that runs signature.InspectGPTReasoningSignature.
  • Apply it in interactionsThoughtSignature, the thought_signature step-delta handler, and the reasoning item builders.
  • Update tests: valid gAAAA... signature is preserved; invalid foreign signature is dropped while visible summary remains.

Files

  • internal/translator/openai/interactions/responses/interactions_openai_responses_response.go
  • internal/translator/openai/interactions/responses/interactions_openai_responses_response_test.go

Upstream link

Verification

  • go build -o test-output ./cmd/server && rm test-output
  • go test ./...
  • gofmt -w .

Claim

This PR is opened by @warelik and is ready for review.

…sponses

Interactions thought signatures can come from non-GPT providers
(Gemini thoughtSignature, Claude signature, etc.). When translating
an interactions stream into OpenAI Responses, only a valid GPT/Codex
reasoning encrypted_content should appear in the reasoning item.
Foreign signatures are now filtered through InspectGPTReasoningSignature.

Tests updated: valid gAAAA signature is preserved, invalid foreign
signature is dropped.
@warelik
warelik force-pushed the ao/airouters-17-gpt-codex-reasoning branch from 9552176 to 119b955 Compare August 22, 2026 05:01
warelik added a commit to warelik/CLIProxyAPIPlus that referenced this pull request Aug 22, 2026
warelik added a commit to warelik/CLIProxyAPIPlus that referenced this pull request Aug 22, 2026
…atures in interactions→Responses (updated head)
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