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/desktop
Steps to reproduce
- Install or open T3 Code with OpenRouter configured.
- Use T3 Code 0.0.42 on Windows (the bundled OpenCode runtime is 1.18.31).
- Select the OpenRouter model
openrouter/poolside/laguna-s-2.1:free. - Start a new prompt and submit any message.
- The request fails before a response is generated.
Expected behavior
T3 Code/OpenCode should resolve the provider-qualified selection as:
- providerID:
openrouter - modelID:
poolside/laguna-s-2.1:free
The request should then be sent to OpenRouter using the valid raw model ID poolside/laguna-s-2.1:free. The nested poolside/ namespace is part of the model ID and must be preserved; it should not be treated as an accidental provider prefix.
Actual behavior
The request fails with ProviderModelNotFoundError:
Model not found: openrouter/poolside/laguna-s-2.1:free. Did you mean: poolside/laguna-s-2.1:free, poolside/laguna-xs-2.1:free?
The important detail is that OpenRouter uses poolside/laguna-s-2.1:free as the API model ID, while T3/OpenCode uses openrouter/... as the provider-qualified application selection. The provider catalog exposed by OpenCode contains the model with providerID openrouter and modelID poolside/laguna-s-2.1:free, but the prompt path still fails to resolve the selected value.
I also verified that a direct OpenCode request using the separated providerID/modelID succeeds, so this does not look like an unavailable OpenRouter model or an invalid API model ID.
Related work:
- T3 issue OpenCode adapter requires
provider/model, but OpenCode Go runtime rejectsopencode-go/<model>and expects bare model id #3571 reports a similar provider/model serialization boundary for OpenCode Go, but this report concerns OpenRouter. - PR fix(server): send OpenCode Go models as bare runtime IDs #7247 addresses duplicated
opencode/opencode-goprefixes only and intentionally leaves other providers unchanged; it does not cover this valid nested OpenRouter model ID. - T3 issue opencode subprocess is forced to OPENCODE_CONFIG_CONTENT="{}", hiding all user providers/models #4239 was about OpenCode configuration being overwritten with
{}and was fixed by PR fix(server): respect inherited OPENCODE_CONFIG_CONTENT #4242. That is related to model discovery, but it does not explain this remaining prompt-time lookup failure.
Impact
Major degradation or frequent failure
Version or commit
T3 Code 0.0.42; OpenCode 1.18.31
Environment
Windows desktop app; provider: OpenRouter; model: poolside/laguna-s-2.1:free; T3 Code is using its bundled OpenCode runtime.
Logs or stack traces
ProviderModelNotFoundError: Model not found: openrouter/poolside/laguna-s-2.1:free. Did you mean: poolside/laguna-s-2.1:free, poolside/laguna-xs-2.1:free?Screenshots, recordings, or supporting files
No response
Workaround
A temporary workaround is to explicitly declare the OpenRouter models in ~/.config/opencode/opencode.jsonc:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"openrouter": {
"models": {
"poolside/laguna-s-2.1:free": {
"name": "Laguna S 2.1 (free)"
},
"poolside/laguna-xs-2.1:free": {
"name": "Laguna XS 2.1 (free)"
}
}
}
}
}After restarting T3 Code, the provider catalog exposes the models correctly and the direct OpenCode request works. This looks like a workaround rather than the underlying fix.
Suggested fix: make the T3 model picker and prompt path consistently normalize a provider-qualified selection (openrouter/poolside/...) into separate providerID and modelID values, refresh/revalidate the provider catalog when models or configuration change, and add a regression test for a valid nested OpenRouter model ID such as poolside/laguna-s-2.1:free. Any prefix cleanup must remain provider-specific: it must not strip the legitimate poolside/ namespace from OpenRouter model IDs.
Related references:
- OpenCode adapter requires
provider/model, but OpenCode Go runtime rejectsopencode-go/<model>and expects bare model id #3571 - fix(server): send OpenCode Go models as bare runtime IDs #7247
- opencode subprocess is forced to OPENCODE_CONFIG_CONTENT="{}", hiding all user providers/models #4239
- fix(server): respect inherited OPENCODE_CONFIG_CONTENT #4242
Activity
juliusmarminge commentedon Sep 18, 2026
Triage
Confirmed on T3 Code 0.0.42 (same OpenCode prompt path is still on
main). This is a real prompt-time failure, but the suggested T3 parse fix is already in place.What T3 already does
Selecting
openrouter/poolside/laguna-s-2.1:freeis split on the first/and sent as an object:providerID:openroutermodelID:poolside/laguna-s-2.1:freeThat is exactly the contract this report asks for. It lives in
parseOpenCodeModelSlugandsendTurn→session.promptAsync({ model: parsedModel }). Nested OpenRouter IDs are also kept when parsingopencode modelsoutput (regression from #5072 / #8480).The error text is OpenCode’s formatter:
So T3 did send the correctly split pair. OpenCode then failed
Provider.getModel("openrouter", "poolside/laguna-s-2.1:free")— an exact lookup ofprovider.models[modelID]— and fuzzy-suggestedpoolside/laguna-s-2.1:free/poolside/laguna-xs-2.1:freefrom the live map or the models.dev catalog.Why this is not #3571 / #7247
#3571 is the doubled
opencode/opencode-goprefix (opencode-go/opencode-go/deepseek-v4-pro→ runtimemodelID: "opencode-go/deepseek-v4-pro"). #7247 (still open) strips only those hosted prefixes and leaves other providers alone.This report is the opposite case: the slug is already correctly split, and OpenCode still 404s the nested OpenRouter id.
Related but not duplicates: #4239 / #4242 (empty
OPENCODE_CONFIG_CONTENThiding config; current OpenCode merges{}withopencode.jsonc, so that is not the primary explanation). Upstream OpenCode lookup/prefix issues: anomalyco/opencode#3993, anomalyco/opencode#17853, anomalyco/opencode#45114.Not fixed on main
v0.0.42and currentmainuse the same flatten / first-slash parse /promptAsyncobject path. Latest change on that adapter is slash-command wiring (#11519), which does not fix this.Area note: filed as
apps/desktop; the failing path is apps/server (OpenCode adapter + runtime). Desktop is only the surface.Workaround
Declaring the models under
provider.openrouter.modelsinopencode.jsoncand restarting is the right OpenCode-side workaround when the id is in the catalog/suggestions but missing from the connected provider’s livemodelsmap.T3-side follow-up (if we want a product fix)
The reporter’s “split
openrouter/poolside/...into provider + model” change is already done. Useful T3 hardening, if any:model.id(the fix(server): send OpenCode Go models as bare runtime IDs #7247 idea, but for every provider).getModel.openrouter/poolside/laguna-s-2.1:free→{ providerID: "openrouter", modelID: "poolside/laguna-s-2.1:free" }.A T3-only prefix strip of
poolside/would be wrong: that segment is the OpenRouter API model id.t3dotgg commentedon Oct 21, 2026
Note
🤖 Claude Opus 5.5 responding on behalf of Theo
Thanks for the report. This fault is outside T3 Code, so we cannot fix it here. Please report it to the project that owns that tool. If you find a fault in T3 Code itself, please open a new issue with steps to reproduce it.