fix(models): opencode aggregator picker catalog + uncap + scoped live-first; clear stale gateway base_url - #53977
Merged
Merged
Conversation
Follow-up to the salvaged #49129 commit. The original change flipped the shared generic-provider merge in provider_model_ids() to live-first unconditionally, which regressed curated-first for single providers (kimi/zai, #46309) — and the PR encoded that regression by flipping the kimi-coding and zai test assertions to expect live-first. Gate live-first on an explicit _LIVE_FIRST_PICKER_PROVIDERS set ({opencode-zen, opencode-go}); every other provider keeps curated-first. Also widen the uncapped picker + live-first sets to opencode-go, which has the same 70+ model catalog problem as opencode-zen. Restore the kimi-coding curated-first test and rewrite the merge-order test to assert the per-provider contract.
Contributor
🔎 Lint report:
|
| Rule | Count |
|---|---|
invalid-assignment |
1 |
First entries
tests/run_agent/test_credits_notices_toggle.py:76: [invalid-assignment] invalid-assignment: Object of type `None` is not assignable to attribute `_credits_session_start_micros` of type `int`
✅ Fixed issues (2):
| Rule | Count |
|---|---|
unresolved-attribute |
2 |
First entries
tests/run_agent/test_credits_notices_toggle.py:76: [unresolved-attribute] unresolved-attribute: Unresolved attribute `_credits_session_start_micros` on type `AIAgent`
run_agent.py:3017: [unresolved-attribute] unresolved-attribute: Object of type `Self@get_credits_spent_micros` has no attribute `_credits_session_start_micros`
Unchanged: 6090 pre-existing issues carried over.
Diagnostics are surfaced as warnings — this check never fails the build.
This was referenced Jun 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two salvaged fixes for the OpenCode Zen / Go model picker, both surfaced by a Discord
/modelreport whereopencode/nemotron-3-ultra-freewas missing from the dropdown and a typed switch failed against a stale build.nemotron-3-ultra-free), uncaps the picker for OpenCode aggregators so their full 70+ catalog is visible instead of being cut to 25 before display, and merges live-API entries first for aggregators (their live/v1/modelsis the authoritative catalog).model.base_urlwhen the gateway persists a/modelswitch to a built-in provider, completing the endpoint-cleanup gap from merged fix(model): clear stale endpoint credentials across all provider switches #49380.What was salvaged + corrected
The original #49129 made the live-first merge unconditional in the shared
provider_model_ids()profile branch — which regressed curated-first for single providers (kimi/zai, #46309) and encoded that regression by flipping the existingkimi-codingandzaitest assertions to expect live-first. Salvage scopes live-first to an explicit_LIVE_FIRST_PICKER_PROVIDERS = {opencode-zen, opencode-go}; every other provider keeps curated-first. The uncapped-picker and live-first sets were both widened toopencode-go, which has the same large-catalog problem.The
#51488change is correct as-is: built-in providers resolve their endpoint from the provider profile, so popping the stock/stale inlinebase_urlfor non-customproviders is the right behavior;customendpoints keep theirbase_url(guarded by the!= "custom"check).clear_base_urlis opt-in (defaultFalse), so no other caller changes behavior.Changes
hermes_cli/models.py: refreshed opencode-zen curated catalog; per-provider merge order via_LIVE_FIRST_PICKER_PROVIDERS.hermes_cli/model_switch.py:_UNCAPPED_PICKER_PROVIDERS= {opencode-zen, opencode-go}.hermes_cli/config.py: opt-inclear_base_urlonclear_model_endpoint_credentials().gateway/slash_commands.py: clear stale inlinebase_urlfor non-customproviders on gateway model-switch persistence.kimi-codingcurated-first assertion; opencode-zen uncap + gateway base_url-persist guards.scripts/release.py: AUTHOR_MAP entries for both contributors.Validation
opencode/nemotron-3-ultra-freein pickerbase_urlbase_urlclearedbase_urlTargeted tests: 27 passed (model catalog, live/curated merge, uncap, models.dev merge, gateway persist). E2E verified the reported
/modelswitch resolves cleanly toopencode-zenand the stale-base_urlclear/preserve behavior with real config I/O.Closes the picker side of the OpenCode Zen report; salvages #49129 (@Afnath-max) and #51488 (@ipriyaaanshu) with authorship preserved.
Infographic