OpenCode is Shiba’s default coding agent harness. It is open source, highly extensible, and supports multi-provider LLM backends through your Cloudflare AI Gateway.
Agent Overview
| Attribute | Specification |
|---|---|
| Harness ID | opencode (default) |
| CLI Binary | opencode |
| Pinned Version | 1.18.34 (in Dockerfile) |
| Default Model | google/gemini-3.5-flash-lite |
| Supported Providers | Google AI Studio, Anthropic, OpenAI, xAI (Grok), OpenCode Go |
| Credential Model | AI Gateway BYOK (dummy key inside sandbox; real key injected at egress) |
| Invocation | opencode run "<task>" --format json |
Multi-Provider Support
OpenCode can route tasks across multiple AI providers by prefixing the model with the provider slug:
# Google Gemini
google/gemini-3.5-flash-lite
google/gemini-1.5-pro
# xAI Grok
xai/grok-4
# Anthropic Claude
anthropic/claude-sonnet-4-6
# OpenAI
openai/gpt-4oHow It Works
Developer Request
└── CodingOrchestrator generates delegate_coding_task({ harness: "opencode" })
└── Human signs off on exact prompt & repository
└── Ephemeral Cloudflare Sandbox boots
├── Writes per-run .opencode.json configuration
├── Executes: opencode run "<task>" --format json
├── Streams newline-delimited JSON events
└── Collects git status and builds unified diffConfiguration & Deployment
1. Configure Providers in AI Gateway
Add your provider keys (Google, Anthropic, OpenAI, xAI) to your Cloudflare AI Gateway.
2. Set Default Model
In wrangler.jsonc or via environment variables:
pnpm wrangler secret put CODING_MODEL --config apps/backend/wrangler.jsonc # enter "google/gemini-3.5-flash-lite"Selecting OpenCode in a Task
OpenCode is used by default if no harness is explicitly provided:
{
"repoUrl": "https://github.com/acme/web",
"task": "Add dark mode toggle to navigation bar",
"baseBranch": "main",
"harness": "opencode",
"codingModel": "xai/grok-4"
}