ollama - ✅(Solved) Fix Missing reasoning output with gemma4:26b-mxfp8 [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
ollama/ollama#15681Fetched 2026-04-19 15:04:16
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
cross-referenced ×1labeled ×1referenced ×1

Fix Action

Fixed

PR fix notes

PR #15683: server: preserve thinking in /api/generate and populate parameter_size in /api/tags for safetensors

Description (problem / solution / changelog)

Summary

Fixes two independent bugs surfaced on gemma4:26b-mxfp8 / gemma4:26b-nvfp4.

1. /api/generate silently drops thinking for models that think by default (#15681)

GenerateHandler initialized the builtin parser before the capability-gated default for req.Think was applied. Parsers that gate thinking output on the value passed to Init — notably Gemma4Parser, which has an explicit // When thinking is disabled, silently discard channel content branch — therefore saw thinkValue == nil and dropped the reasoning, even though the model was emitting it (visible via a large eval_count but short response).

Moving the capability check + default above the parser Init call so the parser sees the resolved req.Think value. This matches ChatHandler, which already does the two steps in the correct order — and is why /api/chat / /v1/chat/completions return reasoning correctly on the same model.

Callers that explicitly set think: false are unaffected — the default only kicks in when req.Think == nil.

2. /api/tags returns empty parameter_size for safetensors models (#15679)

ListHandler populated Details purely from the manifest's ConfigV2, whose ModelType / FileType are not written for safetensors models during create. /api/show already works around this by reading the safetensors headers via xserver.GetSafetensorsLLMInfo / GetSafetensorsDtype; mirror the same enrichment in ListHandler so the two endpoints stay consistent.

Note: the separate observation in #15679 that the reported count (e.g. 8.7B) is the active-parameter count for MoE variants rather than a "26B-A4B"-style total is a deeper metadata question — out of scope for this PR. This change at minimum stops /api/tags from returning an empty string and makes it match the existing /api/show value.

Verified locally

  • go vet ./server/ — clean
  • go build ./server/ — clean
  • go test ./server/ — all pass (2.5s)
  • go test ./model/parsers/ — all pass

Needs manual verification by reviewer

Neither author has a machine with gemma4:26b-mxfp8 / a safetensors model available, so these runtime checks weren't performed:

  • curl /api/generate -d '{"model":"gemma4:26b-mxfp8","prompt":"Moin","stream":false}' → response now includes populated thinking field.
  • Same request with "think": falsethinking empty (no regression for explicit opt-out).
  • curl /api/generate -d '{"model":"llama3.2","prompt":"hi"}' (non-thinking model) → unchanged behaviour.
  • curl /api/tags on a machine with a safetensors model → details.parameter_size is populated (matches /api/show).
  • curl /api/tags on a machine with GGUF-only models → unchanged (manifest config still used).

Changed files

  • server/routes.go (modified, +40/-16)

Code Example

# without "think" parameter

curl http://localhost:11434/api/generate -d '{
  "model": "gemma4:26b-mxfp8",
  "prompt": "Moin",
  "stream": false,
  "keep_alive": "1m"
}'

{
  "model": "gemma4:26b-mxfp8",
  "created_at": "2026-04-18T20:26:51.336928Z",
  "response": "Moin! Wie kann ich dir heute helfen?",
  "done": true,
  "done_reason": "stop",
  "context": [
    2,
    105,
    9731,
    107,
    98,
    107,
    106,
    107,
    105,
    2364,
    107,
    236792,
    3077,
    106,
    107,
    105,
    4368,
    107,
    100,
    45518,
    107,
    236829,
    139,
    4661,
    236787,
    623,
    236792,
    3077,
    236775,
    107,
    140,
    236829,
    139,
    28040,
    236787,
    14533,
    9115,
    568,
    2740,
    1667,
    198188,
    236768,
    965,
    15632,
    9115,
    44852,
    236761,
    107,
    140,
    236829,
    139,
    146868,
    236787,
    562,
    3364,
    26227,
    1456,
    528,
    15632,
    9405,
    236764,
    6590,
    623,
    9259,
    236775,
    653,
    623,
    11947,
    5597,
    236775,
    568,
    3480,
    625,
    740,
    577,
    1456,
    36448,
    769,
    108,
    140,
    236829,
    139,
    136408,
    1063,
    528,
    496,
    3361,
    15737,
    236786,
    3061,
    236761,
    107,
    140,
    236829,
    139,
    8755,
    236787,
    107,
    144,
    236829,
    139,
    21108,
    9115,
    236787,
    623,
    45890,
    9332,
    653,
    623,
    236823,
    11125,
    19653,
    9332,
    568,
    236776,
    3103,
    10781,
    236786,
    540,
    2642,
    769,
    107,
    144,
    236829,
    139,
    26834,
    9115,
    236787,
    623,
    236792,
    3077,
    9332,
    568,
    39905,
    236764,
    10841,
    769,
    107,
    144,
    236829,
    139,
    193760,
    236787,
    623,
    236792,
    3077,
    520,
    3077,
    9332,
    568,
    26546,
    3364,
    769,
    107,
    144,
    236829,
    139,
    28368,
    1275,
    236786,
    4098,
    236772,
    29963,
    236787,
    623,
    236792,
    3077,
    236888,
    33038,
    10492,
    6838,
    6557,
    34306,
    75471,
    7462,
    568,
    21108,
    12498,
    3072,
    769,
    108,
    140,
    236829,
    139,
    10081,
    506,
    2430,
    1456,
    496,
    44852,
    236772,
    15396,
    26227,
    236764,
    35136,
    607,
    623,
    236792,
    3077,
    9332,
    653,
    623,
    236792,
    3077,
    520,
    3077,
    9332,
    14004,
    496,
    2480,
    2430,
    2707,
    236761,
    107,
    140,
    236829,
    139,
    51613,
    496,
    11045,
    1500,
    236772,
    1048,
    2934,
    563,
    4077,
    573,
    614,
    12498,
    236761,
    108,
    140,
    236829,
    139,
    236775,
    236792,
    3077,
    236888,
    33038,
    10492,
    6838,
    6557,
    34306,
    75471,
    7462,
    568,
    83899,
    532,
    5707,
    769,
    107,
    140,
    236829,
    139,
    236775,
    236792,
    3077,
    520,
    3077,
    236888,
    15141,
    10492,
    6838,
    4591,
    16142,
    8750,
    7462,
    568,
    9474,
    15189,
    769,
    108,
    140,
    236775,
    236792,
    3077,
    236888,
    33038,
    10492,
    6838,
    6557,
    34306,
    75471,
    7462,
    101,
    236792,
    3077,
    236888,
    33038,
    10492,
    6838,
    6557,
    34306,
    75471,
    236881
  ],
  "total_duration": 6171523125,
  "load_duration": 2355890666,
  "prompt_eval_count": 18,
  "prompt_eval_duration": 272332500,
  "eval_count": 277,
  "eval_duration": 3542885500
}

# with "think" = true

curl http://localhost:11434/api/generate -d '{
  "model": "gemma4:26b-mxfp8",
  "prompt": "Moin",
  "stream": false,
  "think": true 
}'

{
  "model":"gemma4:26b-mxfp8",
  "created_at":"2026-04-18T20:14:40.276288Z",
  "response":"Moin! Wie kann ich dir heute helfen?",
  "thinking":"\"Moin\" (Northern German/Low German greeting).\nInformal, friendly, regional.\nRespond appropriately to a greeting in a similar tone.\n\n    *   \"Moin\" can be used at any time of day (not just morning).\n    *   Typical responses: \"Moin!\", \"Moin moin!\", \"Moin, wie geht's?\", or just a friendly greeting in English if the user prefers, but sticking to the vibe is better.\n\n    *   *Option 1 (Traditional/Regional):* \"Moin! Wie kann ich dir heute helfen?\" (Moin! How can I help you today?)\n    *   *Option 2 (Casual):* \"Moin moin! Was gibt's?\" (Moin moin! What's up?)\n    *   *Option 3 (Bilingual/Helpful):* \"Moin! How can I help you today?\"\n\n    *   Acknowledge the greeting.\n    *   Offer assistance.\n\n    *Draft:* \"Moin! Wie kann ich dir heute helfen?\" (Simple, polite, matches the tone).",
  "done":true,
  "done_reason":"stop",
  "context": [2,105,9731,107,98,107,106,107,105,2364,107,236792,3077,106,107,105,4368,107,100,45518,107,236775,236792,3077,236775,568,72982,9115,236786,26834,9115,26227,769,107,57719,514,236764,10841,236764,10969,236761,107,118904,37404,531,496,26227,528,496,3361,15737,236761,108,140,236829,139,236775,236792,3077,236775,740,577,1456,657,1027,990,529,1719,568,2217,1164,5597,769,107,140,236829,139,105330,13630,236787,623,236792,3077,41218,623,236792,3077,520,3077,41218,623,236792,3077,236764,8880,30511,236789,236751,32109,653,1164,496,10841,26227,528,5422,768,506,2430,62197,236764,840,44640,531,506,44249,563,2480,236761,108,140,236829,139,236829,13733,236743,236770,568,63190,236786,98472,1473,236829,623,236792,3077,236888,33038,10492,6838,6557,34306,75471,7462,568,236792,3077,236888,2088,740,564,1601,611,3124,17103,107,140,236829,139,236829,13733,236743,236778,568,193760,1473,236829,623,236792,3077,520,3077,236888,15141,20780,236789,236751,7462,568,236792,3077,520,3077,236888,2900,236789,236751,872,17103,107,140,236829,139,236829,13733,236743,236800,568,236799,53300,236786,28368,1275,1473,236829,623,236792,3077,236888,2088,740,564,1601,611,3124,7462,108,140,236829,139,236776,11190,3811,506,26227,236761,107,140,236829,139,77422,10686,236761,108,140,236829,88293,149681,623,236792,3077,236888,33038,10492,6838,6557,34306,75471,7462,568,22575,236764,54651,236764,12853,506,15737,769,101,236792,3077,236888,33038,10492,6838,6557,34306,75471,236881],
  "total_duration":3621962750,
  "load_duration":52653958,
  "prompt_eval_count":18,
  "prompt_eval_duration":342545333,
  "eval_count":251,
  "eval_duration":3226313625
}


# through OpenAI API

curl -X POST http://localhost:11434/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
  "model": "gemma4:26b-mxfp8",
  "messages": [
    {
      "role": "user",
      "content": "Moin"
    }
  ]
}'

{
  "id": "chatcmpl-648",
  "object": "chat.completion",
  "created": 1776545076,
  "model": "gemma4:26b-mxfp8",
  "system_fingerprint": "fp_ollama",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Moin! Wie kann ich dir heute helfen?",
        "reasoning": "\"Moin\" (Northern German greeting).\nStandard greeting, informal/semi-formal, friendly.\nRespond appropriately to reflect the same vibe (friendly, perhaps using northern German style if appropriate, or standard German/English).\n\n    *   *Option 1 (Northern German):* \"Moin moin!\" (Very common).\n    *   *Option 2 (Standard German):* \"Hallo! Wie kann ich dir helfen?\" (Helpful AI persona).\n    *   *Option 3 (Bilingual/Mixed):* \"Moin! Wie geht's? Wie kann ich dir heute helfen?\"\n\n    *   Since the user spoke in Northern German dialect, responding with a friendly \"Moin!\" or \"Moin moin!\" builds rapport.\n    *   Follow up with a polite inquiry about how I can assist.\n\n    *   \"Moin! Wie kann ich dir heute helfen?\" (Simple and effective).\n    *   \"Moin moin! Alles klar bei dir? Was kann ich f\u00fcr dich tun?\" (More casual).\n\n\"Moin! Wie kann ich dir heute helfen?\" (Short, friendly, professional)."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 18,
    "completion_tokens": 254,
    "total_tokens": 272
  }
}
RAW_BUFFERClick to expand / collapse

