Repository navigation
fix(langgraph): route each team turn afresh, bind tools without a template, apply team params - #85
Merged
Conversation
…, allow reasoning_effort none - graph_supervisor: classify now clears the per-turn fields (route, specialist_results, attempts, resolved, pending_write, approved). They are checkpointed with the thread, so a follow-up turn inherited the previous turn's specialist_results, dispatch ran no member, and the team returned the previous answer again. - engine: a spec with tools (or MCP servers) and no template now builds the single template. The default graph only calls the model, so the README's calc.yaml bound nothing and the model answered without its tools, with no error. - spec: reasoning_effort accepts "none", which turns thinking off on GPT-5.1 and on OpenAI-compatible servers hosting Qwen3-style hybrid models. Regression tests for the first two fail on the previous code.
…embers derive_graph_config named spec.model as the classifier's model, so classify re-resolved it without the team's params; inline members were built without them too. A team pointed at a local server (api_base) or told reasoning_effort: none classified and answered with provider defaults. Classify now uses the team's engine-wired model, and inline members inherit the team's params. The regression test fails on the previous code.
The tool_calling conformance cell builds a spec with tools and no template. Now that such a spec builds the single template, its graph really binds the tools, and the harness's stock FakeListChatModel raises NotImplementedError from bind_tools. The fake now accepts and ignores them, as the engine's own test fakes do. The cell used to pass while nothing was bound to the model at all, the same silent drop the engine fix addresses.
Parv17k
force-pushed
the
fix/supervisor-turn-state-and-tools-default
branch
from
November 11, 2026 06:59
7030daa to
c049245
Compare
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 changed, and why
Four defects, found while building a multi-version agentic RAG demo on AgentShip against a self-hosted, OpenAI-compatible server (Qwen3 via llama.cpp).
route,specialist_results,attempts,resolved,pending_write,approved) with the thread, and nothing cleared them. On turn two, dispatch saw a result for every routed member, ran none, and returned turn one's answer again.classifynow resets them at the start of each turn.tools:and notemplate:ran without its tools, with no error. The default graph only calls the model, so the README'scalc.yamlbound nothing and the model guessed at17 * 23. A spec that declares tools or MCP servers without a template now buildssingle.paramsdidn't reach its classifier or inline members.derive_graph_confignamedspec.modelas the classifier's model, so classify re-resolved it without the team's params, and inline members were built without them too. A team pointed at a local server (api_base) or givenreasoning_effort: nonerouted and answered with provider defaults. Classify now uses the team's engine-wired model, and inline members inherit the team's params.reasoning_effort: nonewas rejected. It's the value that turns thinking off on GPT-5.1 and on OpenAI-compatible servers hosting Qwen3-style hybrid models.Because of fix 2, the conformance harness's fake model now needs
bind_tools. The stockFakeListChatModelraises there, so thetool_callingcell would fail because of the harness, not the engine. It now accepts the tools and ignores them, as the engine's own test fakes do. Before, that cell passed while nothing was bound to the model at all.How it was verified
test_each_turn_in_a_thread_is_routed_afresh,test_tools_without_a_template_still_run,test_team_params_reach_the_classifier_and_inline_members) fail onmainand pass here.agentship runwith a three-member team (researcher with asearch_docstool plus Postgres checkpoints, analyst, inline writer) on a Qwen3 server, and a 14-question golden set across five agent versions, several of them multi-turn on one thread. Before fix 1, the second turn on a thread repeated the first turn's answer; now it gets its own answer.agentship run calc.yaml --input "What is 17 times 23?"now calls the tool and returns 391.pytest -qgives 955 passed, 25 skipped, 3 xfailed.ruff check .andruff format --check .exit 0, andagentship verifyreports all declared capabilities proven with 0 over-claims.Checklist
make testpasses locally (CI's install line, in a fresh venv).ruff checkandruff format --checkare clean.agentship verifystill exits0, with no new over-claims.tool_callingcell now proves a real bind.)docs/capabilities/. (No new surface.reasoning_effortgains one accepted value; happy to add a line if the docs list the values.)docs/CHANGELOG.mdhas an entry under## [Unreleased].docs/decisions/. (Not needed, I think: "tools without a template meanssingle" follows from what the spec already says.)Anything deliberately left undone
templates/single.pystill usescreate_react_agent, which LangGraph 1.0 deprecates in favour oflangchain.agents.create_agent. That's out of scope here.