GRAPHIFY_DISABLE_THINKING is ignored by the claude backend, so thinking eats max_tokens and extraction truncates
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 69/100
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 themstill 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Graphify-Labs/graphify
-
hooks: last-resort `python3` probe launches the Microsoft Store redirector on Windows (visible console flash, exit 9009)Possibly taken @Deepjyoti-Sarmah claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Graphify-Labs/graphify#4563 · 2 comments ·
Maintainers usually reply within 1 day
-
--update runbook: graph.json backup instruction comes after the diff that needs it, so the graph diff never runsPossibly taken @sunildivakar96-cpu claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Graphify-Labs/graphify#4539 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug]: graphify tree ignores the repo tag on merged graphs: no per-repo roots, and identical relative paths from different repos collapse togetherPossibly taken @AromalBiju1 claimed this 2 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Graphify-Labs/graphify#4524 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug] Pi skill uses unsupported general-purpose subagent instead of delegatePossibly taken @bercedev claimed this 4 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Graphify-Labs/graphify#4494 · 7 comments ·
Maintainers usually reply within 1 day
-
ID collision: a node with no source_file beats a sourced node with the same id (dedup._collision_rank)May be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Graphify-Labs/graphify#4492 · 2 comments ·
Maintainers usually reply within 1 day
All issues in Graphify-Labs/graphify
Similar issues
-
bug documentation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
awslabs/visual-asset-management-system#514 ·
Maintainers usually reply within 1 day
-
backend bug spec:REQ-053
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
nolte/kamerplanter#2547 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
EleutherAI/lm-evaluation-harness#4425 ·
Maintainers usually reply within 1 day
-
Gemini: respect PLANNING_DISABLED=1 in lifecycle context hooksPossibly taken @AmariAugustin claimed this today. Openbug good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
OthmanAdi/planning-with-files#329 · 1 comment ·
Maintainers usually reply within 1 day
-
wr.dynamodb.read_items returns [{}] for a single partition value that does not existPossibly taken @auraseb claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
aws/aws-sdk-pandas#3520 ·
Maintainers usually reply within 2 days