openaiprovider: Chat tool continuation drops reasoning_content from the originating assistant message
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 74/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- go
調査の方向性
Start in the Go Chat Completions provider path used by openaiprovider.NewChatCompletionsAgent and trace how the assistant response is added to the automatic tool loop. Add a regression test with the fake HTTP transport and local lookup tool described in the issue. Done means the immediate follow-up includes the supplied reasoning_content, omits it when absent, and does not carry it into unrelated later turns.
索引モデルが issue の本文から書いたものです。
説明
Problem
When a Chat Completions endpoint returns reasoning_content alongside a tool call, the Go Chat provider omits that field from the assistant message on the next request. The tool runs and its result is paired with the correct call. However, an endpoint that requires the original field can reject the follow-up instead of completing the answer. We’ve observed this requirement with Kimi.
Reproduced on both v0.3.1 and main at 045c7be52783e6ae383c816cf9c64310f8d25240, using openaiprovider.NewChatCompletionsAgent and the standard automatic tool loop with streaming disabled.
How to reproduce
Use a fake HTTP transport and one local lookup tool. No API key or live endpoint is needed.
- Have the transport return a completion with
finish_reason: "tool_calls"and this assistant message:
{
"role": "assistant",
"content": "I'll look that up.",
"reasoning_content": "synthetic-marker",
"tool_calls": [{
"id": "call_1",
"type": "function",
"function": {"name": "lookup", "arguments": "{}"}
}]
}
- Let the automatic loop execute
lookup. Inspect themessagesarray in the next HTTP request.
Actual: The assistant message still contains call_1, and the tool result references call_1, but reasoning_content is missing.
Expected: For endpoints that require it, the assistant message containing call_1 should retain the exact value "synthetic-marker" on that immediate follow-up. If the endpoint didn’t supply the field, it should remain absent. The value shouldn’t appear in visible output, logs or unrelated later turns.
Related work and proposed contribution
PR #630 preserves reasoning that has already reached the automatic tool loop. This case occurs one step earlier: the Chat provider doesn’t carry the endpoint’s reasoning_content field into that loop.
We’ll open a PR linked to this issue with a proposed fix and a regression test. The test will check that reasoning_content is returned with the matching tool result when supplied, stays absent when omitted, and isn’t carried into unrelated later turns.
- 主要言語
- Go
- スター
- 683
- フォーク
- 70
- 平均マージ
- 17時間 50分
- マージ済み PR(30日)
- 64
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/agent-framework-go のほかの issue
-
Expose session state keys on the Go todo and agent-mode providers対応中かも @gabisonia が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
microsoft/agent-framework-go#1412 ·
メンテナーはふだん 1 日以内に返信
-
agentic-workflows
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
microsoft/agent-framework-go#1414 ·
メンテナーはふだん 1 日以内に返信
-
agentic-workflows
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
microsoft/agent-framework-go#1408 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
agentic-workflows
難易度 1/5 1時間未満 初心者へのやさしさ 20/100
microsoft/agent-framework-go#1406 ·
メンテナーはふだん 1 日以内に返信
-
agentic-workflows
難易度 3/5 半日 初心者へのやさしさ 28/100
microsoft/agent-framework-go#1398 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
microsoft/agent-framework-go の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
keyxmakerx/Chronicle#2616 ·
メンテナーはふだん 1 日以内に返信
-
go good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
メンテナーはふだん 1 日以内に返信
-
hive size:simple
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
nwverse/persona#12800 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信