Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Responses replay puts assistant text between function_call and function_call_output

オープン
#1,792 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@tombeckenham がすでに取り組んでいます。

2026年10月15日 から。

評価

この issue はまだ評価されていません。

説明

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.

主要言語
TypeScript
スター
3.2k
フォーク
361
平均マージ
1日 8時間
マージ済み PR(30日)
266

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TanStack/ai のほかの issue

TanStack/ai の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。