Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 26 additions & 25 deletions docs/ADAPTER_GUIDE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Adapter Selection Guide

Bernstein supports 19 adapters for different CLI coding agents. This guide covers
when to use each, what they support, and how to configure them.
Bernstein supports 19 adapters for different CLI coding agents. This guide helps
you pick the right one for your use case.

All adapters implement the `CLIAdapter` interface (`adapters/base.py`): `spawn()`,
process monitoring via PID, log capture to `.sdd/runtime/<session>.log`, and
Expand All @@ -13,29 +13,30 @@ Source of truth: `src/bernstein/adapters/registry.py`, individual adapter files.

## Comparison Matrix

| Adapter | Provider | Models | Cost Tier | Tool Use | Structured Output | MCP Support | Install |
|---------|----------|--------|-----------|----------|-------------------|-------------|---------|
| `claude` | Anthropic | opus, sonnet, haiku | $$-$$$ | Full (scoped by role) | JSON schema enforced | Yes (--mcp-config) | `npm i -g @anthropic-ai/claude-code` |
| `codex` | OpenAI | gpt-4o, o3, o4-mini | $$-$$$ | Full | JSON (--json) | No | `npm i -g @openai/codex` |
| `gemini` | Google | gemini-2.5-pro/flash | Free-$$$ | Full | JSON (--output-format json) | No | `npm i -g @google/gemini-cli` |
| `aider` | Multi | Any via provider prefix | $-$$$ | File editing | No | No | `pip install aider-chat` |
| `amp` | Sourcegraph | Anthropic + OpenAI models | $$-$$$ | Full | No | No | `brew install amp` |
| `qwen` | Multi | qwen3-coder, qwen3.6 | Free-$$ | Full | No | No | Qwen CLI |
| `ollama` | Local | deepseek-r1, qwen2.5-coder, etc. | Free | File editing (via Aider) | No | No | `brew install ollama` + `pip install aider-chat` |
| `cody` | Sourcegraph | Anthropic/OpenAI/Google via SG | $$ | Chat only | No | No | Sourcegraph CLI (`sg`) |
| `cursor` | Cursor | Cursor's model routing | $$ | Full | No | Yes (--add-mcp) | `cursor` CLI from cursor.com |
| `goose` | Block | Anthropic models | $$-$$$ | Full | No | No | Block's Goose CLI |
| `roo-code` | Multi | Anthropic + OpenAI | $$-$$$ | Full | JSON (--output-format json) | No | `npm i -g @roo-code/cli` |
| `continue` | Multi | Anthropic/OpenAI/Google | $-$$$ | Full | No | Via config.yaml | `npm i -g @continuedev/continue-cli` |
| `opencode` | Multi | Any configured provider | $-$$$ | Full | JSON (--format json) | No | OpenCode CLI |
| `kiro` | AWS | AWS-managed models | $$ | Full | No | No | `kiro-cli` |
| `kilo` | Stackblitz | Any via provider routing | $-$$$ | Full | No | Yes (--mcp) | `kilo` from kilocode.ai |
| `tabby` | Self-hosted | Server-configured model | Free | Agent tasks | No | No | `npm i -g @tabbyml/tabby-agent` + server |
| `iac` | N/A | N/A (Terraform/Pulumi) | N/A | IaC plan+apply | No | No | `terraform` or `pulumi` |
| `generic` | Any | Pass-through | Varies | Depends on CLI | No | No | User-provided binary |
| `mock` | None | None (simulated) | Free | Simulated | Simulated | No | Built-in (testing only) |

**Cost tier key:** Free = no API cost, $ = <$0.01/task, $$ = $0.01-$0.10/task, $$$ = $0.10+/task.
| Adapter | Provider | Models | Reasoning | Cost Tier | Tool Use | Structured Output | MCP | Recommended Use Case |
|---------|----------|--------|-----------|-----------|----------|-------------------|-----|----------------------|
| `claude` | Anthropic | opus, sonnet, haiku | ★★★★★ (opus) / ★★★★ (sonnet) / ★★ (haiku) | $$–$$$ | Full (role-scoped) | JSON schema enforced | Yes | Primary workhorse — architecture, features, tests, docs |
| `codex` | OpenAI | o3, o4-mini, gpt-4o | ★★★★★ (o3/o4) / ★★★★ (gpt-4o) | $$–$$$ | Full | JSON (`--json`) | No | Provider diversity; OpenAI reasoning models |
| `gemini` | Google | gemini-2.5-pro, flash | ★★★★ (pro) / ★★★ (flash) | Free–$$$ | Full | JSON (`--output-format json`) | No | Free-tier usage; cost-effective medium tasks |
| `aider` | Multi | Any (Anthropic/OpenAI/Azure) | Inherited from model | $–$$$ | File editing | No | Commit-per-change workflows; focused file edits |
| `amp` | Sourcegraph | Anthropic + OpenAI models | ★★★★★ (opus/o3) | $$–$$$ | Full | No | Sourcegraph-integrated teams; codebase-aware context |
| `qwen` | Multi | qwen3-coder, qwen3.6-plus | ★★★ | Free–$$ | Full | No | Cost-sensitive; low-complexity tasks; free OpenRouter |
| `ollama` | Local | deepseek-r1, qwen2.5-coder, phi4 | ★★★ (r1:70b) / ★★ (7b) | Free | File editing (via Aider) | No | Air-gapped; privacy-sensitive; zero API cost |
| `cody` | Sourcegraph | Anthropic/OpenAI/Google (via SG) | Inherited from model | $$ | Chat only | No | Sourcegraph-integrated with codebase-level context |
| `cursor` | Cursor | Cursor's model routing | ★★★★ | $$ | Full | No | Teams with Cursor subscriptions |
| `goose` | Block | Anthropic models | ★★★★ | $$–$$$ | Full | No | Teams already using Block's Goose |
| `roo-code` | Multi | Anthropic + OpenAI | ★★★★ | $$–$$$ | Full | JSON (`--output-format json`) | No | VS Code extension users wanting headless CLI |
| `continue` | Multi | Anthropic/OpenAI/Google | Inherited from model | $–$$$ | Full | No | Teams with existing Continue.dev configurations |
| `opencode` | Multi | Any configured provider | Inherited from model | $–$$$ | Full | JSON (`--format json`) | No | Multi-provider setups; single CLI interface |
| `kiro` | AWS | AWS-managed models | ★★★ | $$ | Full | No | AWS-centric teams using AWS AI services |
| `kilo` | Stackblitz | Any (via provider routing) | Inherited from model | $–$$$ | Full | No | Web development; Stackblitz-integrated teams |
| `tabby` | Self-hosted | Server-configured model | Varies | Free | Agent tasks | No | Self-hosted; compliance-restricted; full model control |
| `iac` | N/A | N/A (Terraform/Pulumi) | N/A | N/A | IaC plan+apply | No | Infrastructure tasks — pair with LLM adapter for codegen |
| `generic` | Any | Pass-through | Depends on CLI | Varies | Depends on CLI | No | Unlisted CLIs; prototyping new adapters |
| `mock` | None | None (simulated) | N/A | Free | Simulated | Simulated | Unit and integration tests only |

**Reasoning key:** ★★★★★ Exceptional (frontier reasoning) · ★★★★ Strong · ★★★ Good · ★★ Basic · ★ Minimal
**Cost tier key:** Free = no API cost · $ = <$0.01/task · $$ = $0.01–$0.10/task · $$$ = $0.10+/task
Actual costs depend on task complexity, token usage, and provider pricing.

---
Expand Down
234 changes: 229 additions & 5 deletions docs/adapters.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,231 @@ <h2 id="why">Why model-agnostic</h2>
<li><strong>Future-proof</strong> — your task graph, roles, and prompts outlive any single model generation.</li>
</ul>

<h2 id="matrix">Feature matrix</h2>
<h2 id="matrix">Adapter comparison matrix</h2>

