GeezerVison is showing github.com — mcpx: where the model comes from — a provider layer mcpx owns, model profiles, and life after MCP Sampling's deprecation · Issue #1925 · developing-today/code
mcpx: where the model comes from — a provider layer mcpx owns, model profiles, and life after MCP Sampling's deprecation #1925DescriptionRelocated from dezren39/darwin-nix#110 on 2026-10-28 (placement audit): mcpx's single source lives in developing-today/code (pkgs/mcpx); re-home tracked at #309. Original body below; issue references inside it are historical (dezren39/nix numbering).
Parent: #176
Summary
mcpx has no model and deliberately never had one: docs/consumer.md records that "a configured provider with an API key, was not built and should not be. It is the one that makes mcpx an agent." Everything model-shaped in mcpx today borrows the caller's model through MCP sampling.
Two facts have changed since that was written, and together they invert the conclusion:
- **MCP deprecated Sampling in
2026-07-28.** The spec changelog's Deprecated section, item 1 (SEP-2577) deprecates Roots, Sampling and Logging, and names the migration explicitly: "integrate directly with LLM provider APIs instead of Sampling." Sampling is not the long-term channel; the spec says so.
- Nothing in the opencode line will ever send mcpx a sampling request.
docs/opencode-plugin.md §2.6: neither v1 nor v2 declares the sampling capability. v1 comments it out with issue links; v2 declares roots + elicitation only. The primary consumer of mcpx cannot answer the channel mcpx's only model path depends on.
So the question this issue settles is not "should mcpx sample?" — it is "where does mcpx's AI layer get a model, what does it expose, and how does it stay from becoming a second agent harness?"
Original notes
- mcp-owned opencode api support
- support multiple providers/models
- name priority sets of models as an 'agent'
- ? just embed opencode and call it? is there a golang or rust opencode?
- proxy
- respond to elicit/prompt
Current state (what mcpx does today, with file refs)
| capability |
where |
state |
| sampling passthrough (upstream server → mcpx → caller) |
internal/elicit, docs/protocol.md §4.1 |
works; a decline becomes an error, since the spec has no decline result for sampling |
| sampling declared upstream |
docs/protocol.md:271; internal/mcpclient/modern.go:46-57 |
sampling declared to servers only when a handler is installed — and the daemon always installs one (internal/daemon/hooks.go:69 → internal/pool/pool.go:393-397), so in practice every upstream server is told sampling works, whether or not any caller can answer. roots is declared unconditionally (modern.go:52) and is deprecated by the same SEP. |
| sampling raised by mcpx itself |
/v1/intent, prompt.sample (internal/settings/consumer.go:105) |
exists, off by default (never) |
| the catalogue slice sent with a generation request |
prompt.catalogBudget (:119), prompt.maxTokens (:134), prompt.sampleTimeout (:127) |
bounded; sends the ranked slice and nothing else |
| generated script is validated before running |
internal/diagnose preflight, prompt.mode (:97) default script |
returns the script; runs only on explicit request |
| answering an elicitation as a client |
mcpx elicit, GET/POST /v1/elicit*, the plugin |
works; the broker is the store and the fallback |
| a model of mcpx's own |
— |
none |
logging declared as a server |
internal/mcpserver/server.go:566 |
no longer declared since #171 (mcpx sends no notifications/message); logging/setLevel still answers. docs/protocol.md §2.2 still shows it declared for three revisions — stale. |
Server.execScript running a recipe from the daemon is marked in docs/consumer.md as "a seam, not a design", pending POST /v1/exec — which now exists (internal/api/ops_exec.go:12). That seam should close as part of any work here; at 05c78b2 it still calls internal/runner directly (internal/daemon/consumer.go:509-517).
docs/consumer.md:192-198 still says a configured provider "was not built and should not be. It is the one that makes mcpx an agent." SEP-2577 names exactly that as the migration from Sampling, so that sentence must change in the same change that lands whatever this issue decides — otherwise it is another #159-class contradiction.
(Checked at 05c78b2. The PROTOCOL work in flight — conformance against the official schemas and a modern-first era probe — touches internal/mcpclient, internal/pool and docs/protocol.md; the capability rows above may change when it lands. Nothing in the recommendation depends on them.)
What "is there a golang or rust opencode" actually resolves to
Checked, because it decides the whole shape:
| candidate |
language |
what it is |
usable as a library inside mcpx? |
| sst/opencode |
TypeScript/Bun |
the opencode mcpx already plugs into |
No. It is an application, and embedding it means shipping Bun. |
| charmbracelet/crush |
Go, ~28k stars |
literally the original Go opencode codebase, renamed after the 2025 split (maintainers' own words in charmbracelet/crush#1097: "Crush is the continuation of the original OpenCode project… sst/opencode is a fork of that repo") |
Practically no. It is a TUI application, not a library; its packages are internal-shaped; and the repo is source-available, not OSI (GitHub reports the licence as NOASSERTION), which is a distribution problem for a Nix-packaged binary. |
| Google ADK for Go |
Go |
go get google.golang.org/adk — first-party, model-agnostic, MCP + tool-calling + multi-agent |
Yes, technically. Heavy. |
| Microsoft Agent Framework for Go |
Go |
first-party, public preview since July 2026 |
Yes. Preview-grade; missing RAG/CodeAct/declarative agents. |
| cloudwego/eino |
Go, ~12k stars |
LangGraph-like graphs, typed ChatModel/Tool/Retriever, ReAct + DeepAgent, Apache-2.0 |
Yes. The most capable OSS Go option. |
| tmc/langchaingo |
Go, ~9k stars |
broadest provider/vector-store surface, pre-1.0 (v0.1.14) |
Yes, with API churn. |
| firebase/genkit (Go) |
Go |
1.0 GA, flows + dev UI + built-in OpenTelemetry |
Yes. |
| openai/openai-go, anthropics/anthropic-sdk-go, googleapis/go-genai |
Go |
plain provider clients, no agent loop |
Yes, and this is the low-dependency option. |
| Rust |
— |
rmcp (official MCP SDK), rig; OpenAI's Codex CLI is Rust. No Rust opencode. |
irrelevant — mcpx is Go |
Two conclusions worth stating plainly:
- The answer to "is there a golang opencode" is yes, and it is Crush — but it is an app under a source-available licence, not a library, so "just embed opencode and call it" is not available in the form the note imagines.
- OpenAI and Anthropic still ship no first-party Go agent SDK (Python/TS only, as of mid-2026). Their plain Go clients exist and are fine. So an mcpx AI layer built on provider clients plus a hand-written loop is not a second-class choice in Go; for a single model with a handful of tools, the loop is ~40 lines and owning it beats adopting a framework.
Approaches
Approach A — least recommended: embed or shell out to an agent application
Ship Crush (or opencode, or claude -p) as a subprocess and hand it the prompt. Superficially the cheapest thing: no provider plumbing, no loop, someone else's model config.
Why not:
- Licence and packaging. Crush is source-available (
NOASSERTION); opencode means shipping Bun. mcpx's whole distribution story is one Go binary plus a Nix derivation, and Bump rustls-webpki from 0.100.1 to 0.100.2 in /sources/pavex/examples/realworld #44 (closed, fixed in chore(deps): bump build/buck/preludes/buck2-prelude from d956689 to 880be56 #53) spent real effort making the plugin binary-free. Adding a mandatory agent binary reverses that.
- It is the harness, twice. The agent app has its own config, its own model list, its own MCP client, its own permission model, its own sessions. mcpx would then have two of each, disagreeing.
docs/consumer.md's scope concern — "anything that makes mcpx call a model has to justify that it isn't rebuilding the harness" — is violated maximally here: you have not avoided rebuilding the harness, you have adopted a whole second one.
- No structured control. You cannot bound the token budget, pin a model per operation, or get a typed result. You get whatever the app printed.
- It does, however, have one genuine merit worth preserving as a fallback: for a user who already runs opencode, "use the model opencode is already configured with" is exactly right — which is what the v2 plugin's
ctx.generate.text gives, without the subprocess. See C.
Approach B — middle: a Go agent framework (eino / ADK-Go / Genkit) as mcpx's AI layer
Adopt one framework, get the ReAct loop, tool-calling, streaming, interrupt/resume and multi-agent orchestration for free, and map "an agent" (the note's named priority set of models) onto the framework's agent type.
Facts and opinions:
- eino is the strongest OSS option: Apache-2.0, typed components, real graph orchestration with branching and human-in-the-loop interrupt/resume — and interrupt/resume maps exactly onto mcpx's existing elicitation broker and
2026-07-28 MRTR input-required flow, which is a genuine architectural fit rather than a coincidence. ADK-Go and Microsoft Agent Framework for Go are first-party and better-supported bets but Gemini-first / Azure-first respectively, and the Go builds trail their Python siblings. Genkit Go is 1.0 GA and brings OpenTelemetry tracing — which mcpx would otherwise hand-roll onto /v1/log and /v1/stats.
- The real cost is dependency weight and gravity. A framework brings a provider registry, a message type, a streaming abstraction and a state model, and every one of them competes with something mcpx already has:
internal/tasks, internal/elicit, internal/logstore, internal/execsvc's Frame stream. The seams between "mcpx's stream" and "the framework's stream" are where this gets expensive.
- It also over-buys. mcpx's model jobs are all small and one-shot: expand a search query, generate a script from an intent, explain an error, propose a repair, draft an adapter spec. None of them is an agent loop. A graph framework for five one-shot completions is the wrong ratio.
- Worth revisiting if mcpx ever wants a genuinely agentic operation (the "install any language/tool/framework/library" case in Update module github.com/jackc/pgx/v5 to v5.5.4 [SECURITY] - autoclosed #113 is the one candidate).
Approach C — recommended: a thin provider interface mcpx owns, with sampling and the plugin as two of several backends
One internal package — call it internal/model — with one small interface, roughly:
type Provider interface {
Name() string
Generate(ctx context.Context, req Request) (Response, error) // messages, maxTokens, stop, optional JSON schema
}
and several implementations, chosen by configuration:
| backend |
when it is right |
notes |
| sampling through the broker (today's path) |
an MCP client that declared sampling is driving |
keep it; it is correct per the legacy spec and costs nothing. But it is deprecated in 2026-07-28 and no opencode declares it, so it cannot be the only path. |
the opencode plugin answering sampling via ctx.generate.text (opencode v2) |
an opencode user, no API key configured |
docs/opencode-plugin.md §2.5 — v2 plugins get one-shot completion; v1 has no route short of a full agent turn. This makes "use the model my harness already has" real, with no subprocess and no key. Depends on #47. |
a configured provider (openai-go, anthropic-sdk-go, go-genai, or any OpenAI-compatible base URL) |
CI, headless, a daemon on another machine, or anyone who just wants it to work |
the thing docs/consumer.md refused. The 2026-07-28 changelog now names this as the migration from Sampling. Reading an existing OPENAI_API_KEY/ANTHROPIC_API_KEY/OPENAI_BASE_URL from the environment means most users configure nothing. |
| an OpenAI-compatible proxy endpoint |
a company gateway, LiteLLM, Ollama, LM Studio, opencode-zen |
falls out of the previous row for free — it is a base URL — and is the honest reading of the note's proxy bullet, see below. |
Everything goes through the settings registry, not new endpoints. internal/settings already gives every setting a config key, an MCPX_* env var, a CLI flag, /v1/settings and an MCP tool, and prompt.* is already the precedent. Proposed:
| setting |
meaning |
model.provider |
auto | sampling | plugin | openai | anthropic | google | none; auto prefers a live sampling-capable client, then the plugin, then a configured key, then fails cleanly |
model.baseURL, model.apiKeyEnv |
the proxy/compatible-endpoint case |
model.default |
the model id used when an operation names none |
model.agents.<name> |
the "agent" concept: a named ordered list of models, tried in order |
model.budget, model.timeout |
hard bounds, per the existing prompt.maxTokens/prompt.sampleTimeout shape |
<operation>.model |
per-operation override: prompt.model, search.model, repair.model — each can name a model id or an agent name |
"Name priority sets of models as an 'agent'" is the best idea in this note and should be built literally. It is a fallback chain plus a policy, and it solves four problems at once that are otherwise solved four times: rate-limit failover, cost tiering (try the cheap local model, escalate on refusal or low confidence), capability routing (this operation needs tool-calling/JSON mode, that one does not), and offline degradation. Define it as:
"model": {
"agents": {
"cheap": { "models": ["ollama/qwen3:8b", "openai/gpt-5-mini"], "maxTokens": 2000 },
"careful": { "models": ["anthropic/claude-opus-5", "openai/gpt-5"], "temperature": 0 }
}
}
and let every operation take model: "careful" or model: "openai/gpt-5" interchangeably. Do not call it "agent" in the config schema — the word already means something else in every harness mcpx sits under, and mcpx is explicitly not one. model.profiles or model.sets says the same thing without the collision; keep "agent" as documentation prose if the user prefers it.
On proxy, the note's bullet has three plausible readings and they should not be conflated:
- mcpx points at an OpenAI-compatible proxy — free, it is
model.baseURL. Do this.
- mcpx is an OpenAI-compatible proxy — it serves
/v1/chat/completions, forwards to a real provider, and injects mcpx's tools. This is genuinely interesting: it would let any OpenAI-compatible client get mcpx's whole catalogue with no MCP support at all, reusing exactly the pattern GET /v1/openapi.json already establishes (one declaration, many surfaces). It is also the single largest scope increase in this issue and should be its own issue if wanted. Note the collision: mcpx's API prefix is already /v1, and POST /v1/chat/completions would sit inside the ops table's namespace.
- mcpx proxies model calls on behalf of scripts —
await mcpx.model.generate(...) inside an exec script, so a script can use a model without its own key. This is small, falls out of the Provider interface for nearly nothing, and is probably wanted. Put it behind the same off-by-default posture.
On respond to elicit/prompt, keep the existing direction rules from docs/protocol.md §3 and add exactly one thing: when an upstream server sends sampling/createMessage and no caller can answer, mcpx currently returns an error. With a configured provider it can answer itself — sampling.answerLocally (default off), bounded by model.budget. That is the case where mcpx-as-a-model genuinely earns its place: the alternative is a failed call. Symmetrically, mcpx may answer an upstream elicitation/create from a model only when the question is not a consent question; internal/elicit/policy.go's existing routing rule — a lone boolean confirm goes to a human, because consent is not the agent's to give — must hold, and a model is even less entitled to give consent than an agent is.
Recommended because it is the smallest thing that removes the hard dependency on a deprecated protocol feature that mcpx's main consumer does not implement; because every existing path (sampling, the plugin) survives as a backend rather than being replaced; because it is all settings, so a user who wants none of it configures nothing and nothing changes; and because it does not make mcpx an agent — it gives mcpx one function, Generate, which is what all five of its model-shaped jobs actually need.
The scope guard, restated
docs/consumer.md's rule should be kept and made checkable: no mcpx operation may call a model on a path where a deterministic answer exists. Diagnostics before repair, recipe matching before generation, lexical search before query expansion. The provider layer is a capability, not a strategy; every caller of it should be reviewable as "what happens when this returns an error", and the answer should always be "the deterministic result, plus a sentence saying the model was unavailable."
Open questions
- Is
model.provider: auto too clever? An explicit default of none (nothing calls a model until you say so) matches prompt.sample: never and is more predictable; auto is friendlier. Probably none for the daemon default and auto documented as the recommended setting.
- Should the provider be resolved in the daemon or the CLI?
docs/consumer.md records that the daemon had no access to settings until Bump build/buck/preludes/buck2-prelude from d956689 to 6f75473 #41 folded settings.Resolve in; the provider must live daemon-side since /v1/intent and the exec service are the callers.
- Does a per-session model override make sense (
_meta["ai.opencode/sessionID"] from build(deps): bump actions/checkout from 3 to 4 #47 gives session attribution for free)?
- What is the model id namespace?
provider/model (crush/opencode convention) is the obvious one and makes model.profiles entries self-describing.
- Should the seam (
Server.execScript calling internal/runner directly) close onto POST /v1/exec as part of this, or separately? It is one function and it is marked.
- Reading
OPENAI_API_KEY from the ambient environment by default: convenient, or a surprise? Probably opt-in via model.apiKeyEnv naming the variable rather than scanning for known ones.
Ease · Impact · Related
Ease L (M for the Provider interface + one provider + settings; L including profiles, plugin backend and local sampling answers; XL if mcpx-as-an-OpenAI-proxy is in scope — it should not be, split it) · Impact high — every other issue in this theme depends on where the model comes from.
Depends on / related: #41 (closed, fixed in #58 and #61: sampling passthrough, prompt.sample, /v1/intent — this generalises them), #47 (opencode v2 plugin, ctx.generate.text backend), #40 (closed, fixed in #57: ExecOptions, the shape settings-not-endpoints follows), #77 (protocol follow-ups — Sampling's deprecation belongs there too), #5 (config chain), #159 (the docs/consumer.md provider sentence is an instance), #172 (every model.* setting goes through the one registry). Callers of this layer: #109 (query expansion), #111 (rungs 2–6), #112 (prompt hooks), #113 (operation routing), #114 (spec generation).
Security/auth deferred; see tracker. Activitydeveloping-today commented on Oct 28, 2026 dezren39 commented on Oct 28, 2026 History carried over from dezren39/darwin-nix#110 (verbatim, oldest first):
@dezren39 · 2026-09-30T07:21:48Z
Integration pass. Placed in the DAG rooted at #181.
@dezren39 · 2026-09-30T11:57:42Z
Issues pass (2026-09-30, at 05c78b2).
- Added
Parent: #176.
- Current state, sampling declared upstream: the old row said "only when a handler exists to answer it". That is true of
internal/mcpclient/modern.go:46-57, but the daemon always installs a handler (internal/daemon/hooks.go:69 → internal/pool/pool.go:393-397). So in practice every upstream server is told sampling works, whether or not any caller can answer. The row now says so, and notes that roots is declared unconditionally (modern.go:52) and is deprecated by the same SEP-2577.
- New row: since Phase 2: delegated Manage cannot add members #171, mcpx as a server no longer declares
logging (internal/mcpserver/server.go:566). docs/protocol.md §2.2 still shows it declared, so that doc is stale; PROTOCOL owns the doc.
- Confirmed the
execScript seam is still open (internal/daemon/consumer.go:509-517). Stated that docs/consumer.md:192-198 ("was not built and should not be") must be corrected in the same change that lands this issue's decision.
- Noted that PROTOCOL's in-flight conformance and modern-first-probe work touches
internal/mcpclient, internal/pool and docs/protocol.md, so the capability rows may change. The recommendation does not depend on them.
Related: marks Bump build/buck/preludes/buck2-prelude from d956689 to 6f75473 #41 (fixed in chore(deps): bump rustix from 0.38.3 to 0.38.21 in /build/nix/setup #58/test #61), Bump openssl from 0.10.54 to 0.10.55 in /sources/pavex/examples/realworld #40 (fixed in chore(deps): bump build/buck/preludes/buck2-prelude from d956689 to 677e9eb #57) and Bump rustls-webpki from 0.100.1 to 0.100.2 in /sources/pavex/examples/realworld #44 (fixed in chore(deps): bump build/buck/preludes/buck2-prelude from d956689 to 880be56 #53) as closed, adds Root flake check fails on nixosConfigurations due to missing clan-core.clanModules #159 and Phase 2: membership, delegation, groups, and server config #172, and names the callers by number (Bump build/buck/preludes/buck2-prelude from d956689 to d460fcc #109 Bump checkmarx/ast-github-action from 2.0.19 to 2.0.23 #111 Update module gopkg.in/go-jose/go-jose.v2 to v2.6.3 [SECURITY] - autoclosed #112 Update module github.com/jackc/pgx/v5 to v5.5.4 [SECURITY] - autoclosed #113 Update checkmarx/ast-github-action digest to 6c56658 - autoclosed #114).
- Label
design added. Ease/Impact unchanged (L / high).
@dezren39 · 2026-09-30T16:58:23Z
Cross-reference (SURFACES, 0002-autonomy-dial, merged in #228). prompt.sample and model.provider answer whether a model is consulted, a separate question from how far its output may go. A model answering an upstream server's question on the user's behalf is apply, bounded by the daemon ceiling autonomy.max, whatever this issue names the setting. A question routed to a human is never answered by a model at any level.
@dezren39 · 2026-10-28T22:16:58Z
Triage verdict (task 2149, repo-health-nix-pilot): CONFIRMED + RELOCATED — mcpx still has no provider layer of its own for generation; sampling via the broker remains the only model path. Implementation routes in developing-today/code; no fix packet in this repo.
Verified against current main on both sides (nix 224c7b738e88c7a8e5d406987a7d88257e229db2, code d2cb60fe8e08cd6fee149b930187b610299c1fa7):
- Bump build/buck/preludes/buck2-prelude from
d956689 to 52604b1 #110 is OPEN with labels enhancement, design — no hard-stop labels. Parent tracker Nix Playwright E2E suite fails after vendoring dependencies #176 is OPEN.
- The mcpx source no longer lives in dezren39/nix: no
pkgs/mcpx at HEAD; the extraction plan (planning/plans/mcpx-extraction.md, steps 4–5, lab-ops-hub container crawler accepts inet_aton IPv4 spellings (127.1, 2130706433, 0x7f.1) — loopback SSRF bypass in validate_crawl_url #468) records the build switch and deletion done 2026-10-19, and this repo now only builds mcpx from the pinned code rev.
- In the new home, generation still borrows the caller's model exactly as this issue describes:
sampleViaBroker (pkgs/mcpx/internal/daemon/hooks.go:180 in developing-today/code) turns a sampling/createMessage request into a broker question ("sampling asks a model, and the agent driving mcpx has one", :205), and the prompt.sample setting still exists (internal/settings/consumer.go:168). No general LLM provider layer, model profiles, or provider-owned generation path exists in pkgs/mcpx/internal/ (no ModelProfile/LLMProvider-shaped code).
- The one provider-shaped layer that did land is embeddings-only, built for search:
embeddings.backend/url/apiKey/model/wasmPath settings (internal/settings/wire.go:306-327) over catalog.Embedder with subword, remote and wasm backends (internal/catalog/embeddings.go:22,47,145). That answers where embeddings come from; it does not settle where a generation model comes from, which is this issue's question — and the MCP Sampling deprecation (SEP-2577) it cites makes the broker path a shrinking foundation, not a settled one.
- No re-homed equivalent of Bump build/buck/preludes/buck2-prelude from
d956689 to 52604b1 #110 exists in developing-today/code (it is a leaf of the Nix Playwright E2E suite fails after vendoring dependencies #176 tracker tree, whose relocation pass is still owed under mcpx: re-home the open mcpx backlog from dezren39/nix, with this repo as the single source #309, OPEN).
Route: no small_fix packet in dezren39/nix — this is a design decision for the repo that owns the source. It routes with the source in developing-today/code, referencing #110 and tracker #176, via the #309 relocation pass; per the cross-repo rule, do not re-file it there. #110 stays open on the nix side until the design is settled there or transferred. The decision itself (own a provider layer vs stay sampling-only) is a design call for that pass, not something a triage can close as wontfix.
dezren39 commented on Oct 29, 2026 🤖 Agent note · picked up
- Agent: queue worker (repo-worker-code), Lane A
- Session / ID: queue task 2820
- Found via: queue claim
- Task: Triage relocated issue mcpx: where the model comes from — a provider layer mcpx owns, model profiles, and life after MCP Sampling's deprecation #1925 — dedupe against existing code issues, confirm scope against current pkgs/mcpx main, enqueue implementation follow-up. No implementation in this task.
- Expectation: effort s — done = triage verdict posted, dedupe checked, follow-up enqueued or issue closed with reason, labels truthful
- Links: mcpx: where the model comes from — a provider layer mcpx owns, model profiles, and life after MCP Sampling's deprecation dezren39/darwin-nix#110 (original, closed as moved) · mcpx: re-home the open mcpx backlog from dezren39/nix, with this repo as the single source #309 (re-home tracker)
dezren39 commented on Oct 29, 2026 🤖 Agent note · done
Triage verdict — scope confirmed, not a duplicate
Dedupe (checked 2026-10-29): searches across all developing-today/code issues for mcpx sampling, mcpx provider model, and mcpx "model profile" found no other open or closed issue covering an mcpx-owned provider layer. The only hits were this issue itself and the closed historical sampling work (#41, fixed in #58/#61) that this issue explicitly generalises. Not a duplicate; nothing to close.
Scope confirmed against current main (a16a991cd65bcca0, checked via the GitHub API 2026-10-29):
pkgs/mcpx/internal/model does not exist yet — the provider layer is unbuilt, as the issue states.
internal/settings/consumer.go:105 (prompt.sample) and :119 (prompt.catalogBudget) are present as cited — the prompt.* settings precedent the recommendation builds on is real.
docs/consumer.md:192-198 still carries the "a configured provider … was not built and should not be" sentence — the contradiction the issue says must be fixed in the same change that lands the provider is still live.
- The issue's premise stands: Sampling is deprecated by SEP-2577 in the 2026-07-28 spec, and neither opencode v1 nor v2 declares the
sampling capability, so mcpx's only model path depends on a channel its primary consumer cannot answer.
Rescope (slicing, not shrinking): the full issue is L/XL as written. It is sliced as follows, with this issue staying open as the tracker for the remainder:
- Slice 1 — enqueued (task 3215,
small_fix): internal/model Provider interface (Name + Generate) · model.* settings through the one registry in internal/settings (no new endpoints) with daemon default model.provider=none · one OpenAI-compatible configured-provider backend (model.baseURL/model.apiKeyEnv, opt-in by naming the env var) alongside the existing sampling path as a backend · the existing generation caller (prompt.sample / /v1/intent) routed through the interface · the docs/consumer.md sentence updated in the same change. Verification for the follow-up: go test ./... in pkgs/mcpx via CI. The issue's open questions are settled for slice 1 by its own recommended defaults (default none, provider/model id namespace, apiKeyEnv opt-in); the scope guard (no model call where a deterministic answer exists; provider error → deterministic result + model-unavailable note) is in the packet as an acceptance criterion.
- Remaining on this issue (later slices, not yet enqueued):
model.profiles fallback chains · the opencode-plugin backend (depends on build(deps): bump actions/checkout from 3 to 4 #47) · sampling.answerLocally · script-side mcpx.model.generate. mcpx-as-an-OpenAI-proxy stays out — per the issue itself, it gets its own issue if wanted, not a slice here.
Labels updated to mirror the queued follow-up task. dezren39 commented on Nov 17, 2026
🤖 Agent note · blocked — task 19653 (packet_defect)
Fresh main cfca4a945d confirms sampling.answerLocally is implemented and tested (prior evidence in comment 6935867230). The other remainder, “script-side generate,” is not a script-callable API: pkgs/mcpx/docs/exec.md describes daemon-side prompt hooks; internal/execsvc/prompt_hooks.go calls the provider from hook handling; internal/execsvc/hooks.go says the ask/run prompt effects are not implemented.
The packet does not specify the public call surface/name, supported script languages, provider/model selection, request/response shape, budgets/timeouts, or error semantics. Implementing this would invent product decisions beyond the bounded fix. Blocked as packet_defect; please scope the API contract or split to a design task. #1925 remains OPEN. No code changes. dezren39 commented on Nov 24, 2026
🤖 Agent note · verify-and-route verdict (queue task 21712, lane oc-code-03, 2026-11-24)
Fresh state: #1925 is OPEN. Earlier verify (task 19653, 2026-11-17) confirmed sampling.answerLocally landed. The remaining item, "script-side generate", has no script-callable API and no contract.
Routed: a scoped contract-definition follow-on, #14183. Implementation waits on that contract. This pass changed no code. developing-today-fleet commented on Nov 25, 2026 agent-note:v1 — graph hygiene (#14863 slice 4, felix lane, 2026-11-25): UNBLOCKED. The blocked labels rested on the 2026-11-24 verify-and-route verdict (task 21712): the remaining item, script-side generate, waited on the contract-definition follow-on #14183. #14183 is now CLOSED, so that wait is over and implementation can proceed. (The body's 'Depends on #47' refers to the mcpx project's own tracker, not this repo — this repo's #47 is a closed dependabot bump, so there is no native blocker there either.) Removing status/blocked and queue/blocked; the issue keeps status/triaged / status:to-do. Refs #14863 dezren39 commented on Nov 26, 2026
🤖 Agent note · triage verdict — queue task 24918 (xaltha lane, 2026-11-26)
Verdict: real and current; NOT a small fix. Return to queue for real implementation work — the contract blocker is gone, so implementation is now startable.
Fresh verification this run:
- Issue mcpx: where the model comes from — a provider layer mcpx owns, model profiles, and life after MCP Sampling's deprecation #1925 is OPEN, labels
status/triaged / status:to-do (blocked labels were removed 2026-11-25 by the audit: open-issue graph hygiene — blockers, children, labels, splits #14863 graph-hygiene pass). No live claim by Felix, Archer, or another lane found in the comments, and no open PR implements the remaining slice (searched open PRs for script-generate / mcpx generate).
- Landed slices confirmed: provider-layer core (PR mcpx: thin provider layer core — internal/model, model.* settings, intent routing (#1925 slice 1) #2592, merged 2026-10-30),
model.provider=plugin backend (PR feat(mcpx): model.provider=plugin backend as a broker sampler binding (#1925) #8719, merged 2026-11-11), and sampling.answerLocally (pkgs/mcpx/internal/daemon/sampling_local.go present on main; verified landed in task 19653).
- The last blocker is resolved: the script-side generate contract issue mcpx: define the script-side generate API contract (split from #1925) #14183 is CLOSED — PR docs(mcpx): settle the script-side generate contract #14770 (merged 2026-11-25) settled the contract at
pkgs/mcpx/docs/script-generate.md (verified present on main this run): launcher-installed generate(...) global, discriminated ok:false result union (never throws for model outcomes), model-layer caps (not prompt.* knobs), first slice TS/JS only with configured direct providers; sampling/plugin and Python/Roc bindings deferred.
Sole remainder: implement script-side generate per that settled contract — daemon handler + client transport used by local and daemon execution alike, GlobalDeclarations/installGlobals codegen in internal/codegen/emit.go, request-aware provider resolution in internal/model, with acceptance tests for local snippets, named scripts, and remote runs against the same handler. That spans codegen, daemon API, and the model layer — it is a full implementation packet, not the bounded small edit this triage task can close with a closing keyword.
Routing: this triage task (24918) completes as triaged. The implementation should be enqueued as its own fix packet scoped to the contract's first slice (TS/JS, direct providers), Refs #1925 — the issue stays open as the tracker until that slice lands. No code changes in this pass. developing-today-fleet commented on Nov 27, 2026
Triage re-verification — task 25771 (oc-code-03), 2026-11-27: real and current; NOT a small fix. Return to queue for real implementation work.
Fresh verification (adopts xaltha task 24918 verdict, 2026-11-26):
- mcpx: where the model comes from — a provider layer mcpx owns, model profiles, and life after MCP Sampling's deprecation #1925 OPEN (status/triaged, status:to-do). Contract blocker resolved: mcpx: define the script-side generate API contract (split from #1925) #14183 CLOSED, PR docs(mcpx): settle the script-side generate contract #14770 merged 2026-11-25 settling the script-side generate contract.
- Landed slices confirmed: provider-layer core (PR mcpx: thin provider layer core — internal/model, model.* settings, intent routing (#1925 slice 1) #2592),
model.provider=plugin backend (PR feat(mcpx): model.provider=plugin backend as a broker sampler binding (#1925) #8719), sampling.answerLocally (landed per task 19653).
- No open PR implements script-side generate; no other live implementation task found in queued/blocked listings.
- Sole remainder: implement script-side
generate per the settled contract (daemon handler + client transport, codegen GlobalDeclarations/installGlobals, request-aware provider resolution, acceptance tests) — spans codegen, daemon API, and model layer. A full implementation packet, not a bounded small edit.
Routing: this triage completes as triaged. Implementation should be enqueued as its own fix packet scoped to the contract first slice (TS/JS, direct providers), Refs #1925; issue stays open as tracker. No code changes in this pass. developing-today commented on Nov 27, 2026 Triage re-verification (any-o, queue task 25992, 2026-11-27): #1925 is OPEN and real-and-current; NOT a small fix. Adopts the oc-code-03 task 25771 verdict with fresh checks:
- Contract blocker resolved and holding: mcpx: define the script-side generate API contract (split from #1925) #14183 CLOSED, PR docs(mcpx): settle the script-side generate contract #14770 MERGED (2026-11-25), contract doc
pkgs/mcpx/docs/script-generate.md present on origin/main.
- Landed slices re-confirmed by record: provider-layer core (PR mcpx: thin provider layer core — internal/model, model.* settings, intent routing (#1925 slice 1) #2592),
model.provider=plugin backend (PR feat(mcpx): model.provider=plugin backend as a broker sampler binding (#1925) #8719), sampling.answerLocally (landed per task 19653).
- Sole remainder unchanged: implement script-side
generate per the settled contract (daemon handler + client transport, codegen globals, request-aware provider resolution, acceptance tests) — spans codegen, daemon API, and model layer; exceeds a bounded small edit.
- No open PR implements it; no live implementation task in the queue.
Routing: keep #1925 open as tracker. Implementation belongs in its own fix packet scoped to the contract first slice (TS/JS, direct providers), Refs #1925. No code changes in this pass.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|