What happened
jadzia-core got its first major architectural decision: a single gateway instead of per-feature API calls scattered across repos.
Design choices:
- Single entry point —
lib/llm-gateway.tshandles all outbound LLM calls - Provider abstraction — Anthropic and Google GenAI behind a common interface
- Env-driven switching —
LLM_PROVIDER=anthropic|googletoggles without code change - Retry + fallback — exponential backoff, automatic fallback to secondary provider
Evidence
- All existing Anthropic calls migrated to gateway: 0 direct SDK imports outside
lib/ - Google GenAI integration tested: Gemini Pro responses validated against Anthropic baseline
- Provider switch verified end-to-end in staging with
LLM_PROVIDER=google
Next step
Add streaming support and token-usage telemetry per provider.