Skip to content

fix openai tool use#251

Merged
zomux merged 1 commit intodevelopfrom
issuefix/fix-openai-tool-use
Jan 12, 2026
Merged

fix openai tool use#251
zomux merged 1 commit intodevelopfrom
issuefix/fix-openai-tool-use

Conversation

@zomux
Copy link
Copy Markdown
Contributor

@zomux zomux commented Jan 12, 2026

No description provided.

Copilot AI review requested due to automatic review settings January 12, 2026 08:23
@vercel
Copy link
Copy Markdown

vercel bot commented Jan 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
openagents-studio Ready Ready Preview, Comment Jan 12, 2026 8:25am

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_id field 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.

Comment on lines 354 to 360
messages.append(
{"role": "tool", "content": "Action chain completed."}
{
"role": "tool",
"tool_call_id": tool_call["id"],
"content": "Action chain completed.",
}
)
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@zomux zomux merged commit 820b5f4 into develop Jan 12, 2026
8 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants