Visitar URL original
feat(config): support provider model wildcard overrides by smnmsr · Pull Request #63710 · anomalyco/opencode · GitHub
Skip to content

feat(config): support provider model wildcard overrides - #63710

Draft
smnmsr wants to merge 1 commit into
anomalyco:devfrom
smnmsr:model-wildcards
Draft

smnmsr wants to merge 1 commit into
anomalyco:devfrom
smnmsr:model-wildcards

Conversation

@smnmsr

@smnmsr smnmsr commented Nov 13, 2026 •

Copy link
Copy Markdown

Issue for this PR

Refs #63711. Design approval is pending.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds * and ? patterns to providers.<id>.models, so a config can disable the catalog with "*": { "disabled": true } and explicitly enable selected presets instead of listing every model.

Matching patterns apply in declaration order before literal entries within each document. Later documents take precedence. Patterns match known/discovered models and explicitly declared IDs without creating models for unmatched patterns. Normal and integration configs share this behavior.

Includes a schema description and V2 documentation example. No feature flag is included: the new syntax is opt-in; flag/design requirements remain open for maintainer feedback.

How did you verify your code works?

Added tests for wildcard defaults, literal precedence regardless of key position, overlapping patterns, disabled alias targets, later-document overrides, discovered models, early limits, integration config, and unmatched patterns.

Passed locally:

  • 58 focused tests
  • Provider suite repeated 10 times (480 tests)
  • Full bun run check
  • Full site build
  • git diff --check

Screenshots / recordings

N/A — configuration feature; no visual changes. Live-provider/manual UI testing was not performed.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant