feat: add support for OpenCode Go provider#380
Open
jheronimus wants to merge 3 commits into
Open
Conversation
- Rewrite catalog.toml opencode-go provider sect with free models, thinking_models, model_metadata (thinking_level_map, level labels) - Add thinking_level_labels field to ProviderModelMetadata, ModelCatalogMetadata, catalog_loader, and provider_config - Fix provider_runtime OAuth guard: allow API-key auth for Anthropic-protocol models on openai-compatible providers
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.
Note: This PR is a continuation of the original #284, which was accidentally closed during a refactor of the personal fork. This is the same branch and changeset.
Upd: needed to isolate the branch with this commit, hence had to reopen. The old PR is here.
This PR adds OpenCode Go as a provider along with all 13 models it currently offers.
The settings for each models are cross-referenced with Anomalyco's own model declarations.
Caveat: OpenCode Go serves different models through different API shapes. Because of that, the PR adds support for model-scoped provider overrides, like transport kind (Anthropic/OpenAI), thinking levels, defaults, display labels, API values, and always-on reasoning. The point is to keep the UI honest: we don't show thinking levels that can't actually be selected, or do something else entirely.
For example, Qwen models send Anthropic-style budgeted thinking and can explicitly disable reasoning, MiniMax M3 uses adaptive/disabled, while DeepSeek/GLM effort models expose only the supported high/max levels.
Always-reasoning models do not show a selector, and Tau sends no fake reasoning control for them.
I tried to keep the changes provider-agnostic, so they can be reused for other mixed-behavior catalogs. For example, DeepSeek R1 on OpenRouter.