ai-anthropic: 400 on signed thinking blocks after compaction rewrites history (missing block_binding drop_block)
メンテナーはふだん 1 日以内に返信
@tombeckenham がすでに取り組んでいます。
2026年10月31日 から。
評価
この issue はまだ評価されていません。
説明
What happens
With @tanstack/ai-anthropic 1.0.0, @tanstack/ai-harness 0.1.1 and withCompaction (summarizeOldest), the first model call after a compaction fails with a 400 from Anthropic (Claude Sonnet 5.5, reasoning: 'medium'):
messages.1.content.1: Invalid `signature` in `thinking` block. The block is bound to a different conversation. Remove the block, or set `thinking.block_binding.prefix_mismatch_behavior` to "drop_block". That setting requires the `thinking-binding-controls-2026-08-01` value in ...
Compaction replaces the earlier messages with a summary, so the signed thinking blocks of the kept turns no longer match the conversation prefix they were bound to.
Expected
The adapter sends thinking.block_binding: { prefix_mismatch_behavior: "drop_block" } with the thinking-binding-controls-2026-08-01 beta whenever thinking is on (pi-ai does this), or drops thinking blocks before the rewritten prefix itself.
Workaround
A custom fetch on anthropicText(model, { fetch, midConversationChannels: true }) that adds the field and the beta header. With it, the same 5-question run with compaction completes. (Passing fetch turns midConversationChannels off, so it has to be set back on.)
Where
packages/ai-anthropic/src/text/reasoning.ts builds thinking without block_binding; checked on main at 3ce3085.
- 主要言語
- TypeScript
- スター
- 3.3k
- フォーク
- 378
- 平均マージ
- 1日 1分
- マージ済み PR(30日)
- 208
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TanStack/ai のほかの issue
-
openai-base: a Responses max_output_tokens cutoff ends as RUN_ERROR without usage instead of finishReason 'length'対応中かも @tombeckenham が 4 日前に担当しました。 オープンhas-pr waiting-on: maintainer
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
TanStack/ai#1916 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
openai-base: leaving a Responses stream at `response.completed` aborts its request, so complete calls are logged as client-closed (499)対応中かも @AlemTuzlak が今日担当しました。 オープンhas-pr waiting-on: maintainer
メンテナーはふだん 1 日以内に返信
-
StreamProcessor folds long text and tool-call streams in quadratic memory and time対応中かも @jherr が 1 日前に担当しました。 オープンwaiting-on: maintainer
メンテナーはふだん 1 日以内に返信
-
ai-harness: view.dispose() doesn't cancel snapshot, transcript or describe requests対応中かも @AlemTuzlak が 1 日前に担当しました。 オープンneeds-repro waiting-on: maintainer
TanStack/ai#1960 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Chat UI: a fallback widget for tool calls whose names aren't known when the kit is created対応中かも @AlemTuzlak が 3 日前に担当しました。 オープンwaiting-on: maintainer
難易度 4/5 1〜2日 初心者へのやさしさ 58/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
🐛 bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
LibreChat-AI/LibreChat#17733 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
TypeStrong/typedoc#3150 ·
-
accessibility bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
Normalize image-source MIME types before SVG dispatch対応中かも @HarsH-1877 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
tscircuit/image-utils#58 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
メンテナーはふだん 2 日以内に返信