Upstream: ggml-org#27217
tool_choice:"required" is accepted but the model can generate ordinary content until the token limit without making a tool call.
Environment: current main 465e49b9, Linux aarch64, Gemma 4 12B Q4_K_M, CUDA.
{"messages":[{"role":"user","content":"Hello, how are you today?"}],"tools":[{"type":"function","function":{"name":"get_disk_free","parameters":{"type":"object","properties":{"host":{"type":"string"}},"required":["host"]}}}],"tool_choice":"required","max_tokens":256,"temperature":0}
Observed: finish_reason:"length", predicted_n:256, and no tool_calls. This also reproduces with supports_preserve_reasoning:false, so the bug is broader than the upstream title.
The eager grammar still permits unbounded content before the tool marker; that forced-tool content allowance likely dates to a4701c98.
Upstream: ggml-org#27217
tool_choice:"required"is accepted but the model can generate ordinary content until the token limit without making a tool call.Environment: current main
465e49b9, Linux aarch64, Gemma 4 12B Q4_K_M, CUDA.{"messages":[{"role":"user","content":"Hello, how are you today?"}],"tools":[{"type":"function","function":{"name":"get_disk_free","parameters":{"type":"object","properties":{"host":{"type":"string"}},"required":["host"]}}}],"tool_choice":"required","max_tokens":256,"temperature":0}Observed:
finish_reason:"length",predicted_n:256, and notool_calls. This also reproduces withsupports_preserve_reasoning:false, so the bug is broader than the upstream title.The eager grammar still permits unbounded content before the tool marker; that forced-tool content allowance likely dates to
a4701c98.