GRAPHIFY_DISABLE_THINKING is ignored by the claude backend, so thinking eats max_tokens and extraction truncates
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 69/100
調査の方向性
graphify/llm.pyから始めます。_call_claude、ラベリング呼び出しのclaude分岐、_thinking_disabled_via_env()を使う既存のリクエストビルダーを読みます。これらのビルダーがthinkingを無効にする設定をどのように渡しているかを確認し、同じ動作を両方のClaude経路に適用します。GRAPHIFY_DISABLE_THINKING=1を設定すると、抽出とラベリングの両方でthinking={"type": "disabled"}が送信されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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').
- 主要言語
- Python
- スター
- 124k
- フォーク
- 11.9k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Graphify-Labs/graphify のほかの issue
-
hooks: last-resort `python3` probe launches the Microsoft Store redirector on Windows (visible console flash, exit 9009)対応中かも @Deepjyoti-Sarmah が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Graphify-Labs/graphify#4563 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
--update runbook: graph.json backup instruction comes after the diff that needs it, so the graph diff never runs対応中かも @sunildivakar96-cpu が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Graphify-Labs/graphify#4539 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: graphify tree ignores the repo tag on merged graphs: no per-repo roots, and identical relative paths from different repos collapse together対応中かも @AromalBiju1 が 4 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Graphify-Labs/graphify#4524 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Bug] Pi skill uses unsupported general-purpose subagent instead of delegate対応中かも @bercedev が 5 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
Graphify-Labs/graphify#4494 · コメント 7 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
Graphify-Labs/graphify#3763 ·
メンテナーはふだん 1 日以内に返信
Graphify-Labs/graphify の issue をすべて見る
似ている issue
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
yunaremaia/proto-drift#22 ·
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
yunaremaia/memwatch#96 ·
-
bug good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
yunaremaia/ci-gate-watch#34 ·
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
yunaremaia/agent-capability-attestation#64 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
yunaremaia/agent-call-graph#43 ·
メンテナーはふだん 1 日以内に返信