You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 9, 2026. It is now read-only.
PAI-OpenCode claims to be provider-agnostic with 75+ providers, but in practice spawning agents with different models from different providers is broken or severely limited. This is the #1 pain point for anyone who doesn't have an Anthropic Claude Max subscription.
What's Broken
Options-leak bug in upstream OpenCode — Unknown YAML frontmatter fields in agent .md files leak into LLM API requests via agent.options. This causes 400 Bad Request errors when using non-Anthropic providers that don't accept unknown fields. (Upstream PR #12967)
No model tier system — Every agent gets exactly ONE model. There's no way to say "use a cheap model for grunt work, but a powerful model for architecture decisions." The current opencode.json forces you to hardcode one model per agent, period.
All agents use the same provider — The provider profile system (switch-provider.ts) switches ALL agents at once. You can't mix providers: e.g., Opus on Anthropic for orchestration + Kimi K2.5 on Zen for coding + Sonar on Perplexity for search. The "multi-research" flag was a workaround but only covers research agents.
opencode.json template uses only Anthropic models — New users who set up PAI-OpenCode get a config that only works with an Anthropic API key. The template should demonstrate true multi-provider routing.
Real-World Impact
Users with Zen, OpenRouter, or other aggregator accounts can't use their subscriptions effectively
Cost optimization is impossible (can't route cheap tasks to cheap models)
The "75+ providers" claim is misleading when the agent system only works well with one provider at a time
Problem
PAI-OpenCode claims to be provider-agnostic with 75+ providers, but in practice spawning agents with different models from different providers is broken or severely limited. This is the #1 pain point for anyone who doesn't have an Anthropic Claude Max subscription.
What's Broken
Options-leak bug in upstream OpenCode — Unknown YAML frontmatter fields in agent
.mdfiles leak into LLM API requests viaagent.options. This causes400 Bad Requesterrors when using non-Anthropic providers that don't accept unknown fields. (Upstream PR #12967)No model tier system — Every agent gets exactly ONE model. There's no way to say "use a cheap model for grunt work, but a powerful model for architecture decisions." The current
opencode.jsonforces you to hardcode one model per agent, period.All agents use the same provider — The provider profile system (
switch-provider.ts) switches ALL agents at once. You can't mix providers: e.g., Opus on Anthropic for orchestration + Kimi K2.5 on Zen for coding + Sonar on Perplexity for search. The "multi-research" flag was a workaround but only covers research agents.opencode.json template uses only Anthropic models — New users who set up PAI-OpenCode get a config that only works with an Anthropic API key. The template should demonstrate true multi-provider routing.
Real-World Impact
Solution
Phase 1: Patched OpenCode Binary (pai-opencode fork)
We maintain a patched fork at
Steffen025/opencodewith:metadatainstead ofoptions(commit6710bdf)quick/standard/advancedtiers per agent (commita780316)1f4c44d)The Install Wizard should download this binary instead of upstream OpenCode.
Phase 2: True Multi-Provider Config Template
Update
opencode.jsonto demonstrate real multi-provider routing:{ "agent": { "Algorithm": { "model": "anthropic/claude-opus-4-6" // Orchestrator stays on Anthropic }, "Engineer": { "model": "opencode/kimi-k2.5", // Coding on Zen "model_tiers": { "quick": "opencode/minimax-m2.1", // Simple fixes "standard": "opencode/kimi-k2.5", // Normal coding "advanced": "opencode/glm-4.7" // Text/docs writing } }, "explore": { "model": "opencode/glm-4.7" // Tool-use optimized }, "PerplexityResearcher": { "model": "perplexity/sonar" // Native provider } // ... } }Phase 3: Agent System Alignment
model_tierselection guidance to the Algorithm/orchestrator instructionsTasktool passesmodel_tiercorrectly to agent resolutionScope of Work
Steffen025/opencode+ create GitHub Release with binarypai-opencodebinary from fork releasesopencode.jsontemplate (not just Anthropic-only)References
feature/model-tiersinanomalyco/opencodefork