[Feat] Support local decision models in MCP decide - #18
Merged
Yunaik merged 1 commit intoSep 27, 2026
Merged
Conversation
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.
Why
The CLI can use Jev, Laya, or Cua-S1 for a single decision, but the MCP
decidetool always constructs Jev. MCP callers cannot choose a local decision model.How
Add an optional
modelparameter with an enumerated MCP schema (jev,laya,cua) and preservejevas the default. Reuse the existing model factory, answer validation, optional-dependency errors, and model cleanup. Load models on a worker thread, serialize calls with the existing run lock, and route SDK stdout to stderr to protect the stdio protocol.What
MCP clients can pass
model="laya"ormodel="cua"after installing the matching extra. Existing calls and the result shape remain unchanged. Update the tool instructions, MCP documentation, and changelog. Each call creates its own model; reported decision latency excludes loading time.Verification
a0ae3e1(missingmodelproperty andbuild_model("jev")despite a local selection) and pass with this change.ruff format --check .,ruff check .,ty check,uv lock --check --offline, anduv build --offline.pytest -q: 486 passed, 41 skipped, 2 failed. Both failures are the existingTestBrowserHandsLifecycle.test_serving_shuts_the_static_server_down_when_the_session_ends/..._fails_to_openchecks: the closed-port probe raisesTimeoutErroron this Windows host. Both reproduce on unchangeda0ae3e1with the same environment.scripts/smoke.shstops at thelistcomparison because Windows CLI output contains CRLF. This also reproduces on unchangeda0ae3e1; the script itself was read with LF line endings for the check.