Skip to content

fix(provider): preserve config precedence after model hooks#26041

Closed
shlroland wants to merge 1 commit intoanomalyco:devfrom
shlroland:fix/provider-hook-config-precedence
Closed

fix(provider): preserve config precedence after model hooks#26041
shlroland wants to merge 1 commit intoanomalyco:devfrom
shlroland:fix/provider-hook-config-precedence

Conversation

@shlroland
Copy link
Copy Markdown

Summary

  • reapply full config provider/model overlays after plugin provider.models() hooks run
  • keep config-only providers eligible for model hook expansion while preserving user config precedence
  • add a regression test covering config-only providers plus config override precedence

Context

This addresses the regression introduced by #25167 for config-only custom providers. Those providers could stop hitting provider.models() even though they were defined in opencode.json, while the original fix still needs user config to win over plugin hook output.

Testing

  • bun test test/provider/provider.test.ts (blocked locally: preload package @opentui/solid/preload is missing in this workspace)
  • bun typecheck (blocked locally: tsgo is not installed in this workspace)

@github-actions github-actions Bot added needs:issue needs:compliance This means the issue will auto-close after 2 hours. labels May 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant