Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This pull request fixes a bug in the OpenAI tool use implementation by adding the required tool_call_id field to the tool response message when the finish tool is called.
Changes:
- Added
tool_call_idfield to the tool role message in the finish tool path to comply with OpenAI API requirements
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| messages.append( | ||
| {"role": "tool", "content": "Action chain completed."} | ||
| { | ||
| "role": "tool", | ||
| "tool_call_id": tool_call["id"], | ||
| "content": "Action chain completed.", | ||
| } | ||
| ) |
There was a problem hiding this comment.
The finish tool code path lacks dedicated test coverage. While the fix correctly adds the required tool_call_id field to match the OpenAI API specification (consistent with lines 378, 393, and 409), there should be a test that specifically exercises the finish tool scenario to verify that the tool response message is properly formatted when the agent uses the finish tool.
No description provided.