feat(tools): add native function schema for generate_image#5572
Open
Ninthkitten wants to merge 1 commit into
Open
feat(tools): add native function schema for generate_image#5572Ninthkitten wants to merge 1 commit into
Ninthkitten wants to merge 1 commit into
Conversation
generate_image existed only in the text-block dialect, so API models could never call it and instead hallucinated broken text invocations. Add a native schema plus argument conversion. Fixes odysseus-dev#5520. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
generate_imagewas exposed only in the fenced text-block tool dialect. Models driven through the OpenAI-compatible API with native function calling could never see or invoke it, and instead hallucinated malformed text-block calls that went nowhere. This PR adds a native function schema forgenerate_image(mirroring the existingedit_imageschema), registers its required argument, and converts incoming native calls to the internal tool block. Text-dialect behaviour is unchanged.Target branch
dev, notmain.Linked Issue
Fixes #5520
Type of Change
Checklist
devdocker compose up) and verified the change works end-to-end. Type-checks and unit tests are not enough.How to Test
generate_imagetool is enabled.generate_imagefunction available and typically emits a malformed fenced text call; nothing is generated.This fix has been running in a self-hosted deployment since 12 July, verified end-to-end with a local image model.
🤖 Generated with Claude Code