Responses replay puts assistant text between function_call and function_call_output
I maintainer di solito rispondono entro 1 giorno
@tombeckenham ci sta già lavorando.
Dal 15/10/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 3.2k
- Fork
- 361
- Merge medio
- 1g 8h
- PR unite (30g)
- 252
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di TanStack/ai
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 32/100
I maintainer di solito rispondono entro 1 giorno
-
move to modelschemasForse già presa @jherr l’ha presa oggi. Apertahas-pr waiting-on: maintainer
TanStack/ai#1788 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Text adapters fail chat()'s adapter constraint under exactOptionalPropertyTypes (midConversationChannels)Forse già presa @tombeckenham l’ha presa 1 giorno fa. Apertawaiting-on: maintainer
TanStack/ai#1777 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
chat(): sign the state of a suspended run so a resume without persistence cannot change itForse già presa @AlemTuzlak l’ha presa 2 giorni fa. Apertawaiting-on: maintainer
TanStack/ai#1740 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
@tanstack/ai-anthropic: a stream that fails after message_start loses the call's input usageForse già presa @AlemTuzlak l’ha presa 2 giorni fa. Apertawaiting-on: maintainer
TanStack/ai#1735 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
xdjs/MusicNerdWeb#1532 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
sebastian-software/ardo#352 ·
I maintainer di solito rispondono entro 1 giorno
-
@react95/core good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 3 giorni
-
@shikijs/stream: `ShikiStreamTokenizer.clone()` shares its `tokensStable` array with the originalForse già presa @xyrolle l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 6 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno