Repository navigation
fix(aikit): drop thinking from other models instead of sending it as text - #104
Merged
Merged
Conversation
Tool calls now carry the input modalities of the model they answer (`ToolCallContext.modelInput`). On a model without image input, `read` adds a note that the image will be omitted, next to the placeholder the transform puts in its place. A session test reads an image on a text-only model, switches to a vision model and snapshots both requests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…text Thinking from a different provider, protocol or model is now dropped, signed, unsigned and redacted alike. Sent as text, it made the new model read the old model's reasoning as part of its own replies, and signatures only verify on the model that produced them. Text and tool calls are kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # packages/harness/test/__artifacts__/tools.read.vision.json # packages/harness/test/tools.read.vision.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #102.
What
Message.transformMessagesnow drops thinking from a different provider, protocol or model (signed, unsigned and redacted alike). Before, readable thinking was sent as plain text.transform.tsnow describes the only case left: thinking the endpoint cannot replay natively..agents/**and.claude/**, sovp checkat the repo root passes.Why
Sent as text, the old model's reasoning showed up inside the new model's own earlier replies, and the new model could start writing its reasoning into the visible answer. Signatures and encrypted reasoning only verify on the model that produced them. Dropping the thinking also saves input tokens on every later request.
Tests
handoff.e2e.test.ts): claude-sonnet-4-6 ↔ openai-codex gpt-6-luna with thinking on, in both directions. It checks that no thinking text or signature reaches the other model's request, snapshots the request shape to__artifacts__/thinking-handoff.*.json, and continues the conversation live. Both directions fail on the old code.vp check,vp run typecheckand the aikit unit tests (286) pass.🤖 Generated with Claude Code