clojure-llm-sdk is inspired by LiteLLM's broad provider coverage, but it is intentionally scoped as a Clojure library rather than a proxy server.
The goal is to provide the provider-abstraction pieces that applications need directly:
| Area | Coverage |
|---|---|
| Chat completions | OpenAI, Anthropic, Gemini, Vertex, OpenRouter, Codex, DeepSeek, Kimi, Kimi Code, Mistral, Groq, Cerebras, Together, xAI, HuggingFace Router, Perplexity, Bedrock, Ollama, and aggregator aliases. |
| Embeddings | OpenAI, Cohere, Voyage, Mistral, Together, Jina, Ollama. |
| Moderation | OpenAI. |
| Rerank | Cohere, Voyage, Jina. |
| Image generation | OpenAI, Vertex Imagen, Bedrock image models. |
| Audio transcription | OpenAI Whisper, Groq Whisper. |
| Text-to-speech | OpenAI TTS, ElevenLabs. |
| Model metadata | Live provider catalogs, LiteLLM-derived snapshot, models.dev snapshot, and caller overrides. |
| Cost estimation | Registry-backed cost calculation with explicit unknowns. |
| Context caching | Provider-native cache markers and cache telemetry normalization. |
| Streaming | Canonical stream event taxonomy and final response reduction. |
| Fallbacks | Sequential caller-provided fallback list. |
LiteLLM demonstrates that a useful provider abstraction needs more than a single OpenAI-compatible request builder. This SDK adopts the same broad lessons:
The Clojure implementation keeps these ideas as small library-level protocols and provider profiles.
The following features belong in applications or infrastructure above the SDK:
The SDK stops at provider request/response behavior. Applications remain responsible for product policy, persistence, routing, tenancy, and observability.
Adapters fall into three categories:
This keeps the public API stable while allowing individual provider behavior to evolve independently.
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |