feat(providers): add OpenCode Zen + Go to the model picker

Author: drmaasCreated Jul 25, 2026Updated Sep 26, 2026

Summary

OpenCode (opencode.ai/zen) offers a hosted model aggregator and a flat-rate subscription tier behind a SINGLE OpenCode API key. Today neither surfaces in the model picker, so users hand-rolling opencode_zen:<model> strings have to drop down to the matrix label fallback.

Proposed change

Add two new picker entries that route independently but share one secret:

  • opencode_zen (credit-tier frontier models: gpt-5.6, claude-fable-5, grok-4.5, gemini-3.1-pro-preview, glm-5.2, qwen3.7-max, deepseek-v4-pro, kimi-k3).
  • opencode_go (flat-rate subscription tier: kimi-k3, kimi-k2.7-code, kimi-k2.6, minimax-m2.5, qwen3.7-plus, deepseek-v4-flash, glm-5.1).

Both reach the same OpenAI-compatible endpoint https://opencode.ai/zen/go/v1/ and bill under one OpenCode account.

Plumbing (mostly already done on feat/opencode-providers)

  • ProviderDescriptor gains a key_profile: Optional[str] field. Provider secrets flow through provider:<key_profile> instead of per provider.
  • ProviderRouter._client_for merges provider:<key_profile> (shared) + provider:<name> (own wins for non-secret fields) before invoking the build factory.
  • ProviderRouter.invalidate(name) drops siblings sharing the same key_profile so a shared-key change widens the cache wipe.
  • SessionManager.set_provider writes secrets to the shared profile; non-secrets stay per-provider; remove_provider deletes both; verify_provider falls back to shared; get_providers checks both for configured.
  • _provider_configured keeps its semver: still returns True when either layer holds the key.

Acceptance criteria

  • A user pastes the OpenCode key into either card once; BOTH cards immediately render ✓ Connected.
  • Curated model lists are distinct and non-overlapping except for the planned tier-shared model (kimi-k3).
  • Remove key… on either card disconnects BOTH.
  • Default model flow: first configured opencode_zen takes over the default; a later opencode_go does NOT steal it.
  • Tests: 12 new tests in tests/test_providers.py and tests/test_provider_router.py. (Currently 4 pass at registry-level; 7 of the SessionManager-level tests hit a transitive aisuite.agents env blocker — separate from this change.)

UX screenshots

Per CONTRIBUTING, PRs must include screenshots of the picker with both cards visible and the ✓ Connected state. Will attach when the PR is opened.