adding pi for gigacode

This commit is contained in:
Franklin 2026-02-06 23:20:50 -05:00
parent bd030904bc
commit e37bde0103
3 changed files with 9 additions and 5 deletions

View file

@ -2,7 +2,7 @@
<img src="../.github/media/gigacode-header.jpeg" alt="Gigacode. Use OpenCode's UI with any coding agent." /> <img src="../.github/media/gigacode-header.jpeg" alt="Gigacode. Use OpenCode's UI with any coding agent." />
</p> </p>
<h3 align="center">Supports Claude Code, Codex, and Amp.</h3> <h3 align="center">Supports Claude Code, Codex, Pi, and Amp.</h3>
<p align="center"> <p align="center">
<i>This is <u>not</u> a fork (and never will be).<br/>It's powered by <a href="https://sandboxagent.dev">Sandbox Agent SDK</a>'s wizardry.<br/>Experimental & just for fun.</i> <i>This is <u>not</u> a fork (and never will be).<br/>It's powered by <a href="https://sandboxagent.dev">Sandbox Agent SDK</a>'s wizardry.<br/>Experimental & just for fun.</i>
@ -19,23 +19,23 @@
┌─ Gigacode ────────────────────────────────────────────────────────┐ ┌─ Gigacode ────────────────────────────────────────────────────────┐
│ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │ │ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │
│ │ OpenCode TUI │───▶│ Sandbox Agent │───▶│ Claude Code / │ │ │ │ OpenCode TUI │───▶│ Sandbox Agent │───▶│ Claude Code / │ │
│ │ │ │ │ │ Codex / Amp │ │ │ │ │ │ │ │ Codex / Pi / Amp │ │
│ └─────────────────┘ └─────────────────┘ └─────────────────┘ │ │ └─────────────────┘ └─────────────────┘ └─────────────────┘ │
└───────────────────────────────────────────────────────────────────┘ └───────────────────────────────────────────────────────────────────┘
``` ```
- [Sandbox Agent SDK](https://sandboxagent.dev) provides a universal HTTP API for controlling Claude Code, Codex, and Amp - [Sandbox Agent SDK](https://sandboxagent.dev) provides a universal HTTP API for controlling Claude Code, Codex, Pi, and Amp
- Sandbox Agent SDK exposes an [OpenCode-compatible endpoint](https://sandboxagent.dev/docs/opencode-compatibility) so OpenCode can talk to any agent - Sandbox Agent SDK exposes an [OpenCode-compatible endpoint](https://sandboxagent.dev/docs/opencode-compatibility) so OpenCode can talk to any agent
- OpenCode connects to Sandbox Agent SDK via [`attach`](https://opencode.ai/docs/cli/#attach) - OpenCode connects to Sandbox Agent SDK via [`attach`](https://opencode.ai/docs/cli/#attach)
## OpenCode Models vs Gigacode Agents ## OpenCode Models vs Gigacode Agents
- **OpenCode** supports **switching between inference providers** (Anthropic, OpenAI, etc.). This is OpenCode talking directly to the models with its own tools, system prompts, and agentic loop. - **OpenCode** supports **switching between inference providers** (Anthropic, OpenAI, etc.). This is OpenCode talking directly to the models with its own tools, system prompts, and agentic loop.
- **Gigacode** automates other coding agent harnesses, so it's using the **exact same logic that you would if you ran Claude Code**, Codex, or Amp natively. - **Gigacode** automates other coding agent harnesses, so it's using the **exact same logic that you would if you ran Claude Code**, Codex, Pi, or Amp natively.
``` ```
OpenCode (native): Model → OpenCode's tool loop → result OpenCode (native): Model → OpenCode's tool loop → result
Gigacode: Model → Claude Code / Codex / Amp CLI → result Gigacode: Model → Claude Code / Codex / Pi / Amp CLI → result
``` ```
This means you get each agent's specialized capabilities (such as Claude Code's `Read`/`Write`/`Bash` tools, Codex's sandboxed execution, and Amp's permission rules) rather than a single tool loop with different models behind it. This means you get each agent's specialized capabilities (such as Claude Code's `Read`/`Write`/`Bash` tools, Codex's sandboxed execution, and Amp's permission rules) rather than a single tool loop with different models behind it.

View file

@ -614,6 +614,7 @@ fn available_agent_ids() -> Vec<AgentId> {
AgentId::Codex, AgentId::Codex,
AgentId::Opencode, AgentId::Opencode,
AgentId::Amp, AgentId::Amp,
AgentId::Pi,
AgentId::Mock, AgentId::Mock,
] ]
} }

View file

@ -31,10 +31,12 @@ describe("OpenCode-compatible Model API", () => {
const providers = response.data?.all ?? []; const providers = response.data?.all ?? [];
const mockProvider = providers.find((entry) => entry.id === "mock"); const mockProvider = providers.find((entry) => entry.id === "mock");
const ampProvider = providers.find((entry) => entry.id === "amp"); const ampProvider = providers.find((entry) => entry.id === "amp");
const piProvider = providers.find((entry) => entry.id === "pi");
const sandboxProvider = providers.find((entry) => entry.id === "sandbox-agent"); const sandboxProvider = providers.find((entry) => entry.id === "sandbox-agent");
expect(sandboxProvider).toBeUndefined(); expect(sandboxProvider).toBeUndefined();
expect(mockProvider).toBeDefined(); expect(mockProvider).toBeDefined();
expect(ampProvider).toBeDefined(); expect(ampProvider).toBeDefined();
expect(piProvider).toBeDefined();
const mockModels = mockProvider?.models ?? {}; const mockModels = mockProvider?.models ?? {};
expect(mockModels["mock"]).toBeDefined(); expect(mockModels["mock"]).toBeDefined();
@ -57,6 +59,7 @@ describe("OpenCode-compatible Model API", () => {
expect(providerIds.has("claude")).toBe(true); expect(providerIds.has("claude")).toBe(true);
expect(providerIds.has("codex")).toBe(true); expect(providerIds.has("codex")).toBe(true);
expect(providerIds.has("pi")).toBe(true);
expect( expect(
providerIds.has("opencode") || Array.from(providerIds).some((id) => id.startsWith("opencode:")) providerIds.has("opencode") || Array.from(providerIds).some((id) => id.startsWith("opencode:"))
).toBe(true); ).toBe(true);