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
37 changes: 17 additions & 20 deletions .agent/tools/opencode/opencode-anthropic-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,19 @@ tools:

# OpenCode Anthropic Auth Plugin

> **DEPRECATED**: As of OpenCode v1.1.36+, Anthropic OAuth is built into OpenCode natively.
> The external `opencode-anthropic-auth` plugin is no longer needed and must NOT be added
> to `opencode.json` plugins — doing so causes a TypeError due to double-loading.
> Use `opencode auth login` directly. This document is retained for historical reference.

<!-- AI-CONTEXT-START -->

## Quick Reference

- **Purpose**: OAuth authentication for Claude Pro/Max accounts in OpenCode
- **Status**: **DEPRECATED** — built into OpenCode v1.1.36+, do not install as external plugin
- **Repository**: https://github.com/anomalyco/opencode-anthropic-auth
- **Installation**: `npm install -g opencode-anthropic-auth` (auto-installed by setup.sh)
- **Alternative to**: Manual API key management, requires Claude subscription
- **Installation**: Built-in to OpenCode v1.1.36+ (no installation needed)

**Authentication Methods**:

Expand Down Expand Up @@ -55,24 +60,22 @@ The `opencode-anthropic-auth` plugin enables OAuth authentication for Anthropic'

## Installation

### Automatic Installation (Recommended)
### Built-in (OpenCode v1.1.36+)

The aidevops `setup.sh` script automatically installs this plugin:
Anthropic OAuth is built into OpenCode v1.1.36+. No installation needed — just run:

```bash
cd ~/Git/aidevops
./setup.sh
opencode auth login
# Select: Anthropic → Claude Pro/Max
```

This installs the plugin globally and configures OpenCode to use it.
### Legacy Installation (pre-v1.1.36 only)

### Manual Installation
> **Do not use on OpenCode v1.1.36+** — causes TypeError from double-loading.

```bash
# Install via npm
# Only for OpenCode versions before v1.1.36
npm install -g opencode-anthropic-auth

# Plugin is automatically discovered by OpenCode
```

## Authentication Methods
Expand Down Expand Up @@ -397,17 +400,11 @@ cat ~/.config/opencode/auth.json | jq '.anthropic'

### Automatic Setup

The aidevops `setup.sh` installs and configures this plugin:

