OpenCode CLI Provider Integration
OpenCode CLI (v1.3.0) added as a full provider — a multi-provider router that routes to Google, OpenAI, OpenCode (native), and OpenRouter backends via unified opencode run command.
What's New
- New provider: OpenCode CLI — 12 files across all provider subsystems
- Headless dispatch:
opencode run -m <provider/model> "<prompt>" - Auth detection via
opencode auth list(avoids XDG path variance + token expiry blindspot) - Default model:
google/gemini-2.5-flash(free, fast) - Cost tier:
variable(free for native models, backend pricing for proxied) - Priority 4 — alternative auth path when user has OpenCode but not native Codex/Gemini
Architecture Decisions (from Double Diamond debate gate)
- Default text output with ANSI stripping (not JSON parsing) — consistent with all providers, avoids jq dependency
- Conservative capabilities:
code,chat,analysis— no false vision/long-context promises timeout 3 opencode auth listfor auth verification — learned from Codex OAuth expiry incident
Code Review Fixes
- BLOCKER:
validate_agent_command()whitelist missing opencode — all dispatch would silently fail get_cost_tier_for_subscription()missing opencode case — cost tier always wrongselect_provider()iteration list excluded opencode — never auto-selected- Ollama also missing from command whitelist (pre-existing, fixed alongside)
Test Results
- Main suite: 201/203 (2 pre-existing)
- Command registration: 59/59
- Version consistency: 22/23 (1 pre-existing)
- CI: All checks passed