Leverage reasoning capabilities to break down complex problems, plan multi-step solutions.

What is Reasoning?

Reasoning enables LLMs to “think” before responding by processing a chain of thought, breaking down queries into steps, checking assumptions, and using relevant data. As shown in the example below, reasoning-enabled models show their thought process before producing a final answer, helping ensure a more accurate and transparent response. This makes them well-suited for agent-like workflows.
Reasoning example

Always-On Reasoning Models

These models have built-in, always-on reasoning and don’t support toggling the thinking process. You don’t need to pass any chat_template_kwargs—just send your prompt and they’ll perform multi-step reasoning internally. Certain models are trained to always think (generate internal reasoning) without additional parameters. These models automatically handle reasoning internally. You just send a prompt, and the model performs multi-step reasoning under the hood.

Example: DeepSeek-R1

curl -X POST https://api.friendli.ai/serverless/v1/chat/completions \
  -H "Authorization: Bearer $FRIENDLI_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-ai/DeepSeek-R1-0528",
    "messages": [
      {
        "role": "user",
        "content": "Does technology expand or limit human freedom?"
      }
    ]
  }'

Hybrid Reasoning Models

These models offer optional reasoning via the enable_thinking parameter. Toggle enable_thinking to control chain-of-thought reasoning. On models that support this feature, setting it to true allows internal thinking; when false, an empty <think></think> tag is inserted. To activate reasoning mode during inference, use the following setting:

Example: Qwen-3-32B

curl -X POST https://api.friendli.ai/serverless/v1/chat/completions \
  -H "Authorization: Bearer $FRIENDLI_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "Qwen/Qwen3-32B",
    "messages": [
      {
        "role": "user",
        "content": "Does technology expand or limit human freedom?"
      }
    ],
    "chat_template_kwargs": {
      "enable_thinking": true
    }
  }'