Skip to content

Add OpenCode as a supported agent - #214

Merged
bbrowning merged 5 commits into
mainfrom
paude-opencode
Jul 23, 2026
Merged

Add OpenCode as a supported agent#214
bbrowning merged 5 commits into
mainfrom
paude-opencode

Conversation

@bbrowning

Copy link
Copy Markdown
Owner

No description provided.

bbrowning and others added 5 commits July 22, 2026 19:15
OpenCode (opencode.ai) is a terminal-based AI coding agent that supports
multiple LLM providers. This adds it as a new agent with support for
anthropic (default), openai, and vertex providers.

- New OpenCodeAgent class with install via curl, --auto yolo flag,
  provider-specific opencode.json generation, and autoupdate disabled
- Domain alias for opencode.ai
- Provider mappings with anthropic as default
- CLI help text updated
- Comprehensive tests for agent, providers, and domains

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Enable `paude create --agent opencode --provider chatgpt` by wiring the
existing proxy-managed ChatGPT OAuth flow through to OpenCode. Users
authenticate via OpenCode's `/connect` command inside the container.

Key changes:
- Register chatgpt as a valid OpenCode provider in AGENT_PROVIDERS
- Generalize chatgpt_oauth_mode from Codex-only to any agent using the
  chatgpt provider
- Rename the "codex" domain alias to "chatgpt" (keep "codex" as backward-
  compat alias) since the domains are about ChatGPT, not Codex
- Centralize chatgpt domain alias logic on ProviderCredentials to avoid
  duplicating it across agent constructors

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The OpenCode installer (v1.18.4) changed its default install location
from ~/.local/bin/ to ~/.opencode/bin/, causing container builds to fail
on the binary verification check.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…c env vars

OpenCode's google-vertex provider reads VERTEX_LOCATION (not
GOOGLE_CLOUD_LOCATION) and needs GOOGLE_CLOUD_PROJECT explicitly.
The generated opencode.json had empty options, so OpenCode defaulted
to location "global" which caused 403 errors from Vertex AI.

- Add VERTEX_LOCATION to OpenCode's vertex passthrough env vars
- Add project/location to opencode.json google-vertex provider options
- Add equivalent pair syncing for GOOGLE_CLOUD_LOCATION↔VERTEX_LOCATION
  and GOOGLE_CLOUD_PROJECT↔ANTHROPIC_VERTEX_PROJECT_ID
- Make _PROVIDER_CONFIGS data-driven with options dict instead of
  special-casing vertex

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
OpenCode was fully wired up in code but never added to the user-facing
README/CONFIGURATION docs or the --agent flag's help string, so anyone
following the docs would find no mention of its provider/auth setup.
Also logs a few pre-existing doc gaps and a chatgpt-provider config gap
found during the audit in KNOWN_ISSUES.md.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@bbrowning
bbrowning merged commit 63f25fc into main Jul 23, 2026
5 checks passed
@bbrowning
bbrowning deleted the paude-opencode branch July 23, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant