[GH-ISSUE #5257] [Issue]: Local reasoning models exhaust JSON agent output budgets #2912

Closed
opened 2026-10-21 05:57:55 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @SpicyMarinara on GitHub (Aug 19, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5257

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Locally hosted reasoning models can spend the entire completion budget on discarded thinking when Reasoning Effort is set to Off or an agent must return structured JSON.

Expected behavior

An explicit Reasoning Effort setting of Off should reach local OpenAI-compatible endpoints, and agents that require JSON should disable reasoning unless the connection's parameter send-switch is deliberately disabled.

Actual behavior

The OpenAI-compatible provider gates reasoning_effort by known OpenAI model names, so off-catalog local models can ignore the user's Off setting. JSON agents also inherit provider-default thinking, which can exhaust their output budget before producing parseable content and repeat the same failure on retry.

Steps to reproduce

  1. Configure a locally hosted OpenAI-compatible reasoning model such as Qwen through llama.cpp, Ollama, vLLM, or LM Studio.
  2. Set Reasoning Effort to Off, or run a JSON-returning agent such as Prose Guardian.
  3. Observe that the request can still emit or consume thinking tokens and may finish at the token limit with empty, invalid JSON output.

Environment

  • Marinara Engine version: current staging (2.4.4 development line)
  • Install type: source with a locally hosted OpenAI-compatible endpoint
  • OS + version: not reported
  • Browser or app shell: not reported

Logs, screenshots, or video

A captured JSON-agent run returned empty content twice:

stage=response        response: ""  finishReason: "length"  completionTokens: 4096
stage=retry_response  response: ""  finishReason: "length"  completionTokens: 4096

Additional context

Tracked by PR #5247. Local chat templates differ: some honor reasoning_effort: "none", while others require chat_template_kwargs.enable_thinking: false.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @SpicyMarinara on GitHub (Aug 19, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5257 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Locally hosted reasoning models can spend the entire completion budget on discarded thinking when Reasoning Effort is set to Off or an agent must return structured JSON. ## Expected behavior An explicit Reasoning Effort setting of Off should reach local OpenAI-compatible endpoints, and agents that require JSON should disable reasoning unless the connection's parameter send-switch is deliberately disabled. ## Actual behavior The OpenAI-compatible provider gates `reasoning_effort` by known OpenAI model names, so off-catalog local models can ignore the user's Off setting. JSON agents also inherit provider-default thinking, which can exhaust their output budget before producing parseable content and repeat the same failure on retry. ## Steps to reproduce 1. Configure a locally hosted OpenAI-compatible reasoning model such as Qwen through llama.cpp, Ollama, vLLM, or LM Studio. 2. Set Reasoning Effort to Off, or run a JSON-returning agent such as Prose Guardian. 3. Observe that the request can still emit or consume thinking tokens and may finish at the token limit with empty, invalid JSON output. ## Environment - Marinara Engine version: current `staging` (2.4.4 development line) - Install type: source with a locally hosted OpenAI-compatible endpoint - OS + version: not reported - Browser or app shell: not reported ## Logs, screenshots, or video A captured JSON-agent run returned empty content twice: ```text stage=response response: "" finishReason: "length" completionTokens: 4096 stage=retry_response response: "" finishReason: "length" completionTokens: 4096 ``` ## Additional context Tracked by PR #5247. Local chat templates differ: some honor `reasoning_effort: "none"`, while others require `chat_template_kwargs.enable_thinking: false`. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:57:55 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Aug 19, 2026):

Implementation is owned by @kh0p in #5247, with maintainer follow-up applied on the PR branch.

<!-- gh-comment-id:5342424907 --> @SpicyMarinara commented on GitHub (Aug 19, 2026): Implementation is owned by @kh0p in #5247, with maintainer follow-up applied on the PR branch.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#2912
No description provided.