```bash
cd ~/Git/aidevops
./setup.sh
```
As of aidevops v2.90.0, `setup.sh` no longer installs this plugin (it's built into OpenCode v1.1.36+).

After setup:
1. Plugin is installed globally via npm
2. OpenCode automatically discovers it
3. Authentication is ready to use with `opencode auth login`
1. OpenCode's built-in Anthropic OAuth is ready to use
2. Authenticate with `opencode auth login`

### Recommended Configuration

Expand Down
6 changes: 3 additions & 3 deletions .agent/tools/opencode/opencode.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ opencode auth login

**Multi-account load balancing:** Add multiple Google accounts for automatic rate limit distribution. Run `opencode auth login` again to add more accounts.

## Anthropic OAuth Plugin
## Anthropic OAuth (Built-in)

The aidevops setup automatically installs the [opencode-anthropic-auth](https://github.com/anomalyco/opencode-anthropic-auth) plugin, enabling OAuth authentication for Claude Pro/Max accounts.
OpenCode v1.1.36+ includes Anthropic OAuth authentication natively. No external plugin is needed.

**Authenticate after setup:**

Expand All @@ -104,7 +104,7 @@ opencode auth login
- Zero cost for Pro/Max subscribers
- No manual API key management

**See also:** `tools/opencode/opencode-anthropic-auth.md` for detailed setup and troubleshooting.
> **Note:** The external `opencode-anthropic-auth` plugin is no longer needed and should be removed from `opencode.json` plugins if present. Adding it alongside the built-in version causes a TypeError due to double-loading.

## Installation

Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Removed

- remove opencode-anthropic-auth external plugin from setup.sh — built into OpenCode v1.1.36+, external plugin causes TypeError from double-loading (#230)

## [2.89.1] - 2026-01-25

### Fixed
Expand Down
17 changes: 2 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,9 @@ opencode auth login

**Multi-account load balancing:** Add multiple Google accounts for automatic rate limit distribution and failover. See the [plugin documentation](https://github.com/NoeFabris/opencode-antigravity-auth) for model configuration.

### OpenCode Anthropic OAuth Plugin
### OpenCode Anthropic OAuth (Built-in)

The setup automatically installs the [opencode-anthropic-auth](https://github.com/anomalyco/opencode-anthropic-auth) plugin, enabling OAuth authentication for Claude Pro/Max accounts. This allows Claude subscribers to use OpenCode with zero API costs.
OpenCode v1.1.36+ includes Anthropic OAuth authentication natively. No external plugin is needed.

**After setup, authenticate:**

Expand All @@ -290,19 +290,6 @@ opencode auth login
- **Zero cost** for Claude Pro/Max subscribers (covered by subscription)
- **Automatic token refresh** - No manual re-authentication needed
- **Beta features enabled** - Extended thinking modes and latest features
- **Three authentication methods:**
- Claude Pro/Max OAuth (recommended for subscribers)
- Create API Key via OAuth
- Manual API key entry

**Available models:**

All Anthropic models available to Pro/Max subscribers, including:
- `claude-sonnet-4-20250514`
- `claude-opus-4-5`
- Extended thinking modes

See the [plugin documentation](https://github.com/anomalyco/opencode-anthropic-auth) and `.agent/tools/opencode/opencode-anthropic-auth.md` for complete setup and troubleshooting.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While removing the details of the deprecated external plugin is the correct approach, the 'Available models' section contained information that is still valuable to users of the built-in feature. To improve the user experience, consider reintroducing this section with a more generic and maintainable description that doesn't require frequent updates.

This would give users a clear idea of the capabilities they gain without creating a maintenance burden of tracking specific model versions.

Suggested change
**Available models:**
Provides access to all models available to Anthropic Pro/Max subscribers, including the latest Claude 3.5 and Opus families. For an up-to-date list, please refer to the official Anthropic documentation.

### Oh-My-OpenCode Plugin (Optional)

Expand Down
13 changes: 4 additions & 9 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2862,18 +2862,13 @@ setup_opencode_plugins() {
print_info "See: https://github.com/NoeFabris/opencode-antigravity-auth"
echo ""

# Setup Anthropic OAuth plugin (Claude OAuth)
print_info "Setting up Anthropic OAuth plugin..."
add_opencode_plugin "opencode-anthropic-auth" "opencode-anthropic-auth@latest" "$opencode_config"

print_info "Anthropic OAuth plugin enables Claude Pro/Max authentication"
print_info "Zero cost for Claude subscribers, auto token refresh, beta features"
print_info "See: https://github.com/anomalyco/opencode-anthropic-auth"
echo ""
# Note: opencode-anthropic-auth is built into OpenCode v1.1.36+
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since setup.sh previously added opencode-anthropic-auth to opencode.json, consider also removing that entry (or emitting a clear warning) so rerunning setup fixes existing configs. Otherwise, users who already have it in their .plugin array may continue to hit the double-loading TypeError even after upgrading aidevops.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

# Adding it as an external plugin causes TypeError due to double-loading.
# Removed in v2.90.0 - see PR #230.

print_info "After setup, authenticate with: opencode auth login"
print_info " • For Google OAuth: Select 'Google' → 'OAuth with Google (Antigravity)'"
print_info " • For Claude OAuth: Select 'Anthropic' → 'Claude Pro/Max'"
print_info " • For Claude OAuth: Select 'Anthropic' → 'Claude Pro/Max' (built-in)"

return 0
}
Expand Down
Loading