{
 "schema_version": 1,
 "generated": "2026-10-26",
 "id": "peonist-ai-halogen-server--tune-token-budget-for-reasoning-replies",
 "repo": "peonist-ai/halogen-server",
 "repo_url": "https://github.com/peonist-ai/halogen-server",
 "repo_slug": "peonist-ai-halogen-server",
 "title": "Set a token budget that finishes reasoning and answers",
 "page_title": "How to set a token budget that finishes reasoning and answers with Halogen Server",
 "summary": "Pick max_tokens so the model's thinking does not use up the whole reply budget.",
 "who": "A developer whose app gets empty replies from the local model because thinking tokens ran out the budget.",
 "problem": "The model reasons before replying, and a budget that runs out mid-thought returns empty content with finish_reason set to length.",
 "outcome": "Requests finish with a visible answer, and oversized budgets are rejected instead of silently cut.",
 "steps": [
  "Read the per-request default of 8192 and the HALOGEN_MAX_TOKENS_CAP default of 65536 in the configuration table.",
  "Send a request with max_completion_tokens, max_output_tokens, or max_tokens set to a larger value.",
  "Check finish_reason in the reply, and read reasoning_content if content is empty.",
  "Raise the budget in the request body if the reply shows finish_reason of length.",
  "Set HALOGEN_MAX_TOKENS_CAP on the container if your app needs a different ceiling."
 ],
 "agent_prompt": "In the repo peonist-ai/halogen-server, send the prompt <prompt> to the local endpoint at http://localhost:8731/v1/chat/completions with a max_completion_tokens value of <tokens>. Expected output: a reply with finish_reason of stop and a non-empty content field. Verify that a budget above the cap returns a 400 error rather than a truncated answer.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "1 hour",
 "basis": "readme",
 "caveat": "The 8192 default was enough for every ordinary prompt the author measured, so longer reasoning tasks may still need a larger value.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "python",
 "requirements": [
  "AMD Strix Halo machine (Radeon 8060S class GPU, gfx1151) with /dev/kfd and /dev/dri available",
  "Podman (or Docker with the video and render group flags described in the README)",
  "About 36 GB of free disk for the 35.9 GB checkpoint, plus the 3.5 GB image",
  "Python with pip to install the Hugging Face CLI"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.7,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/peonist-ai-halogen-server/tune-token-budget-for-reasoning-replies/",
 "md": "https://dedupedai.com/use-cases/peonist-ai-halogen-server/tune-token-budget-for-reasoning-replies/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/peonist-ai-halogen-server--tune-token-budget-for-reasoning-replies.json",
 "api_version": "v1"
}
