feat(tui): add manual model list refresh action - #40303
Closed
RubenPari wants to merge 3 commits into
Closed
Conversation
Providers that enforce a one-minute limit window can return HTTP 400 with a JSON body whose `detail` says "rate limit exceeded". OpenCode previously treated all 400s as terminal. When `retry400RateLimit: true` is set under `provider.<id>.options`, matching 400 responses now enter the existing retry flow. Generic 400s and the default (flag absent/false) remain non-retryable. Fixes anomalyco#40241 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Exposes a new POST /provider/refresh endpoint that force-refreshes the ModelsDev catalog from models.opencode.ai (bypassing the 60-minute background schedule), regenerates the SDK, and wires a "Refresh models" action button into the TUI model selection dialog so users can pull in newly published models on demand. Closes anomalyco#40252 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
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. |
Contributor
|
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. |
|
Disappointed to see that this improvement came from a PR rather than the developer realizing how annoying it is to update the custom vendor model list on desktop. |
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
POST /provider/refreshHTTP endpoint that force-refreshes the ModelsDev catalog frommodels.opencode.ai, bypassing the 60-minute automatic schedulesdk.client.provider.refresh()is availablerefreshProviders()helper to the sync context that calls the endpoint and batch-updates the provider stores<leader>m//models) — Tab to it and press Enter to pull in newly published models on demandCloses #40252
Test plan
<leader>mor/models)bun typecheckinpackages/tuiandpackages/opencode— both pass🤖 Generated with Claude Code