OpenCode
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
Section titled “Agent Overview”| Attribute | Specification |
|---|---|
| Harness ID | opencode (default) |
| CLI Binary | opencode |
| Pinned Version | 1.18.31 (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
Section titled “Multi-Provider Support”OpenCode can route tasks across multiple AI providers by prefixing the model with the provider slug:
# Google Geminigoogle/gemini-3.5-flash-litegoogle/gemini-1.5-pro
# xAI Grokxai/grok-4
# Anthropic Claudeanthropic/claude-sonnet-4-6
# OpenAIopenai/gpt-4oHow It Works
Section titled “How 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
Section titled “Configuration & Deployment”1. Configure Providers in AI Gateway
Section titled “1. Configure Providers in AI Gateway”Add your provider keys (Google, Anthropic, OpenAI, xAI) to your Cloudflare AI Gateway.
2. Set Default Model
Section titled “2. Set Default Model”In wrangler.jsonc or via environment variables:
pnpm wrangler secret put CODING_MODEL # enter "google/gemini-3.5-flash-lite"Selecting OpenCode in a Task
Section titled “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"}