Responses replay puts assistant text between function_call and function_call_output
Los mantenedores suelen responder en 1 día
@tombeckenham ya está trabajando en esto.
Desde el 15/10/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
TanStack AI version
@tanstack/ai0.68.0@tanstack/ai-openai0.29.1@tanstack/openai-base0.13.1
Provider / API
DeepSeek Responses API, called through TanStack's OpenAICompatibleResponsesAdapter at /responses.
Describe the bug and steps to reproduce it
When an assistant ModelMessage contains both non-empty text content and a function tool call, and the next ModelMessage contains the matching tool result, the shared Responses conversion currently serializes the assistant items in this order:
function_call
message (assistant text)
function_call_output
DeepSeek rejects this request with HTTP 400 and No tool output found for function call.
In a live A/B test using the same tool call and matching call_id, moving the assistant message before the function_call produced this order:
message (assistant text)
function_call
function_call_output
That request succeeded. The call_id and tool output were unchanged. This reproduces with reasoning enabled as well; changing the reasoning item's text representation did not change the result.
Expected behavior
The Responses adapter should avoid placing the assistant message between a function_call and its matching function_call_output, or expose a provider-specific way to choose this serialization order if the current order is intentional for other providers.
Additional context
This seems distinct from the reasoning/function-call replay ordering issue in #1345: here the intervening item is an assistant message, and DeepSeek reports that the corresponding tool output is missing.
The current workaround is a DeepSeek-specific subclass that calls super.convertMessagesToInput(messages), reorders the assistant message before function calls, and leaves the shared tool-output conversion intact.
- Lenguaje dominante
- TypeScript
- Estrellas
- 3.2k
- Forks
- 361
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 252
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
-
Dificultad 4/5 3-5 días Aptitud para principiantes 32/100
Los mantenedores suelen responder en 1 día
-
move to modelschemasPosiblemente ocupada @jherr la tomó hoy. Abiertohas-pr waiting-on: maintainer
TanStack/ai#1788 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Text adapters fail chat()'s adapter constraint under exactOptionalPropertyTypes (midConversationChannels)Posiblemente ocupada @tombeckenham la tomó hace 1 día. Abiertowaiting-on: maintainer
TanStack/ai#1777 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
chat(): sign the state of a suspended run so a resume without persistence cannot change itPosiblemente ocupada @AlemTuzlak la tomó hace 2 días. Abiertowaiting-on: maintainer
TanStack/ai#1740 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
@tanstack/ai-anthropic: a stream that fails after message_start loses the call's input usagePosiblemente ocupada @AlemTuzlak la tomó hace 2 días. Abiertowaiting-on: maintainer
TanStack/ai#1735 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de TanStack/ai
Issues similares
-
test: make the #3408 Claude OAuth token fixture obviously fake so secret scanners stop flagging itAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
code-yeongyu/senpi#3436 ·
Los mantenedores suelen responder en 1 día
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
lingdojo/kana-dojo#32505 · 1 comentario · 5 reacciones ·
Los mantenedores suelen responder en 1 día
-
code-quality refactoring
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
github/gh-aw-firewall#10040 ·
Los mantenedores suelen responder en 1 día
-
review-followup
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
griffinwork40/agent-afk#3868 ·
Los mantenedores suelen responder en 1 día
-
area: import-export bug status: needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
amatya-aditya/obsidian-rss-dashboard#1191 ·
Los mantenedores suelen responder en 1 día