AI tools integration fix#747
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors how 'uniqueItems' constraints are applied to tool schemas to prevent small Ollama models from looping values. Instead of hardcoding these constraints in the shared 'tools.py' file, the logic has been moved to a new recursive utility function, '_inject_unique_items', in 'prompts.py', which dynamically injects the constraint only for the Ollama structured-output path. The reviewer suggested an optimization for the recursive traversal in '_inject_unique_items' to improve readability and reduce memory overhead by avoiding key snapshots during iteration.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|



AI tools integration fix - #746
PR test builds:
ghcr.io/neptunehub/audiomuse-ai:pr-747ghcr.io/neptunehub/audiomuse-ai:pr-747-nvidiaghcr.io/neptunehub/audiomuse-ai:pr-747-noavx2