GRAPHIFY_DISABLE_THINKING is ignored by the claude backend, so thinking eats max_tokens and extraction truncates
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 69/100
Hướng nghiên cứu
Bắt đầu tại graphify/llm.py: đọc _call_claude, nhánh claude của lệnh gọi gắn nhãn và các trình tạo yêu cầu hiện có dùng _thinking_disabled_via_env(). Kiểm tra cách các trình tạo này truyền thiết lập tắt thinking, sau đó áp dụng hành vi tương tự cho cả hai luồng Claude. Hoàn tất khi GRAPHIFY_DISABLE_THINKING=1 gửi thinking={"type": "disabled"} cho cả trích xuất và gắn nhãn.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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').
- Ngôn ngữ chính
- Python
- Star
- 124k
- Fork
- 11.9k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Graphify-Labs/graphify
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Graphify-Labs/graphify#4860 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Cache the claude backend system prompt via Anthropic prompt cachingCó thể đã có người làm @Jvxoq đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Graphify-Labs/graphify#4835 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
extract --out <dir>: semantic cache never saved, docs missing from manifest (relative source_file resolved against --out)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Graphify-Labs/graphify#4831 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 75/100
Graphify-Labs/graphify#4829 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
hooks: last-resort `python3` probe launches the Microsoft Store redirector on Windows (visible console flash, exit 9009)Có thể đã có người làm @Deepjyoti-Sarmah đã nhận 10 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Graphify-Labs/graphify#4563 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Graphify-Labs/graphify
Issue tương tự
-
:bug: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
scikit-image/scikit-image#8377 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Ingredient import validation accepts negative nutrient values and NaNCó thể đã có người làm @LukeSekai đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
wger-project/wger#2564 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
apache/ponymail-foal#351 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 4 ngày
-
To Lower Case(온보딩 전용)Đang mởproblem
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 72/100
DaleStudy/leetcode-study#2885 ·