 taodengandClaude Opus 4.6
|
1f1b3871da
|
feat: Phase 1 — modular backend architecture (v4.0-alpha)
Internal refactor: extract BackendAdapter, ModelRegistry, AgentRouter,
SessionManager, and StatsCollector as standalone modules. Claude CLI
logic encapsulated in ClaudeCliAdapter.
External API completely unchanged — all existing endpoints behave
identically. Legacy request path (callClaude/callClaudeStreaming)
untouched. v4 modules load in parallel for validation.
New endpoints:
GET /backends — backend health and status
GET /routing — agent routing table
Architecture:
unified-chunk.mjs — streaming protocol (delta/done/error)
backends/base.mjs — BackendAdapter interface
backends/claude-cli.mjs — Claude CLI adapter (core)
model-registry.mjs — model → backend mapping (Layer 1)
agent-router.mjs — agent policy routing (Layer 2)
session-manager.mjs — conversation session management
stats-collector.mjs — per-model/backend/agent metrics
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-03-25 08:02:53 +10:00 |
|