Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

GRAPHIFY_DISABLE_THINKING is ignored by the claude backend, so thinking eats max_tokens and extraction truncates

Open Beginner friendly
#4,546 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@bercedev is already working on this.

Since Oct 18, 2026.

  • #4558 by @bercedev — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
69/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
ai, backend

Research direction

Start in graphify/llm.py: read _call_claude, the claude branch of the labelling call, and the existing request builders that use _thinking_disabled_via_env(). Check how those builders pass the disabled-thinking setting, then apply the same behavior in both Claude paths. Done when GRAPHIFY_DISABLE_THINKING=1 sends thinking={"type": "disabled"} for extraction and labelling.

Written by the indexing model from the issue text.

Description

Summary

GRAPHIFY_DISABLE_THINKING is honoured by the OpenAI-compatible and Ollama paths but not by the native Claude backend (--backend claude). _call_claude in graphify/llm.py sends no thinking parameter at all, so on Claude models that think by default the thinking tokens count against the response's max_tokens (16384 from BACKENDS["claude"]), and extraction truncates or comes back hollow.

Version

graphifyy 0.9.92, anthropic 1.15.0, Python 3.14, graphify extract . --backend claude --model claude-haiku-5-5 --force (headless, in CI).

What happens

Claude Haiku 5.5 runs adaptive thinking by default. With _call_claude sending no thinking setting, a full extraction of a docs-heavy repo (347 semantic files) logged:

  • 38 chunks truncated at depth N, splitting into halves, 11 of them still truncated at recursion depth 3 (max 3) — partial result kept;
  • 3 hollow responses, one of them content=no nodes/edges, output_tokens=13347 — almost all of the 16384 spent on thinking;
  • 64/347 dispatched file(s) produced no nodes, after which the shrink guard (correctly) refused to overwrite the existing graph.

Setting GRAPHIFY_DISABLE_THINKING=1 changes nothing on this path, because _thinking_disabled_via_env() is read in the OpenAI-compatible and Ollama request builders but not in _call_claude (nor in the claude branch of the labelling call).

Expected

GRAPHIFY_DISABLE_THINKING=1 sends thinking={"type": "disabled"} on the Claude backend too, in both _call_claude and the labelling call, as it does elsewhere. Claude Haiku 5.5 accepts disabled thinking at its default effort. Optionally, a way to set output_config.effort (for example GRAPHIFY_CLAUDE_EFFORT) would let users keep thinking on but bounded.

Workaround we are using

GRAPHIFY_MAX_OUTPUT_TOKENS=21000 plus --token-budget 15000, so each smaller chunk's response, thinking included, fits. It works around the symptom; it does not stop thinking being billed on a structured-extraction task that does not need it.

Related

#730 (hardcoded max_tokens), #2880 (hollow responses), #3671 (labelling discards finish_reason='length').

Dominant language
Python
Stars
124k
Forks
11.9k
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Graphify-Labs/graphify

All issues in Graphify-Labs/graphify

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.