-
Notifications
You must be signed in to change notification settings - Fork 6.4k
core: refactor provider and model system #5033
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Changed model identification from using model.id to model.target when calling providers, allowing users to specify alternate model IDs while maintaining internal references. This enables more flexible provider configurations and better model mapping.
|
/oc review this for any bugs or gaps |
|
Now let me create a comprehensive review document: PR REVIEW: Core Provider and Model System RefactorIssues Found🔴 CRITICAL BUG #1: Missing
|
|
/oc look at the diff the target thing isn't even a thing anymore |
|
Perfect! Both fixes are in place. The changes now correctly use the
The review's concern about the |
|
|
||
| if (modelID.includes("gpt-5") && !modelID.includes("gpt-5-chat")) { | ||
| if (modelID.includes("codex")) { | ||
| if (model.providerID.includes("gpt-5") && !model.api.id.includes("gpt-5-chat")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bug?
* ignore: update download stats 2025-12-03 * ignore: docs & style * chore: format code * add retry case for grok resource exhausted * feat: experimental.primary_tools, allow user to set the tools that should only be available to primary agents (anomalyco#4913) Co-authored-by: GitHub Action <action@github.com> * fix: bunfs path on windows (anomalyco#5011) * feat: add messages_last_user command to scroll TUI to last user message (implements anomalyco#4847) (anomalyco#4855) Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> * ci: add pr review * ci: make review only fire on non draft pr creation * zen: usage graph respect light/dark mode * ci: tweak review cmd * ci: review ready for review action * feat: add tool_details keybind w/ no default (anomalyco#4976) Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> * ci: review tweak * zen: fix chart loading closes anomalyco#5030 * core: add provider test coverage for upcoming refactor Add comprehensive test suite for Provider module to ensure safe refactoring of provider internals. Tests cover: - Provider loading from env vars and config - Provider filtering (disabled_providers, enabled_providers) - Model whitelist/blacklist - Model aliasing and custom providers - getModel, getProvider, closest, defaultModel functions Also adds Env module for instance-scoped environment variable access, enabling isolated test environments without global state pollution. * core: refactor provider and model system (anomalyco#5033) Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: thdxr <thdxr@users.noreply.github.com> * bump opentui * Update Nix flake.lock and hashes * fix: dax typo * fix: compaction type issue * fix: provider id issue * ci: add note about iife * docs: remove outdated theme section as system theme is now added back (anomalyco#5041) * feat: Enhance DeepSeek reasoning content handling (anomalyco#4975) Co-authored-by: Aiden Cline <aidenpcline@gmail.com> * release: v1.0.130 * sync: record last synced tag v1.0.130 Fixed type error in prompt.ts: model.modelID -> model.id --------- Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Aiden Cline <aidenpcline@gmail.com> Co-authored-by: Spoon <212802214+spoons-and-mirrors@users.noreply.github.com> Co-authored-by: Luke Parker <10430890+Hona@users.noreply.github.com> Co-authored-by: Ariane Emory <97994360+ariane-emory@users.noreply.github.com> Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Co-authored-by: Frank <frank@sst.dev> Co-authored-by: Dax Raad <d@ironbay.co> Co-authored-by: Dax <mail@thdxr.com> Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: thdxr <thdxr@users.noreply.github.com> Co-authored-by: Jack Bisceglia <57922742+jackbisceglia@users.noreply.github.com> Co-authored-by: Jakub Matjanowski <k.matjanowski@gmail.com> Co-authored-by: opencode <opencode@sst.dev>
* ignore: update download stats 2025-12-03 * ignore: docs & style * chore: format code * add retry case for grok resource exhausted * feat: experimental.primary_tools, allow user to set the tools that should only be available to primary agents (anomalyco#4913) Co-authored-by: GitHub Action <action@github.com> * fix: bunfs path on windows (anomalyco#5011) * feat: add messages_last_user command to scroll TUI to last user message (implements anomalyco#4847) (anomalyco#4855) Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> * ci: add pr review * ci: make review only fire on non draft pr creation * zen: usage graph respect light/dark mode * ci: tweak review cmd * ci: review ready for review action * feat: add tool_details keybind w/ no default (anomalyco#4976) Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> * ci: review tweak * zen: fix chart loading closes anomalyco#5030 * core: add provider test coverage for upcoming refactor Add comprehensive test suite for Provider module to ensure safe refactoring of provider internals. Tests cover: - Provider loading from env vars and config - Provider filtering (disabled_providers, enabled_providers) - Model whitelist/blacklist - Model aliasing and custom providers - getModel, getProvider, closest, defaultModel functions Also adds Env module for instance-scoped environment variable access, enabling isolated test environments without global state pollution. * core: refactor provider and model system (anomalyco#5033) Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: thdxr <thdxr@users.noreply.github.com> * bump opentui * Update Nix flake.lock and hashes * fix: dax typo * fix: compaction type issue * fix: provider id issue * ci: add note about iife * docs: remove outdated theme section as system theme is now added back (anomalyco#5041) * feat: Enhance DeepSeek reasoning content handling (anomalyco#4975) Co-authored-by: Aiden Cline <aidenpcline@gmail.com> * release: v1.0.130 * zen: fix chart loading * chore: format code * fix: TypeError: undefined is not an object * release: v1.0.131 * sync: record last synced tag v1.0.131 --------- Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Aiden Cline <aidenpcline@gmail.com> Co-authored-by: Spoon <212802214+spoons-and-mirrors@users.noreply.github.com> Co-authored-by: Luke Parker <10430890+Hona@users.noreply.github.com> Co-authored-by: Ariane Emory <97994360+ariane-emory@users.noreply.github.com> Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Co-authored-by: Frank <frank@sst.dev> Co-authored-by: Dax Raad <d@ironbay.co> Co-authored-by: Dax <mail@thdxr.com> Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: thdxr <thdxr@users.noreply.github.com> Co-authored-by: Jack Bisceglia <57922742+jackbisceglia@users.noreply.github.com> Co-authored-by: Jakub Matjanowski <k.matjanowski@gmail.com> Co-authored-by: opencode <opencode@sst.dev>


Summary
targetfield for provider calls, allowing users to specify alternate model IDs while maintaining internal references