Commit Graph
1 Commits
Author SHA1 Message Date
whit3rabbitandClaude Opus 4.6 76e9392656 Add native Gemini backend, library mode, and middleware (Phases 20d-20g, 21a-21c)
Gemini native backend:
- Schema sanitizer strips unsupported JSON Schema keys for Gemini (20d)
- Anthropic-to-Gemini message mapping with role coercion and turn merging (20e)
- Streaming state machine for Gemini SSE and Vertex AI responses (20f)
- GeminiClient with retry/backoff, BackendClient enum dispatch (20g)
- Unified BackendError with per-backend error helpers
- Shared retry logic extracted to backend/mod.rs

Library mode (21a-21c):
- TranslationConfig with builder pattern, model mapping, lossy behavior control
- translate_request/translate_response convenience functions
- Public TranslateError enum, crate-level doc examples
- Axum middleware layer (AnthropicTranslationLayer) for embedding in existing services
- Feature-gated middleware deps (axum, reqwest, tokio)
- library_usage and middleware_integration test suites

Also: new Claude Code tool call fixtures, updated CLAUDE.md and TASKS.md.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 09:20:22 -05:00