Repository navigation
fix(py/plugins/ollama): preserve tool argument enum choices - #190
Merged
huangjeff5 merged 2 commits intoNov 30, 2026
Merged
Conversation
huangjeff5
approved these changes
Nov 30, 2026
huangjeff5
left a comment
Collaborator
There was a problem hiding this comment.
LGTM — clean fix. Left one non-blocking note on optional literals.
huangjeff5
enabled auto-merge (squash)
November 30, 2026 19:51
huangjeff5
disabled auto-merge
November 30, 2026 20:01
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.
A Genkit Python tool declared with
Literal['north', 'south']now sends those choices to Ollama in its tool schema. Previously the model only saw a string property and could choose a value that the tool would reject.Fixes #189.
Changes
Breaking changes
None.
Validation
httpx.MockTransport. The regression failed before the fix and checks string and integer enum values as well as an unrestricted string.NO_PROXY=*so local HTTP fixture transports handle the test requests.git diff --checkpassed.OpenAI Codex assisted with reproduction, implementation, testing, and drafting this pull request.