Add OpenCode as a supported agent - #214
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.