Skip to content

Add Granite tool parser - #1264

Open
jonpspri wants to merge 1 commit into
ml-explore:mainfrom
jonpspri:granite
Open

jonpspri wants to merge 1 commit into
ml-explore:mainfrom
jonpspri:granite

Conversation

@jonpspri

@jonpspri jonpspri commented May 9, 2026

Copy link
Copy Markdown

Summary

  • Add a Granite-specific tool parser for <tool_call> JSON payloads that tolerates extra trailing braces.
  • Keep the generic JSON tool parser strict while allowing Granite models to opt in via tool_parser_type: granite.
  • Add parser tests covering valid JSON, repeated trailing braces, nested arguments, and invalid trailing junk.

Tests

  • PYTHONPATH=. uv run pytest tests/test_tool_parsing.py

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants