Production-ready LLM API translation layer — bidirectional conversion between OpenAI, Anthropic & Google formats via hub-and-spoke IR. Optional API gateway. Streaming & non-streaming. Zero core deps. Contributions welcome!
README
LLM-Rosetta — A Python library for converting between different LLM provider API formats using a hub-and-spoke architecture with a central IR (Intermediate Representation).
Full documentation is available at:
When building applications that work with multiple LLM providers, you face an N² conversion problem — every provider pair requires its own conversion logic. LLM-Rosetta solves this with a hub-and-spoke approach: each provider only needs a single converter to/from the shared IR format.
Provider A ──→ IR ──→ Provider B
Provider C ──→ IR ──→ Provider D
... and so on
| Provider | API Standard | Request | Response | Streaming | |----------|-------------|:-------:|:--------:|:---------:| | OpenAI | Chat Completions | ✅ | ✅ | ✅ | | OpenAI | Responses API | ✅ | ✅ | ✅ | | Anthropic | Messages API | ✅ | ✅ | ✅ | | Google | GenAI API | ✅