Reasoning stream disappears when a tools array is present (reasoning_tokens = 0)

#15
by Unknwn-Prson - opened

Model: poolside/Laguna-S-2.1
Observed via: OpenRouter POST /api/v1/chat/completions, streaming (SSE)
Date: 2026-07

Summary

Laguna emits a normal reasoning stream (delta.reasoning / reasoning_details of type reasoning.text, with usage.completion_tokens_details.reasoning_tokens > 0) on plain requests. The moment the request includes a callable tools array (default tool_choice), the separate reasoning stream disappears entirely — reasoning_tokens drops to 0 and the model's step-by-step thinking is written into the answer content instead.

Per the model card, Laguna is intended to "reason before calling tools and between tool calls," so this appears to be a serving/parser-layer regression, not intended behavior.

Minimal Reproduction

A — reasoning works (no tools)

{
  "model": "poolside/laguna-s-2.1",
  "stream": true,
  "messages": [{ "role": "user", "content": "What is 17 * 23?" }]
}

Result: streams delta.reasoning (~2,200–3,300 chars across runs), reasoning_tokens ≈ 600, then the answer.

B — reasoning gone (one no-op tool, callable)

{
  "model": "poolside/laguna-s-2.1",
  "stream": true,
  "messages": [{ "role": "user", "content": "What is 17 * 23?" }],
  "tools": [{
    "type": "function",
    "function": {
      "name": "noop",
      "description": "Does nothing.",
      "parameters": { "type": "object", "properties": {} }
    }
  }]
}

Result: 0 reasoning-stream chars, reasoning_tokens = 0; the reasoning appears inline in content.

C — reasoning returns with the same tools array, made non-callable

{ "...identical to B...", "tool_choice": "none" }

Result: reasoning stream returns (~2,500 chars). This isolates the trigger to tool-callability, not tool schema size or prompt.

Evidence Table

Request Reasoning stream reasoning_tokens
No tools Yes (~2.5k chars) ~600
One no-op tool (tool_choice: auto) None 0
One no-op tool + tool_choice: "none" Yes >0

What does NOT restore reasoning

All of the following still produce 0 reasoning / reasoning_tokens = 0 while a callable tool is present:

  • reasoning: { effort: "low" | "medium" | "high" | "max" }
  • reasoning: { enabled: true }
  • chat_template_kwargs: { enable_thinking: true } (top-level and extra_body-nested)
  • System-prompt instructions to "show your full chain of thought"

Diagnosis

The suppression is gated purely by the presence of a callable tool (a single no-op function is enough), independent of token load, tool schema, effort level, or system prompt. reasoning_tokens = 0 indicates the reasoning tokens are not generated when the tool-call path is active — the reasoning is not produced-then-hidden, it is absent.

This is consistent with the reasoning parser and tool-call parser being separate serving-layer paths where enabling tool-call emission blocks the reasoning stream. The tool_choice: "none" result confirms the model itself will still reason with tools in context; the loss occurs specifically when tool invocation is enabled.

Expected vs. Actual

  • Expected (per model card): reasoning stream present before/between tool calls, with tools callable.
  • Actual: reasoning stream present only when tools are absent or tool_choice: "none".

Small correction to my diagnosis: reasoning_tokens = 0 does not necessarily mean reasoning-like text was not generated, because such text appears inline in content. More precisely, the callable-tool path appears to stop delimiting/parsing/accounting for that text as a separate reasoning channel.

Same problem for me @joerowell

Sign up or log in to comment