Skip to content

CLI Providers

Octipus registers six CLI configurations in src/models/providers/cli-provider.ts. They use four executable binaries: GLM and Kimi reuse claude with vendor-specific credentials and endpoints; they do not invoke standalone glm or kimi binaries.

ConfigurationBinaryRecognized model prefixesAuthentication
Claude Codeclaudecli/claude, cli/claude-codeInstalled CLI’s authentication and inherited environment
Antigravityagycli/antigravity, cli/agy, legacy cli/gemini, cli/gemini-cliInstalled CLI’s authentication and inherited environment
Codex CLIcodexcli/codex, cli/codex-cliInstalled CLI’s authentication and inherited environment
Mistral Vibevibecli/vibe, cli/mistral-vibeVibe’s configured authentication and inherited environment
Claude Code (z.ai GLM)claudecli/glm, cli/glm-code, cli/zaiZAI_API_KEY, otherwise system-vault zai_api_key
Claude Code (Moonshot Kimi)claudecli/kimi, cli/kimi-code, cli/moonshotMOONSHOT_API_KEY, otherwise system-vault moonshot_api_key

Prefix matching accepts the exact value or a slash-delimited suffix. Such a suffix does not itself guarantee that the CLI selects that upstream model. Antigravity replaces the old Gemini adapter inside Octipus; legacy cli/gemini records now invoke agy.

Authenticate and test the binary as the operating-system user running Octipus. Binary detection establishes installation, not valid credentials, model access, or usable quota. Billing and availability remain vendor-managed; Octipus does not guarantee subscription coverage.

Configure agent settings in Models → CLI Tools, stored in metadata.cliAgent. The agent argument builder uses these controls:

ConfigurationModel selection
Claude CodeCLAUDE_MODEL, then stored model, passed as --model; otherwise the CLI default
AntigravityANTIGRAVITY_MODEL, then legacy GEMINI_MODEL, then stored model, passed as --model
Codex CLICODEX_MODEL, then stored model, passed as -c model=...
Mistral VibeVibe’s own active_model configuration; the adapter does not pass a model flag
z.ai GLMZAI_CLI_MODEL is injected as ANTHROPIC_MODEL; repository default glm-4.6
Moonshot KimiMOONSHOT_CLI_MODEL is injected as ANTHROPIC_MODEL; repository default kimi-k2-0711-preview

GLM and Kimi also reuse the Claude argument builder: a configured CLAUDE_MODEL or stored agent model adds an explicit --model flag alongside the injected ANTHROPIC_MODEL. Avoid conflicting settings and verify the model actually selected by your installed CLI. Repository defaults are not promises of continued upstream availability.

For GLM, ZAI_ANTHROPIC_BASE_URL overrides the default https://api.z.ai/api/anthropic. For Kimi, MOONSHOT_ANTHROPIC_BASE_URL overrides https://api.moonshot.ai/anthropic. These adapters inject ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, and ANTHROPIC_MODEL, and clear the child process’s ANTHROPIC_API_KEY so an inherited Anthropic key does not shadow vendor authentication. Missing vendor credentials reject the launch.

External CLI-native file, shell, and network actions do not each pass through Octipus’s built-in ToolExecutor middleware. Permission settings below describe the agent subprocess path:

Adapter familyInvocation/outputNative permission behavior
Claude Code, GLM, Kimi-p --verbose --output-format stream-json; structured events--permission-mode: safedefault, workspaceacceptEdits, fullbypassPermissions; an omitted setting currently defaults to full
Antigravity--print with combined prompt; plain text buffered until exitPasses --dangerously-skip-permissions
Codex CLIexec --json --ephemeral --skip-git-repo-check; structured events--sandbox: saferead-only, workspaceworkspace-write, fulldanger-full-access; omitted setting defaults to workspace
Mistral Vibe-p --output json; the final JSON message array is buffered until exitPasses --trust --auto-approve; configured allowedTools become --enabled-tools flags

Claude and Codex also accept their supported native permission values. Antigravity and Vibe do not translate the shared permission modes into an interactive approval barrier. Choose service-account access, working-directory permissions, credentials, and network isolation deliberately; a working directory alone is not a sandbox.

Vibe receives --max-price for configured maxBudgetUsd and --max-tokens for a positive agent token budget. Its parsed output, like Antigravity’s print output, reports no token usage; zero in that result means unreported usage, not free execution. Native caps depend on the installed CLI’s behavior.

One-shot completion versus agent execution

Section titled “One-shot completion versus agent execution”

The provider’s complete() path uses each registry entry’s simpler buildArgs: Claude/GLM/Kimi request JSON output, Codex uses exec --json, Antigravity uses print mode, and Vibe requests a JSON message array. The provider’s stream() waits for that completion and yields the full text; it is not incremental generation streaming. Agent-specific permission flags and stored model overrides above must not be assumed to apply to this separate one-shot path.

CLIAgentWorker uses the richer agent builders and parses structured events where available, buffering Antigravity and Vibe output. Shared lifecycle events and a successful subprocess exit do not prove task correctness. Test your installed CLI version after updates because flags, authentication, and output formats can change independently of Octipus.

See Model Management, Agent Runtime, and Security.