[PR #10649] grammar: allocate buffer based on schema length #13312

Closed
opened 2026-04-13 00:23:30 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/ollama/ollama/pull/10649

State: closed
Merged: Yes


Structured outputs for applications that do NER can generate grammars that exceed the static buffer allocated in SchemaToGrammar(). Instead, allocate the buffer based on the length of the schema.

Fixes: #10646

**Original Pull Request:** https://github.com/ollama/ollama/pull/10649 **State:** closed **Merged:** Yes --- Structured outputs for applications that do NER can generate grammars that exceed the static buffer allocated in SchemaToGrammar(). Instead, allocate the buffer based on the length of the schema. Fixes: #10646
GiteaMirror added the pull-request label 2026-04-13 00:23:31 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#13312