-
-
Notifications
You must be signed in to change notification settings - Fork 200
GPT5.4长工具链调用稳定截断无法生成答案 #384
Description
Describe the bug
GPT5.4对于复杂工具调用情况如以下,在多于三次尝试中均稳定截断,无法产生最终回答。
可能原因
根据以下文档
https://developers.openai.com/api/docs/guides/latest-model
https://developers.openai.com/api/docs/guides/prompt-guidance
For long-running or tool-heavy GPT-5.4 flows in the Responses API, use the assistant message phase field to avoid early stopping and other misbehavior.
phase is optional at the API level, but we highly recommend using it. Use phase: "commentary" for intermediate assistant updates (such as preambles before tool calls) and phase: "final_answer" for the completed answer. Do not add phase to user messages.
If you use previous_response_id, that is usually the simplest path because prior assistant state is preserved. If you replay assistant history manually, preserve each original phase value.
Missing or dropped phase can cause preambles to be treated as final answers, which can degrade quality on multi-step tasks. For additional guidance and examples, see the GPT-5.4 prompting guide.
Reasoning models like GPT-5.4 break problems down step by step, producing an internal chain of thought that encodes their reasoning. To maximize performance, pass these reasoning items back to the model: this avoids re-reasoning and keeps interactions closer to the model’s training distribution. In multi-turn conversations, passing a previous_response_id automatically makes earlier reasoning items available. This is especially important when using tools—for example, when a function call requires an extra round trip. In these cases, either include them with previous_response_id or add them directly to input.
建议解决方案
加入对previous_response_id 和phase的支持可能会解决该问题。
Environment
Device: Mac mini m4
OS: MacOS 15.7.3
App Version: Master at 3a99d5b
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]Additional context
Additional information
[Paste any logs or additional context here]