fix(kiro): align thinking signature with bytecat shape#27
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors and enhances the Anthropic model identity resolution and thinking-signature synthesis. It introduces structured response identities (ResponseIdentityKind and ResponseModelIdentity) to handle multi-identity and platform conflict probes in both Chinese and English, alongside updating synthetic signature generation to match recent Anthropic field layouts. Feedback on the changes highlights opportunities to prevent potential panics by using safe string slicing (.get()) instead of direct indexing, and to ensure case-insensitive matching in Chinese conflict probes by performing substring checks on the lowercase content representation.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1dd465f4e5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8f48b62c92
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
Align Kiro's Anthropic thinking signature shape with the Bytecat-observed response format while keeping a single canonical signature path.
Root cause
The previous synthetic thinking signature used an older Claude-shaped envelope with header kind
12, no header field8, and a minimum body padding of 619 bytes. This made short thinking signatures much larger than the Bytecat samples and left identity synthetic thinking visibly different from Bytecat-like responses.What changed
14, include an 8-byte header field8, and use short/long Bytecat-like body lengths while still binding the signature bytes to the full thinking text.Tests
CARGO_TARGET_DIR=/mnt/wsl/data4tb/static-flow-data/cargo-target/static_flow cargo test -p llm-access-kiro --jobs 4CARGO_TARGET_DIR=/mnt/wsl/data4tb/static-flow-data/cargo-target/static_flow cargo test -p llm-access --jobs 4CARGO_TARGET_DIR=/mnt/wsl/data4tb/static-flow-data/cargo-target/static_flow cargo clippy -p llm-access-kiro -p llm-access --jobs 4 -- -D warningsgit diff --check