Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Responses replay puts assistant text between function_call and function_call_output

Abierto
#1,792 0 comentarios 0 reacciones 1 asignado Ver en GitHub

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

waiting-on: maintainer
TanStack AI version
  • @tanstack/ai 0.68.0
  • @tanstack/ai-openai 0.29.1
  • @tanstack/openai-base 0.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

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de TanStack/ai

Todos los issues de TanStack/ai

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.