<p>Quick-reference for choosing an adapter. Reasoning scale: ★★★★★ exceptional (frontier) · ★★★★ strong · ★★★ good · ★★ basic. Cost: Free = no API cost · $ = &lt;$0.01/task · $$ = $0.01–$0.10 · $$$ = $0.10+.</p>

<div class="table-wrap">
<table>
<thead>
<tr>
<th>Adapter</th>
<th>Provider</th>
<th>Models</th>
<th>Reasoning</th>
<th>Cost Tier</th>
<th>Tool Use</th>
<th>Structured Output</th>
<th>MCP</th>
<th>Best For</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="#claude"><code>claude</code></a></td>
<td>Anthropic</td>
<td>opus / sonnet / haiku</td>
<td>★★★★★ opus · ★★★★ sonnet</td>
<td>$$–$$$</td>
<td>Full (role-scoped)</td>
<td>JSON schema enforced</td>
<td>✓</td>
<td>Primary workhorse — architecture, features, tests, docs</td>
</tr>
<tr>
<td><a href="#codex"><code>codex</code></a></td>
<td>OpenAI</td>
<td>o3, o4-mini, gpt-4o</td>
<td>★★★★★ o3 · ★★★★ gpt-4o</td>
<td>$$–$$$</td>
<td>Full</td>
<td>JSON (<code>--json</code>)</td>
<td>—</td>
<td>Provider diversity; OpenAI reasoning models</td>
</tr>
<tr>
<td><a href="#gemini"><code>gemini</code></a></td>
<td>Google</td>
<td>gemini-2.5-pro / flash</td>
<td>★★★★ pro · ★★★ flash</td>
<td>Free–$$$</td>
<td>Full</td>
<td>JSON (<code>--output-format</code>)</td>
<td>—</td>
<td>Free-tier usage; cost-effective medium tasks</td>
</tr>
<tr>
<td><a href="#aider"><code>aider</code></a></td>
<td>Multi</td>
<td>Any (Anthropic/OpenAI/Azure)</td>
<td>Inherited from model</td>
<td>$–$$$</td>
<td>File editing</td>
<td>—</td>
<td>—</td>
<td>Commit-per-change workflows; focused file edits</td>
</tr>
<tr>
<td><a href="#amp"><code>amp</code></a></td>
<td>Sourcegraph</td>
<td>opus 4.6, sonnet, o3</td>
<td>★★★★★ opus/o3</td>
<td>$$–$$$</td>
<td>Full</td>
<td>—</td>
<td>—</td>
<td>Sourcegraph-integrated teams; codebase-aware context</td>
</tr>
<tr>
<td><a href="#qwen"><code>qwen</code></a></td>
<td>Multi</td>
<td>qwen3-coder, qwen3.6-plus</td>
<td>★★★</td>
<td>Free–$$</td>
<td>Full</td>
<td>—</td>
<td>—</td>
<td>Cost-sensitive; low-complexity tasks; free OpenRouter</td>
</tr>
<tr>
<td><a href="#ollama"><code>ollama</code></a></td>
<td>Local</td>
<td>deepseek-r1, qwen2.5-coder, phi4</td>
<td>★★★ r1:70b · ★★ 7b</td>
<td>Free</td>
<td>File editing (Aider)</td>
<td>—</td>
<td>—</td>
<td>Air-gapped; privacy-sensitive; zero API cost</td>
</tr>
<tr>
<td><a href="#cody"><code>cody</code></a></td>
<td>Sourcegraph</td>
<td>Via SG routing</td>
<td>Inherited from model</td>
<td>$$</td>
<td>Chat</td>
<td>—</td>
<td>—</td>
<td>Sourcegraph-integrated with codebase-level context</td>
</tr>
<tr>
<td><a href="#cursor"><code>cursor</code></a></td>
<td>Cursor</td>
<td>Cursor's model routing</td>
<td>★★★★</td>
<td>$$</td>
<td>Full</td>
<td>—</td>
<td>✓ (<code>--add-mcp</code>)</td>
<td>Teams with Cursor subscriptions</td>
</tr>
<tr>
<td><a href="#goose"><code>goose</code></a></td>
<td>Block</td>
<td>Anthropic models</td>
<td>★★★★</td>
<td>$$–$$$</td>
<td>Full</td>
<td>—</td>
<td>—</td>
<td>Teams already using Block's Goose</td>
</tr>
<tr>
<td><a href="#roo-code"><code>roo-code</code></a></td>
<td>Multi</td>
<td>Anthropic + OpenAI</td>
<td>★★★★</td>
<td>$$–$$$</td>
<td>Full</td>
<td>JSON (<code>--output-format</code>)</td>
<td>—</td>
<td>VS Code extension users wanting headless CLI</td>
</tr>
<tr>
<td><a href="#continue"><code>continue</code></a></td>
<td>Multi</td>
<td>Anthropic/OpenAI/Google</td>
<td>Inherited from model</td>
<td>$–$$$</td>
<td>Full</td>
<td>—</td>
<td>Via config</td>
<td>Teams with existing Continue.dev configurations</td>
</tr>
<tr>
<td><a href="#opencode"><code>opencode</code></a></td>
<td>Multi</td>
<td>Any configured provider</td>
<td>Inherited from model</td>
<td>$–$$$</td>
<td>Full</td>
<td>JSON (<code>--format json</code>)</td>
<td>—</td>
<td>Multi-provider setups; single CLI interface</td>
</tr>
<tr>
<td><a href="#kiro"><code>kiro</code></a></td>
<td>AWS</td>
<td>AWS-managed models</td>
<td>★★★</td>
<td>$$</td>
<td>Full</td>
<td>—</td>
<td>—</td>
<td>AWS-centric teams using AWS AI services</td>
</tr>
<tr>
<td><a href="#kilo"><code>kilo</code></a></td>
<td>Stackblitz</td>
<td>Any (provider routing)</td>
<td>Inherited from model</td>
<td>$–$$$</td>
<td>Full</td>
<td>—</td>
<td>✓ (<code>--mcp</code>)</td>
<td>Web development; Stackblitz-integrated teams</td>
</tr>
<tr>
<td><a href="#tabby"><code>tabby</code></a></td>
<td>Self-hosted</td>
<td>Server-configured</td>
<td>Varies</td>
<td>Free</td>
<td>Agent tasks</td>
<td>—</td>
<td>—</td>
<td>Self-hosted; compliance-restricted; full model control</td>
</tr>
<tr>
<td><a href="#iac"><code>iac</code></a></td>
<td>N/A</td>
<td>N/A (Terraform/Pulumi)</td>
<td>N/A</td>
<td>N/A</td>
<td>IaC plan+apply</td>
<td>—</td>
<td>—</td>
<td>Infrastructure tasks — pair with LLM adapter for codegen</td>
</tr>
<tr>
<td><a href="#generic"><code>generic</code></a></td>
<td>Any</td>
<td>Pass-through</td>
<td>Depends on CLI</td>
<td>Varies</td>
<td>Depends on CLI</td>
<td>—</td>
<td>—</td>
<td>Unlisted CLIs; prototyping new adapters</td>
</tr>
</tbody>
</table>
</div>

<h3>Detailed feature matrix</h3>

<p>Adapter capabilities at a glance:</p>

<div class="table-wrap">
<table>
Expand Down Expand Up @@ -188,14 +412,14 @@ <h2 id="matrix">Feature matrix</h2>
<td>—</td>
<td>—</td>
<td>✓ (stream-json)</td>
<td>✓ (--json)</td>
<td>—</td>
<td>—</td>
<td>—</td>
<td>✓ (--output-format json)</td>
<td>—</td>
<td>✓ (--format json)</td>
<td>✓ (--format json)</td>
<td>—</td>
<td>—</td>
<td>—</td>
<td>✓ (--output-format json)</td>
<td>—</td>
</tr>
<tr>
Expand Down
Loading
Loading