What is the issue?

When running gemma4:26b-mxfp8 through /api/generate or Ollama Python ollama.Client.generate() the response does not contain any thinking text. Only once "think" is set to True the thinking text is being returned. Even though the model is reasoning by default.

Running the same response through the OpenAI compatibility API however does return reasoning text.

without "think" parameter

"response": "Moin! Wie kann ich dir heute helfen?" "eval_count": 277 <-- clearly indicating the hidden reasoning in comparison to the response

with "think" = true

"response":"Moin! Wie kann ich dir heute helfen?" "thinking":""Moin" (Northern German/Low German greeting).\nInformal, friendly, regional.\nRespond appropriately to a greeting in a similar tone.\n\n * "Moin" can be used at any time of day (not just morning).\n * Typical responses: "Moin!", "Moin moin!", "Moin, wie geht's?", or just a friendly greeting in English if the user prefers, but sticking to the vibe is better.\n\n * Option 1 (Traditional/Regional): "Moin! Wie kann ich dir heute helfen?" (Moin! How can I help you today?)\n * Option 2 (Casual): "Moin moin! Was gibt's?" (Moin moin! What's up?)\n * Option 3 (Bilingual/Helpful): "Moin! How can I help you today?"\n\n * Acknowledge the greeting.\n * Offer assistance.\n\n Draft: "Moin! Wie kann ich dir heute helfen?" (Simple, polite, matches the tone)." "eval_count":251

through OpenAI API

"content": "Moin! Wie kann ich dir heute helfen?" "reasoning": ""Moin" (Northern German greeting).\nStandard greeting, informal/semi-formal, friendly.\nRespond appropriately to reflect the same vibe (friendly, perhaps using northern German style if appropriate, or standard German/English).\n\n * Option 1 (Northern German): "Moin moin!" (Very common).\n * Option 2 (Standard German): "Hallo! Wie kann ich dir helfen?" (Helpful AI persona).\n * Option 3 (Bilingual/Mixed): "Moin! Wie geht's? Wie kann ich dir heute helfen?"\n\n * Since the user spoke in Northern German dialect, responding with a friendly "Moin!" or "Moin moin!" builds rapport.\n * Follow up with a polite inquiry about how I can assist.\n\n * "Moin! Wie kann ich dir heute helfen?" (Simple and effective).\n * "Moin moin! Alles klar bei dir? Was kann ich f\u00fcr dich tun?" (More casual).\n\n"Moin! Wie kann ich dir heute helfen?" (Short, friendly, professional)." "total_tokens": 272

Relevant log output

# without "think" parameter

curl http://localhost:11434/api/generate -d '{
  "model": "gemma4:26b-mxfp8",
  "prompt": "Moin",
  "stream": false,
  "keep_alive": "1m"
}'

{
  "model": "gemma4:26b-mxfp8",
  "created_at": "2026-04-18T20:26:51.336928Z",
  "response": "Moin! Wie kann ich dir heute helfen?",
  "done": true,
  "done_reason": "stop",
  "context": [
    2,
    105,
    9731,
    107,
    98,
    107,
    106,
    107,
    105,
    2364,
    107,
    236792,
    3077,
    106,
    107,
    105,
    4368,
    107,
    100,
    45518,
    107,
    236829,
    139,
    4661,
    236787,
    623,
    236792,
    3077,
    236775,
    107,
    140,
    236829,
    139,
    28040,
    236787,
    14533,
    9115,
    568,
    2740,
    1667,
    198188,
    236768,
    965,
    15632,
    9115,
    44852,
    236761,
    107,
    140,
    236829,
    139,
    146868,
    236787,
    562,
    3364,
    26227,
    1456,
    528,
    15632,
    9405,
    236764,
    6590,
    623,
    9259,
    236775,
    653,
    623,
    11947,
    5597,
    236775,
    568,
    3480,
    625,
    740,
    577,
    1456,
    36448,
    769,
    108,
    140,
    236829,
    139,
    136408,
    1063,
    528,
    496,
    3361,
    15737,
    236786,
    3061,
    236761,
    107,
    140,
    236829,
    139,
    8755,
    236787,
    107,
    144,
    236829,
    139,
    21108,
    9115,
    236787,
    623,
    45890,
    9332,
    653,
    623,
    236823,
    11125,
    19653,
    9332,
    568,
    236776,
    3103,
    10781,
    236786,
    540,
    2642,
    769,
    107,
    144,
    236829,
    139,
    26834,
    9115,
    236787,
    623,
    236792,
    3077,
    9332,
    568,
    39905,
    236764,
    10841,
    769,
    107,
    144,
    236829,
    139,
    193760,
    236787,
    623,
    236792,
    3077,
    520,
    3077,
    9332,
    568,
    26546,
    3364,
    769,
    107,
    144,
    236829,
    139,
    28368,
    1275,
    236786,
    4098,
    236772,
    29963,
    236787,
    623,
    236792,
    3077,
    236888,
    33038,
    10492,
    6838,
    6557,
    34306,
    75471,
    7462,
    568,
    21108,
    12498,
    3072,
    769,
    108,
    140,
    236829,
    139,
    10081,
    506,
    2430,
    1456,
    496,
    44852,
    236772,
    15396,
    26227,
    236764,
    35136,
    607,
    623,
    236792,
    3077,
    9332,
    653,
    623,
    236792,
    3077,
    520,
    3077,
    9332,
    14004,
    496,
    2480,
    2430,
    2707,
    236761,
    107,
    140,
    236829,
    139,
    51613,
    496,
    11045,
    1500,
    236772,
    1048,
    2934,
    563,
    4077,
    573,
    614,
    12498,
    236761,
    108,
    140,
    236829,
    139,
    236775,
    236792,
    3077,
    236888,
    33038,
    10492,
    6838,
    6557,
    34306,
    75471,
    7462,
    568,
    83899,
    532,
    5707,
    769,
    107,
    140,
    236829,
    139,
    236775,
    236792,
    3077,
    520,
    3077,
    236888,
    15141,
    10492,
    6838,
    4591,
    16142,
    8750,
    7462,
    568,
    9474,
    15189,
    769,
    108,
    140,
    236775,
    236792,
    3077,
    236888,
    33038,
    10492,
    6838,
    6557,
    34306,
    75471,
    7462,
    101,
    236792,
    3077,
    236888,
    33038,
    10492,
    6838,
    6557,
    34306,
    75471,
    236881
  ],
  "total_duration": 6171523125,
  "load_duration": 2355890666,
  "prompt_eval_count": 18,
  "prompt_eval_duration": 272332500,
  "eval_count": 277,
  "eval_duration": 3542885500
}

# with "think" = true

curl http://localhost:11434/api/generate -d '{
  "model": "gemma4:26b-mxfp8",
  "prompt": "Moin",
  "stream": false,
  "think": true 
}'

{
  "model":"gemma4:26b-mxfp8",
  "created_at":"2026-04-18T20:14:40.276288Z",
  "response":"Moin! Wie kann ich dir heute helfen?",
  "thinking":"\"Moin\" (Northern German/Low German greeting).\nInformal, friendly, regional.\nRespond appropriately to a greeting in a similar tone.\n\n    *   \"Moin\" can be used at any time of day (not just morning).\n    *   Typical responses: \"Moin!\", \"Moin moin!\", \"Moin, wie geht's?\", or just a friendly greeting in English if the user prefers, but sticking to the vibe is better.\n\n    *   *Option 1 (Traditional/Regional):* \"Moin! Wie kann ich dir heute helfen?\" (Moin! How can I help you today?)\n    *   *Option 2 (Casual):* \"Moin moin! Was gibt's?\" (Moin moin! What's up?)\n    *   *Option 3 (Bilingual/Helpful):* \"Moin! How can I help you today?\"\n\n    *   Acknowledge the greeting.\n    *   Offer assistance.\n\n    *Draft:* \"Moin! Wie kann ich dir heute helfen?\" (Simple, polite, matches the tone).",
  "done":true,
  "done_reason":"stop",
  "context": [2,105,9731,107,98,107,106,107,105,2364,107,236792,3077,106,107,105,4368,107,100,45518,107,236775,236792,3077,236775,568,72982,9115,236786,26834,9115,26227,769,107,57719,514,236764,10841,236764,10969,236761,107,118904,37404,531,496,26227,528,496,3361,15737,236761,108,140,236829,139,236775,236792,3077,236775,740,577,1456,657,1027,990,529,1719,568,2217,1164,5597,769,107,140,236829,139,105330,13630,236787,623,236792,3077,41218,623,236792,3077,520,3077,41218,623,236792,3077,236764,8880,30511,236789,236751,32109,653,1164,496,10841,26227,528,5422,768,506,2430,62197,236764,840,44640,531,506,44249,563,2480,236761,108,140,236829,139,236829,13733,236743,236770,568,63190,236786,98472,1473,236829,623,236792,3077,236888,33038,10492,6838,6557,34306,75471,7462,568,236792,3077,236888,2088,740,564,1601,611,3124,17103,107,140,236829,139,236829,13733,236743,236778,568,193760,1473,236829,623,236792,3077,520,3077,236888,15141,20780,236789,236751,7462,568,236792,3077,520,3077,236888,2900,236789,236751,872,17103,107,140,236829,139,236829,13733,236743,236800,568,236799,53300,236786,28368,1275,1473,236829,623,236792,3077,236888,2088,740,564,1601,611,3124,7462,108,140,236829,139,236776,11190,3811,506,26227,236761,107,140,236829,139,77422,10686,236761,108,140,236829,88293,149681,623,236792,3077,236888,33038,10492,6838,6557,34306,75471,7462,568,22575,236764,54651,236764,12853,506,15737,769,101,236792,3077,236888,33038,10492,6838,6557,34306,75471,236881],
  "total_duration":3621962750,
  "load_duration":52653958,
  "prompt_eval_count":18,
  "prompt_eval_duration":342545333,
  "eval_count":251,
  "eval_duration":3226313625
}


# through OpenAI API

curl -X POST http://localhost:11434/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
  "model": "gemma4:26b-mxfp8",
  "messages": [
    {
      "role": "user",
      "content": "Moin"
    }
  ]
}'

{
  "id": "chatcmpl-648",
  "object": "chat.completion",
  "created": 1776545076,
  "model": "gemma4:26b-mxfp8",
  "system_fingerprint": "fp_ollama",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Moin! Wie kann ich dir heute helfen?",
        "reasoning": "\"Moin\" (Northern German greeting).\nStandard greeting, informal/semi-formal, friendly.\nRespond appropriately to reflect the same vibe (friendly, perhaps using northern German style if appropriate, or standard German/English).\n\n    *   *Option 1 (Northern German):* \"Moin moin!\" (Very common).\n    *   *Option 2 (Standard German):* \"Hallo! Wie kann ich dir helfen?\" (Helpful AI persona).\n    *   *Option 3 (Bilingual/Mixed):* \"Moin! Wie geht's? Wie kann ich dir heute helfen?\"\n\n    *   Since the user spoke in Northern German dialect, responding with a friendly \"Moin!\" or \"Moin moin!\" builds rapport.\n    *   Follow up with a polite inquiry about how I can assist.\n\n    *   \"Moin! Wie kann ich dir heute helfen?\" (Simple and effective).\n    *   \"Moin moin! Alles klar bei dir? Was kann ich f\u00fcr dich tun?\" (More casual).\n\n\"Moin! Wie kann ich dir heute helfen?\" (Short, friendly, professional)."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 18,
    "completion_tokens": 254,
    "total_tokens": 272
  }
}

OS

macOS

GPU

Apple

CPU

Apple

Ollama version

0.21.0

extent analysis

TL;DR

The issue can be resolved by setting the "think" parameter to True when calling the /api/generate endpoint or the ollama.Client.generate() method.

Guidance

  • The provided log output suggests that the model is reasoning by default, but the thinking text is only returned when the "think" parameter is set to True.
  • To fix the issue, ensure that the "think" parameter is included in the request payload with a value of True.
  • Verify that the response contains the expected thinking text by checking the "thinking" key in the response JSON.
  • If using the Ollama Python client, make sure to pass the think=True argument to the generate() method.

Example

import ollama

client = ollama.Client()
response = client.generate(model="gemma4:26b-mxfp8", prompt="Moin", think=True)
print(response["thinking"])

Notes

  • The issue seems to be specific to the /api/generate endpoint and the ollama.Client.generate() method.
  • The OpenAI compatibility API returns the thinking text by default, suggesting that the issue might be related to the implementation of the /api/generate endpoint.

Recommendation

Apply workaround: set the "think" parameter to True when calling the /api/generate endpoint or the ollama.Client.generate() method. This should resolve the issue and return the expected thinking text in the response.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

ollama - ✅(Solved) Fix Missing reasoning output with gemma4:26b-mxfp8 [1 pull requests, 1 participants]