Repository navigation
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- Use T3 Code's OpenCode provider with a folder, for example
~/uni, whose ownopencode.jsoncdefines an extra provider (hereuni, with models such asuni/medium-local). The global~/.config/opencode/opencode.jsoncdoesn't define it. - Add
~/uni(or a subfolder) as a project. Since fix(opencode): project-defined models appear in that project's picker #24585, the model picker for an OpenCode thread there lists theuni/*models, and picking one works. - In a thread in that project (any provider, here Claude), have the agent call
delegate_taskwithtarget: { providerInstanceId: "opencode", model: "uni/medium-local" }. - Optionally, call
orchestrator_capabilitieswithsearch: "medium"(or"local") from the same thread, or callt3_thread_launchwithmodelSelection: { instanceId: "opencode", model: "uni/medium-local" }for the same project.
Expected behavior
Delegation sees the same models the picker shows for that folder. delegate_task and t3_thread_launch accept uni/medium-local for a parent thread or project in ~/uni, and orchestrator_capabilities lists it there. Projects without their own opencode.jsonc keep seeing only the machine-wide catalog.
Actual behavior
delegate_task refuses the model before OpenCode is started:
model_unavailable: Model uni/medium-local is not advertised by provider opencode. Advertised models: opencode/beam-free, opencode/big-pickle, ... and 20 more
The 28 models it lists are exactly what opencode models prints from ~. Run from ~/uni, opencode models also lists the 9 uni/* models. orchestrator_capabilities never shows them either, so the agent has no way to find the model the user asked for.
On main (412a118):
requireAdvertisedModelinapps/server/src/mcp/OrchestratorMcpService.tschecks onlyprovider.models, the machine-wide catalog.resolveTargetpasses it the provider frominput.providersand never looks atworkspaceSnapshots[cwd].modelsfor the parent thread's folder.t3_thread_launchdoes the same inapps/server/src/mcp/toolkits/project/handlers.ts, usingProviderRegistry.getProviders.- The
model_unavailablerefresh-and-retry from fix(server): refresh stale model catalogs before refusing delegation #33426 callsrefreshInstance, which reloads only the machine catalog, so the retry fails the same way.
#24585 added the per-folder models to ServerProviderWorkspaceSnapshot for the pickers, and its description says "agent delegation (MCP) model validation" was out of scope. This issue covers that remaining part.
Related:
- [Bug]: OpenCode providers defined in a project's opencode.jsonc never appear in the model picker for that project #24459: the original report (project-defined OpenCode models missing from the picker)
- fix(opencode): project-defined models appear in that project's picker #24585: the fix for the pickers
- t3_thread_launch accepts a model the provider instance does not advertise, creating a thread that fails immediately #26619 / fix(server): t3_thread_launch refuses models the provider does not advertise #26625: added the advertised-model check to
t3_thread_launch - fix(server): refresh stale model catalogs before refusing delegation #33426: added the refresh-and-retry on
model_unavailable
Impact
Major degradation or frequent failure
Version or commit
T3 Code 0.1.10 (server); the same code path exists on main 412a118.
Environment
Debian 13 server running T3 as a background service, with a desktop client over SSH. OpenCode 2.3.2 runs as a shared service. The parent thread was Claude (claude-opus-5-5).
Logs or stack traces
OrchestratorMcpFailure: Model uni/medium-local is not advertised by provider opencode. Advertised models: opencode/beam-free, opencode/big-pickle, nvidia/deepseek-ai/deepseek-v4.1-flash, opencode/deepseek-v4.1-flash-free, nvidia/google/diffusiongemma-26b-a4b-it, opencode/flint-40b-free, nvidia/z-ai/glm-5.3-flash, nvidia/openai/gpt-oss-20b and 20 more; orchestrator_capabilities with search finds them.
at requireAdvertisedModel (t3:473565:17)
at OrchestratorMcpService.resolveTarget (t3:473679:21)
at OrchestratorMcpService.delegateTask (t3:476394:50)
(the same failure is recorded a second time for the retry after refreshInstance)Screenshots, recordings, or supporting files
No response
Workaround
Start a thread on that model yourself from the picker instead of delegating. Moving the provider into the global OpenCode config also works, but then it shows up in every project, which defeats folder-scoped config.
Activity