Skip to content

Groq Qwen3-32b: reasoning missing in streaming responses with tools/tool_choice #19849

Description

@PClmnt

Summary

When using LiteLLM proxy with Groq qwen/qwen3-32b, reasoning is missing in streaming responses when tools + tool_choice: auto are provided. Non‑streaming responses do include message.reasoning, and streaming without tools includes <think> tags.

Environment

  • LiteLLM version: 1.81.3
  • Provider: Groq
  • Model: qwen/qwen3-32b
  • Proxy mode (OpenAI‑compatible)

Steps to reproduce

  1. Configure the model in LiteLLM with reasoning_effort: "default" in litellm_params (and drop_params: true).
  2. Stream a chat completion with tools:
curl -s -H "Authorization: Bearer $LITELLM_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model":"<litellm_model_id>",
    "messages":[{"role":"system","content":"You are a helpful assistant."},{"role":"user","content":"test"}],
    "stream": true,
    "tools":[{"type":"function","function":{"name":"noop","description":"noop","parameters":{"type":"object","properties":{},"additionalProperties":false}}}],
    "tool_choice":"auto"
  }' \
  http://localhost:4000/v1/chat/completions

Actual

  • Stream only emits content.
  • No <think> tags and no reasoning deltas.
  • completion_tokens_details.reasoning_tokens stays 0.

Expected

  • Reasoning should be available during streaming (e.g., via reasoning_content deltas), or at least surfaced consistently with non‑streaming responses.

Comparisons

  • Non‑streaming with tools returns message.reasoning for the same model.
  • Streaming without tools returns <think> tags in content.

Possible cause

GroqChatCompletionStreamingHandler inherits OpenAIChatCompletionStreamingHandler and doesn’t map Groq reasoning fields into reasoning_content (OpenRouter has explicit mapping). If Groq streams reasoning separately when tools are enabled, LiteLLM may be dropping it.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions