Skip to content

Feature request: cap on thinking tokens (like llama.cpp's reasoning_budget_tokens) #123

Closed

Description

@joey-j7

With reasoning_effort medium, Qwen3.8-Flash-Next sometimes thinks past 8k to 12k tokens. Thinking and the answer share max_tokens, so some requests end with reasoning only and empty content, and the client sees no answer.

llama.cpp handles this with reasoning_budget_tokens and reasoning_budget_message: once the budget is spent, the model is told to wrap up, thinking is closed, and it writes the answer. Could Strata offer something similar, either per request or as a server default?

Setup: Linux, RTX 4080 Laptop 12 GB, IQ3_S, engine 0.1.20.

Activity

  1. technerd-official commented on Sep 29, 2026

    @technerd-official

    Just found out that you can set "Max tokens" inside the chat window "127.0.0.1:8080" (click on the small gear) right now max tokens is set to "Until done" and also the sampling settings can be adjusted. These carry over to an agent in case you use one.

  2. Niko1221 commented on Sep 29, 2026

    @Niko1221
    Owner

    Good idea - planned server-side: when the thinking part reaches the budget, append a short wrap-up and </think>, and continue from there (the prefix is reused, so it costs nothing extra). Keeping this open until it lands.

  3. Niko1221 commented on Sep 29, 2026

    @Niko1221
    Owner

    Planned as described: once the thinking reaches the budget, the server appends a short wrap-up and </think> and continues from the reused prefix. Until then, the chat page's max-tokens setting (the gear icon) helps.

  4. Niko1221 commented on Sep 30, 2026

    @Niko1221
    Owner

    Planned for 0.1.31 as an opt-in: a reasoning_budget_tokens request field (and a config default). At the budget the server closes the thinking block and lets the model answer. Off by default.

  5. Niko1221 commented on Oct 1, 2026

    @Niko1221
    Owner

    0.1.31: reasoning_budget_tokens in a request (OpenAI or Anthropic) or as a config default, off by default. At the budget the server closes the thinking block with a short wrap-up and lets the model answer. See docs/DETAILS.md.

  6. added 3 commits that reference this issue on Oct 1, 2026
  7. added 4 commits that reference this issue on Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions