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): migrate provider whitelist and blacklist to model overrides by cleardevice · Pull Request #54372 · anomalyco/opencode Conversation
|
|
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 change works. With a V1 custom provider that has whitelist: ["a"] and blacklist: ["c"], models on the base lists a, b and c; with this PR it lists only a. The config normalization and provider tests and typecheck in packages/core pass.
Public API (config):
providers.<id>.models["*"] as a provider-wide override. Only disabled is applied.provider.<id>.whitelist/blacklist were dropped with a diagnostic and are now migrated to model disabled overrides.{ disabled }-only entry for a model ID that doesn't exist no longer creates an empty model.This is compatible at the schema level, but behaviour changes: users who still have a stale whitelist/blacklist in V1 configs will suddenly see fewer models.
The new "*" key is a V2 config shape that a maintainer should agree on before merge. It also has a small gap at the place it is applied (inline comment).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if (configuredDefault !== undefined) models.default.set(configuredDefault.providerID, configuredDefault.model) | ||
| for (const [item, definition] of sources.models) { | ||
| const providerID = definition.providerID | ||
| const wildcard = item.models?.[MODEL_WILDCARD] |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Only disabled is read from "*". Any other field (e.g. "*": { "limit": ... }) passes schema decoding and is then dropped with no diagnostic. Since "*" is a special key, it would help to reject or report other fields under it during normalization or decoding. Also, plugin/provider/opencode.ts iterates item.models for console-managed configs without skipping "*", so it would register a model literally named * there. The wildcard should be handled (or skipped) in both places.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
2c87e04 to
e8579fe
Compare
|
Thanks, addressed in the updated commit:
Both are covered by tests. On the behavior change for stale V1 lists: this restores the documented behavior, and the migration only applies to configs that still carry |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
e8579fe to
939179e
Compare
|
Follow-up: dropping the extra fields under |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Independent, AI-assisted evidence for cleardevice's head DESIGN QUESTION: should an absent ID supplied only through a legacy filter be skipped for this provider too? The PR describes skipping such IDs, but this is not an approved contract or approval of the wildcard design. The immutable packet records 8 passing observations; the same fixtures under that intended expectation give 6 passes and 2 failures ( The editor records update requests; actual model creation/enabling was inspected, not run. Schema/Effect, catalog folding, live provider/Console behavior, Bun suites, typecheck and E2E remain untested. Implementation credit stays with cleardevice. opencode-agent's earlier wildcard/Console findings were addressed by cleardevice and are not repeated as current defects; design decisions remain with the owner/maintainers. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
939179e to
2001fb9
Compare
|
Thanks for the careful check, much appreciated. I was solving my own case (a plain custom provider) and didn't consider how the filters interact with the Confirmed. Besides the
Covered by a normalization test. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
7aee9f3 to
d1078d2
Compare
|
Native follow-through on your accepted Vertex repair, AI-assisted, at exact current head Added a real
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks, useful integration check. Cherry-picked onto the branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
7e39937 to
ee1c953
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The earlier point about "*" is addressed. Fields other than disabled under it now produce an "unsupported" diagnostic, and the console (opencode-legacy) and integration paths skip it, so no * model is registered. I re-checked with a V1 custom provider that has whitelist: ["a"] and blacklist: ["c"]: models lists a, b and c on the base and only a with this PR. The config normalization, provider and opencode provider tests pass, and tsc -b on packages/core is clean.
Public API (config):
providers.<id>.models["*"], which sets disabled for every model of the provider. Explicit entries without their own disabled follow it, including across config files.whitelist/blacklist now migrate to model disabled overrides instead of being dropped. On google-vertex-anthropic, whitelist still reports as unsupported.{ disabled }-only entry for a model ID that doesn't exist no longer creates a model.This is compatible at the schema level, but V1 configs that still have stale filters will now see fewer models. The new "*" shape still needs a maintainer to agree to it. Nothing else new that blocks.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
ee1c953 to
5670221
Compare
|
Rebased onto current dev (ff90ed9). Resolved conflicts with #60097 (variant preservation) and the removal of |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
5670221 to
57f7e51
Compare
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
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.
[FEATURE]: Add a native V2 replacement for provider model filtering
There was an error while loading. Please reload this page.