Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Responses replay puts assistant text between function_call and function_call_output

未关闭
#1,792 0 条评论 0 个 reaction 已指派 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 小时
30 天内合并 PR
252

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

TanStack/ai 的其他 Issue

查看 TanStack/ai 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。