Skip to content

model/parsers: rework gemma4 tool call handling - #15306

Merged
drifkin merged 1 commit into
mainfrom
drifkin/gemma4-tool-parsing
Apr 3, 2026
Merged

drifkin merged 1 commit into
mainfrom
drifkin/gemma4-tool-parsing

Conversation

@drifkin

@drifkin drifkin commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Replace the custom Gemma4 argument normalizer with a stricter reference-style conversion: preserve Gemma-quoted strings, quote bare keys, and then unmarshal the result as JSON.

This keeps quoted scalars as strings, preserves typed unquoted values, and adds test coverage for malformed raw-quoted inputs that the reference implementation rejects.

Replace the custom Gemma4 argument normalizer with a stricter
reference-style conversion: preserve Gemma-quoted strings, quote bare
keys, and then unmarshal the result as JSON.

This keeps quoted scalars as strings, preserves typed unquoted values,
and adds test coverage for malformed raw-quoted inputs that the
reference implementation rejects.
@drifkin
drifkin requested a review from jmorganca April 3, 2026 21:30
@drifkin
drifkin merged commit 49d5fd5 into main Apr 3, 2026
9 checks passed
@drifkin
drifkin deleted the drifkin/gemma4-tool-parsing branch April 3, 2026 21:35
rick-github pushed a commit to rick-github/ollama that referenced this pull request Jul 13, 2026
Replace the custom Gemma4 argument normalizer with a stricter
reference-style conversion: preserve Gemma-quoted strings, quote bare
keys, and then unmarshal the result as JSON.

This keeps quoted scalars as strings, preserves typed unquoted values,
and adds test coverage for malformed raw-quoted inputs that the
reference implementation rejects.
electricwolfemarshmallowhypertext pushed a commit to electricwolfemarshmallowhypertext/ollama that referenced this pull request Oct 12, 2026
Replace the custom Gemma4 argument normalizer with a stricter
reference-style conversion: preserve Gemma-quoted strings, quote bare
keys, and then unmarshal the result as JSON.

This keeps quoted scalars as strings, preserves typed unquoted values,
and adds test coverage for malformed raw-quoted inputs that the
reference implementation rejects.
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