Repository navigation
Studio: let the chat model use the Decision API through MCP - #12232
Conversation
|
Codex review (mirror) Mirror: NilayYadav/unsloth#123. Its base is the upstream merge base (now
The round 1 P2: a managed account saw Unsloth Decisions but could not enable it, because |
|
The "(Python 3.13, a-k)" failure comes from this PR, not main. Separately, "Repo tests (CPU, studio)" and "workflow-trigger lint" fail on main right now because |
Review + reproduction evidencePinned review:
I reproduced the flow on Modal (L4, Chromium 1440x900), with three Studios installed through
Conclusion: the feature works end to end for the owner, and after the fixes for managed accounts too. The branch is up to date with main. Codex round 2 on the new head is next. |
|
Review and repair complete. The 12 focused fixes were landed through mirror PR #74, and the source tree matches the converged mirror exactly. Verification:
The refreshed source CI run is in progress with no current failures. |
mahiatlinux
left a comment
There was a problem hiding this comment.
LGTM! Ready to merge, all manually checked.
| ); | ||
| } | ||
|
|
||
| const literal = lower.slice(1, -1).replace(/%25/i, "%").split("%", 1)[0]; |

The Decision API was only reachable over POST /v1/systemone. The chat's MCP menu had no entry for it and there was no MCP address to add, so a chat model could not ask Laya anything without running curl.
When the Decision API is on in Settings > API, the MCP menu now lists Unsloth Decisions. One click gives the chat model a decide tool that runs the same checks and model as /v1/systemone and returns the same answer. The entry is hidden while the Decision API is off. Other MCP clients can use /mcp/decisions/ on the Studio port.
That address takes exactly the sign-in /v1/systemone takes and refuses anything else with 401. Studio's own chat runs the tool in process instead of calling itself, so no API key is created or stored. Startup now imports fastmcp, about 0.2s.