Repository navigation
Raise the default graph-answer token budget from 2000 to 20000 - #11
Merged
Merged
Conversation
Owner's order 2026-08-24: "This can limit the amount of information retrieved." The 2000-token default starved multi-node answers, cutting most of a scoped subgraph before it reached the caller. Changed everywhere the default lives: - CLI `graphify query` --budget default (cli.py) and its help text (__main__.py) - MCP schema defaults for query_graph / get_neighbors / get_community and the three handler fallbacks (serve.py) - _query_graph_text / _subgraph_to_text signature defaults (serve.py) - skillgen fragments (references/query/default.md, core/aider.md, core/devin.md), all rendered skill references and monoliths, and the blessed expected/ snapshots (python -m tools.skillgen + --bless; --check clean) - new sanctioned change-class predicate in skillgen gen.py so the monolith v8 round-trip accepts the renumbering and nothing else Truncation notices derive from the live token_budget value, so no message text pinned the old number. --budget N / token_budget still override. Tests: new pins for the CLI parse default (test_query_cli.py, including --budget override), the Python signature defaults (test_serve.py), and the MCP schema advertisement over tools/list (test_serve_http.py). Co-Authored-By: Claude Fable 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The default token budget for graph answers changes from 2000 to 20000 — one more zero — everywhere the default lives.
Why
Owner's direct order, 2026-08-24: "This can limit the amount of information retrieved." The 2000-token default starved multi-node answers: a scoped subgraph of any real size was cut to a fraction before it reached the caller, and every consumer had to know to pass
--budgetto get a whole answer.Changed sites
graphify query--budgetdefault (graphify/cli.py), help text (graphify/__main__.py)graphify/serve.py):query_graph/get_neighbors/get_communityschema defaults and their handler fallbacks (arguments.get("token_budget", ...)), plus the_query_graph_text/_subgraph_to_textsignature defaultsreferences/query/default.md,core/aider.md,core/devin.md), all rendered per-platform references and the aider/devin monoliths, and the blessedexpected/snapshots — regenerated withpython -m tools.skillgen+--bless;--checkis cleantools/skillgen/gen.pyso the monolith v8 round-trip accepts exactly this renumbering and nothing elsepath/explaincarry no budget defaults — nothing to change thereTruncation notices derive from the live
token_budgetvalue (f-strings), so no message text pinned the old number.--budget N/token_budgetstill override.Tests
test_query_cli.py: CLI parse default is 20000 and--budget 1500still overridestest_serve.py:_query_graph_text/_subgraph_to_textsignature defaults are 20000 (no mcp package needed)test_serve_http.py:tools/listadvertisesdefault: 20000on everytoken_budgetschema (exactlyquery_graph,get_neighbors,get_community)test_serve.pytest_serve_http.pytest_query_cli.pytest_query_induced_edges.pytest_query_names_its_graph.pytest_querylog.pytest_skillgen.py→ 256 passed, 1 skipped (the mcp-dependent module skips where mcp isn't installed);py_compileandruff checkclean on all touched Python files🤖 Generated with Claude Code