Skip to content

feat(llm): list available tools in unknown-function error output#6085

Merged
ShayneP merged 1 commit into
mainfrom
ShayneP/unknown-tool-error-names
Jun 16, 2026
Merged

feat(llm): list available tools in unknown-function error output#6085
ShayneP merged 1 commit into
mainfrom
ShayneP/unknown-tool-error-names

Conversation

@ShayneP

@ShayneP ShayneP commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

When a model hallucinates a tool name, the error fed back to it is just Unknown function: <name>, which gives it nothing to self-correct with — smaller models in particular tend to retry the same invalid name.

Include the available tool names in the error output (both in execute_function_call and the voice generation path) so the model can pick a valid tool on the next attempt.

When a model hallucinates a tool name, the error fed back to it only said
"Unknown function: <name>", giving it nothing to correct with. Include
the available tool names in the error output so the model can retry with
a valid tool on the next turn.
@ShayneP ShayneP requested a review from a team as a code owner June 12, 2026 20:26

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@ShayneP ShayneP merged commit e8a6592 into main Jun 16, 2026
26 checks passed
@ShayneP ShayneP deleted the ShayneP/unknown-tool-error-names branch June 16, 2026 14:18
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