ai-anthropic: 400 on signed thinking blocks after compaction rewrites history (missing block_binding drop_block)
Los mantenedores suelen responder en 1 día
@tombeckenham ya está trabajando en esto.
Desde el 31/10/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 3.3k
- Forks
- 378
- Merge medio
- 1 d 2 h
- PR fusionados (30 d)
- 219
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de TanStack/ai
-
openai-base: a Responses max_output_tokens cutoff ends as RUN_ERROR without usage instead of finishReason 'length'Posiblemente ocupada @tombeckenham la tomó hace 5 días. Abiertohas-pr waiting-on: maintainer
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
TanStack/ai#1916 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
openai-base: leaving a Responses stream at `response.completed` aborts its request, so complete calls are logged as client-closed (499)Posiblemente ocupada @AlemTuzlak la tomó hace 1 día. Abiertohas-pr waiting-on: maintainer
TanStack/ai#1965 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
StreamProcessor folds long text and tool-call streams in quadratic memory and timePosiblemente ocupada @jherr la tomó hace 1 día. Abiertowaiting-on: maintainer
TanStack/ai#1963 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
ai-harness: view.dispose() doesn't cancel snapshot, transcript or describe requestsPosiblemente ocupada @AlemTuzlak la tomó hace 2 días. Abiertoneeds-repro waiting-on: maintainer
TanStack/ai#1960 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Chat UI: a fallback widget for tool calls whose names aren't known when the kit is createdPosiblemente ocupada @AlemTuzlak la tomó hace 4 días. Abiertowaiting-on: maintainer
Dificultad 4/5 1-2 días Aptitud para principiantes 58/100
TanStack/ai#1953 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de TanStack/ai
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
unocss/unocss#5421 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
needs-area
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Azure/typespec-azure#5936 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 Medio día Aptitud para principiantes 72/100
vercel-labs/scriptc#2910 ·
Los mantenedores suelen responder en 1 día
-
automation missing-model model-sync provider:fireworks-ai
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
anomalyco/models.dev#12458 ·
Los mantenedores suelen responder en 1 día