Skip to navigation

Why do reasoning models return empty replies, cut off mid-thought, or loop on </think> tags?

View as Markdown

Reasoning models spend output tokens on thinking before generating visible dialogue. In SillyTavern, Tavo, OMate, and JanitorAI, that thinking budget produces three recurring failures: empty message bubbles, replies truncated inside <think>, and repetition loops caused by unclosed </think> tags left in chat history.

1. Empty bubble or reply cut off mid-thought

Reasoning tokens count against max_tokens. When Max Response Length is set to 500–1000, the model can exhaust max_tokens inside <think>...</think> and stop before emitting visible dialogue.

  • Set max_tokens to 4096–8192 when calling reasoning models. Even hy4-flash-free uses roughly 230 reasoning tokens for a one-sentence reply and requires max_tokens of at least 2000.
  • Enable streaming and point your client to https://direct.beatapi.io/v1 (or https://api-asia.beatapi.io/v1 in Asia) so long thinking pauses do not hit Cloudflare’s 100-second wait limit.
  • Avoid setting max_tokens to 32000 or higher on a small balance, because BeatAPI’s balance pre-check can reject oversized caps with 402 insufficient_credits. See 402 error from oversized max_tokens.

2. Repetition loops from broken </think> tags

When a reasoning reply cuts off before closing </think>, or when a client sends raw <think> blocks back in chat history, the broken tag stays in subsequent prompts. The model then imitates the malformed tag structure and loops on reasoning text or earlier paragraphs.

  • Edit or delete the broken turn: Remove any unclosed <think> or stray </think> text from the last assistant message before sending the next turn.
  • Enable reasoning extraction: In SillyTavern’s Reasoning settings, enable automatic reasoning parsing so thinking blocks stay folded in the UI and stay out of subsequent prompt history unless you explicitly resend them.