Skip to content
WordPress plugin that bridges OpenCode Zen with multiple AI providers — Claude, OpenAI, and Gemini — via a unified adapt...

2024 · Creator & Maintainer

AI Provider for OpenCode Zen

WordPress plugin that bridges OpenCode Zen with multiple AI providers — Claude, OpenAI, and Gemini — via a unified adapter interface.

The challenge

Each AI provider (Claude, OpenAI, Gemini) has its own SDK, auth, and streaming shape. WordPress plugins that want to support more than one provider end up with vendor-specific spaghetti.

The result

A single adapter interface that normalises Claude, OpenAI, and Gemini under one API. Add a provider once, every plugin downstream benefits — same call signature, same streaming, same error envelope.

Year
2024
Role
Creator & Maintainer
Stack
5 teches
Status
Published

Overview

OpenCode Zen is a WordPress-native code assistant. This plugin adds a provider abstraction layer that lets site owners connect their own API keys for Claude (Anthropic), OpenAI, or Gemini instead of being locked to a single vendor.

Architecture

A simple adapter pattern: each AI provider implements a ProviderInterface with complete() and stream() methods. The plugin handles credential storage (encrypted in wp_options), rate limiting, and error normalization across providers.

Supported Providers

  • Claude (Anthropic) — claude-sonnet-4-6, claude-haiku-4-5
  • OpenAI — GPT-4o, GPT-4o-mini
  • Gemini — Gemini 1.5 Pro, Flash

Available On

WordPress.org plugin repository.

Share
𝕏 in

Related work

Building something similar?

Let's talk about your project.

Open to freelance engagements and consulting on Laravel, WordPress, and AI-powered systems.