GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix(core): name the replacement for legacy keys under providers by argszero · Pull Request #56859 · anomalyco/opencode Conversation
|
| where | key | reported |
|---|---|---|
| provider | npm |
package |
| provider | api |
settings.baseURL |
| provider | options |
settings, headers and body |
| provider | id |
canonical |
| provider | whitelist / blacklist |
no replacement — plain unsupported wording |
| model | id |
modelID |
| model | options |
settings, headers and body |
| model | release_date |
releaseDate |
| model | tool_call |
capabilities.tools |
| model | modalities |
capabilities.input and capabilities.output |
| model | attachment, reasoning, temperature, experimental |
no replacement — plain unsupported wording |
| model | provider.npm / provider.api |
package / settings.baseURL |
whitelist and blacklist deliberately do not point at permissions: those are tool permission rules and cannot hide or allow a model, so naming them would send users to a setting that does nothing. A V1 capability flag such as reasoning: true is not a rename of the structured capabilities.reasoning field it resembles either, so it keeps the plain wording rather than a hint that would not survive the copy.
packages/core/src/config.ts already turns every diagnostic into a configuration normalization diagnostic warning, but a warning in the log is not enough on its own — someone who hits the failure never looks there. So the request that uses such a provider now fails with
No package configured for example-provider/some-model: set "package" on its "providers" entry
instead of the empty specifier above. The model is still listed and still fails; what changed is that the failure says what to fix.
Scope stays narrow. Nothing is accepted, renamed or re-interpreted: a provider written in the native spelling produces no diagnostic at all, and one written in the V1 spelling keeps exactly the resolved configuration it has today — only the diagnostic and the error message are new. The issue's other two suggested outcomes (accept npm/options as aliases, or reject the entry outright) are config-surface decisions this PR does not take; happy to build either instead if a maintainer prefers it.
packages/core/test/config/normalization.test.ts — provider-level spellings, model-level spellings including the nested provider.npm and the capability spellings, and a control that a fully native provider produces zero diagnostics and keeps package / settings / modelID / releaseDate.
packages/core/test/config/provider.test.ts — a provider registered from config with no package really does reach the resolver with package === "", and resolving it produces the message above.
packages/core/test/model-resolver.test.ts — the same message without the plugin stack; the existing non-empty case still reads Unsupported package for …: aisdk:@ai-sdk/perplexity.
bun test test/config/ → 299 pass, 0 fail.bun run typecheck in packages/core passes; oxlint reports 0 warnings; prettier --check clean.Not a UI change.
Added by the opencode bot (AI-generated).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The following comment was made by an LLM, it may be inaccurate: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The new diagnostics work, but they don't change what the user sees yet, and two of the suggested replacements need fixing.
I ran the #56816 reproduction from source on the base and on this branch. With npm and options.baseURL under providers, the CLI output is unchanged: the model is still listed and opencode run still fails with Unsupported package for example-provider/some-model: . The only difference is two configuration normalization diagnostic warnings in ~/.local/share/opencode/log/opencode-local.log. A user who hits this won't think to look there, so the issue's visible failure remains and Closes #56816 closes more than this fixes. Either show this to the user (for example, an error at request time that names the missing package, or not registering a non-catalog provider that has no package), or don't close the issue with this PR. normalization.test.ts (40 pass), test/config/ (250 tests, 0 fail, 1 skipped) and typecheck in packages/core all pass.
Public API: unchanged. No config keys are accepted or removed; only log warnings are added.
Other concerns:
whitelist/blacklist hint points to the wrong place (see the inline comment).tool_call, which is in the issue's own example config, is still dropped without a warning (see the inline comment).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| id: "`canonical`", | ||
| npm: "`package`", | ||
| options: "`settings`, `headers` and `body`", | ||
| whitelist: "top-level `permissions`", |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Top-level permissions are tool permission rules (Permission.Rule), and they can't hide or allow models. V2 has no native replacement for whitelist/blacklist yet (#49986; #54372 proposes migrating them to model disabled overrides). As written, this hint sends users to a setting that doesn't do this. I'd keep the existing "unsupported" wording for these two keys rather than naming a replacement.
tool_call is in the config from #56816 and is still dropped without a warning. Its v2 name is simply capabilities.tools, so naming it here would be a hint like the others and wouldn't change how the config is interpreted. Without it, a user who fixes npm/options from the warnings still silently loses tool support on that model.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The native `providers` key reports the V1 spellings it drops, but two of the hints pointed at settings that do not do the job, and the diagnostics only ever reached the log — the request that used such a provider still failed with a message that named nothing. - Report `whitelist`/`blacklist` with the plain unsupported wording: they filter models, and neither `permissions` nor anything else native replaces them yet. - Name the replacement for the capability spellings that have an exact native field: `tool_call`, `modalities` and `release_date`. - Keep the plain wording for the V1 flags that are not a rename of the structured `capabilities` field they resemble. - Name the missing package when a configured provider declares none, so the failure a user actually sees says which key to add instead of leaving an empty specifier.
|
Thanks — both inline points are fixed and the visibility gap is closed at the request instead of only in the log.
Verified: 124 pass across the three affected files, 299 across |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Closing this to stay within GitHub's 3-open-pull-request limit for contributors without write access, which currently blocks every new pull request here. The branch remains on my fork, so I can reopen it on request. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Config: custom provider under "providers" is accepted but silently drops npm and options.baseURL (v2.0.32)
There was an error while loading. Please reload this page.