You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
providers: custom provider silently skipped when model capabilities omit tools #49912
Custom providers migrated from V1 following the migrate-v1 guide are silently skipped when a model's capabilities omits tools. V1 models only have modalities (no tool_call), so a literal migration yields capabilities: {input, output} without tools — the whole provider is then dropped with only a terse normalization warning. /api/config shows "providers": {}, /api/model has none of its models.
Server log (one line per provider, no field detail):
Either missing capabilities.tools should fall back to the documented default (models doc: unknown models assume tool support), or the migrate-v1 guide should state tools is required and what to use when V1 has no tool_call. At minimum the warning should name the offending field, not just the provider path.
Plugins
none
OpenCode version
v2.0.9 (channel latest)
Steps to reproduce
Add a custom provider whose model capabilities has input/output but no tools:
Still reproduces on v2.0.10 (Windows 11 26200, PowerShell 7), and the trigger is broader than a missing tools: any incomplete capabilities object drops the whole provider entry.
In my case the V1 → V2 migration produced the mirror of your example — tool_call: true became capabilities: { "tools": true } with no input/output:
→ path=$.providers.<provider> kind=invalid action="skipped malformed recognized value", provider absent from /models, and a session pinned to it failed with Model unavailable: <provider>/k3. Completing it to { "tools": true, "input": ["text"], "output": ["text"] } makes the provider load immediately.
Two additional data points:
Not limited to custom providers. A providers.ollama entry (recognized/built-in) with a models block using the same partial capabilities was skipped identically. Built-in Ollama discovery still supplied models, which masked the skipped config entry and made it much harder to spot.
The generic warning sends you down false trails. Because the message names only the provider path, I assumed the aisdk:@ai-sdk/openai-compatible form from the migrate-v1 guide was rejected (both failing entries happened to use it). After completing capabilities, I verified that aisdk:@ai-sdk/openai-compatible and @opencode/ai/providers/openai-compatible both load and both serve live requests — the package form was never the problem. Naming the offending field would have made that obvious.
The models doc's fallback assumptions ("Tool support, text and image input, and text output" for non-catalog models) read as if a partial capabilities object should merge with those defaults rather than invalidate the entry.
Thanks for the report! Version 2.0.22 fixed custom providers being skipped when model capabilities omit tools, input, or output; omitted fields now inherit the model's defaults. Update with opencode upgrade or npm i -g @opencode/cli@latest (desktop: update the app). Please reopen or comment if this still happens on 2.0.22 or later.
Activity
cestercian commentedon Sep 19, 2026
Working on a fix so migrated V1 custom providers are not silently skipped when capabilities omit tools.
McNopper commentedon Sep 20, 2026
Still reproduces on v2.0.10 (Windows 11 26200, PowerShell 7), and the trigger is broader than a missing
tools: any incompletecapabilitiesobject drops the whole provider entry.In my case the V1 → V2 migration produced the mirror of your example —
tool_call: truebecamecapabilities: { "tools": true }with noinput/output:→
path=$.providers.<provider> kind=invalid action="skipped malformed recognized value", provider absent from/models, and a session pinned to it failed withModel unavailable: <provider>/k3. Completing it to{ "tools": true, "input": ["text"], "output": ["text"] }makes the provider load immediately.Two additional data points:
providers.ollamaentry (recognized/built-in) with amodelsblock using the same partialcapabilitieswas skipped identically. Built-in Ollama discovery still supplied models, which masked the skipped config entry and made it much harder to spot.aisdk:@ai-sdk/openai-compatibleform from the migrate-v1 guide was rejected (both failing entries happened to use it). After completingcapabilities, I verified thataisdk:@ai-sdk/openai-compatibleand@opencode/ai/providers/openai-compatibleboth load and both serve live requests — the package form was never the problem. Naming the offending field would have made that obvious.The models doc's fallback assumptions ("Tool support, text and image input, and text output" for non-catalog models) read as if a partial
capabilitiesobject should merge with those defaults rather than invalidate the entry.neriousy commentedon Oct 20, 2026
Thanks for the report! Version 2.0.22 fixed custom providers being skipped when model capabilities omit tools, input, or output; omitted fields now inherit the model's defaults. Update with
opencode upgradeornpm i -g @opencode/cli@latest(desktop: update the app). Please reopen or comment if this still happens on 2.0.22 or later.