Provider Abstraction + Unified Request Model + Routing Policy Engine#82
Conversation
- Added OpenCodeGoProvider and OpenCodeZenProvider to handle requests for the respective backends. - Implemented streaming capabilities for both providers, supporting various wire formats including Anthropic, OpenAI, and Gemini. - Introduced StreamProxy to manage SSE stream forwarding and transformation of events. - Enhanced transformer functions to convert between normalized requests and wire formats. - Updated server initialization to register new providers and handle requests accordingly.
Code Review Roast 🔥Verdict: No Issues Found | Recommendation: Merge Oh wait, this PR is actually clean. I need to sit down. I had my flamethrower warmed up and everything. 📊 Overall: Like finding a unicorn in production — I didn't think clean PRs existed anymore, but here we are. Files Reviewed (3 files)
Previous Review Summaries (2 snapshots, latest commit 179e6e8)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 179e6e8)Verdict: No Issues Found | Recommendation: Merge Oh wait, this PR is actually clean. I need to sit down. I had my flamethrower warmed up and everything. 📊 Overall: Like finding a unicorn in production — I didn't think clean PRs existed anymore, but here we are. Files Reviewed (3 files)
Previous review (commit 657fef0)Verdict: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)
🏆 Best part: The provider abstraction and normalized request/response flow is clean and well-architected. Adding 💀 Worst part: The switch statement in 📊 Overall: Like a three-legged race where one team forgot to tie their legs together - most of the architecture is sound, but this critical control flow bug makes two of the wire formats completely unreachable. Files Reviewed (10 files)
Reviewed by step-3.7-flash-20260528 · 929,383 tokens |
Refactors routatic-proxy from a tightly-coupled Claude Code ↔ OpenCode bridge into a reusable routing core with a provider interface, request normalization layer, and composable routing policies.
What changed
Provider Interface (internal/core/provider.go)
Unified Request Model (internal/core/normalized.go)
Provider Implementations (internal/provider/opencode_go.go, opencode_zen.go)
Bridge Functions (internal/transformer/normalized_bridge.go)
Handler Simplification (internal/handlers/messages.go)
Config Enhancement (internal/config/config.go)
Routing Policy Engine (internal/router/policy.go)
Backward compatibility