meridian  by rynfar

Enables Claude Max subscription with OpenCode's multi-model agent routing

Created 2 months ago
735 stars

Top 46.8% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This project provides a proxy to integrate Claude Max subscriptions with OpenCode, enabling OpenCode's multi-model agent routing. It bridges Anthropic's Agent SDK with OpenCode by forwarding tool calls, ensuring agent assignments and full system prompts are respected across different models, overcoming the SDK's default routing.

How It Works

The proxy intercepts Claude Agent SDK tool calls via the PreToolUse hook. It captures tool details, blocks SDK execution, and returns the tool_use payload to OpenCode. OpenCode executes the tool and handles agent routing. Upon receiving the tool_result, the proxy resumes the SDK session, preserving distributed execution and Claude's interaction flow.

Quick Start & Requirements

  • Install: One-liner script: curl -fsSL https://raw.githubusercontent.com/ianjwhite99/opencode-claude-max-proxy/main/install.sh | bash.
  • Prerequisites: Claude Max subscription, authenticated Claude CLI (claude login), clear OpenCode Anthropic auth.
  • Running (Passthrough): CLAUDE_PROXY_PASSTHROUGH=1 claude-max-proxy (npm) or CLAUDE_PROXY_PASSTHROUGH=1 bun run proxy (source, requires Bun). Docker option available.
  • Connecting OpenCode: Use ./bin/oc.sh launcher or configure OpenCode with ANTHROPIC_API_KEY=dummy and ANTHROPIC_BASE_URL=http://127.0.0.1:3456.
  • Links: GitHub, Installer.

Highlighted Details

  • Multi-Model Agent Routing: Preserves oh-my-opencode routing to models like GPT-5.4, Gemini via OpenCode.
  • Full Agent Prompts: Utilizes complete agent system prompts managed by OpenCode.
  • Session Persistence: Resumes conversations using local session IDs for continuity.
  • Framework Agnostic: Works with native OpenCode, oh-my-opencode, and custom agents.

Maintenance & Community

An unofficial wrapper; no explicit community channels (Discord/Slack) or active maintainer links are provided, though specific contributions are credited.

Licensing & Compatibility

  • License: MIT.
  • Compatibility: Permissive MIT license allows broad use, including closed-source integration, contingent on Anthropic's Terms of Service compliance.

Limitations & Caveats

  • Bun Stability: Shared proxy mode may experience Bun-compiled SDK subprocess segfaults during stream cleanup (supervisor auto-restarts).
  • Internal Mode: Default mode bypasses OpenCode's multi-model routing, forcing all agents via Claude.
  • Unofficial Status: Not affiliated with Anthropic; users must ensure ToS compliance.
  • Docker Auth: macOS Docker requires a specific script for host credential management.
Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
378
Issues (30d)
124
Star History
666 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.