Skip to content

feat: add support for OpenCode Go provider#380

Open
jheronimus wants to merge 3 commits into
huggingface:mainfrom
jheronimus:opencode-go-support
Open

feat: add support for OpenCode Go provider#380
jheronimus wants to merge 3 commits into
huggingface:mainfrom
jheronimus:opencode-go-support

Conversation

@jheronimus

Copy link
Copy Markdown
Contributor

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.

- 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
@jheronimus
jheronimus requested a review from alejandro-ao as a code owner July 16, 2026 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant