Announcing release of litelllm-clj ! https://github.com/unravel-team/litellm-clj This is a port of python library - https://docs.litellm.ai/. It’s an adapter layer that connects to a lot of providers and LLMs. I wanted Clojure to have a foundation piece so more AI work can happen. There is still a lot to be done in the library. But, I am happy about the progress so far. Happy to hear thoughts about API. Some things that are pending, 1. Tool calling API, It’s not quite right yet. I would like to have another go at it eventually 2. Observability, I want to include out of the box observability integration 3. Examples, Another repository with examples on how to integrate it with different Clojure libraries. 4. Reasoning tokens API - https://github.com/unravel-team/litellm-clj/issues/14 I had released instructor-clj a while back. It now uses litellm-clj https://github.com/kapilreddy/instructor-clj It’s a big surface area to cover so happy to hear feedback!
For reach maybe cross post in #announcements and #ai-assisted-coding?
Hey thanks. Doing it...
@trost.mario Since this is a library #ai-assisted-coding might not be suited for this.
Yeah that’s true, there’s just so much more activity over there that sometimes people post ai libraries there with the moniker like “Not strictly about ai assisted coding, but a library that might interest people here” or some such 🙂
But #announcements definitely has the bigger reach!
And is on-topic!
That's awesome! I really searched for this when making #eca, and most of eca's llm-api probably can be reused there, especially the tool calling, maybe in the future we can integrate with it! But I'd say eca LLM API is pretty dense now, we would need to add more capabilities to litellm-clj
@ericdallo thanks! I can try getting to have feature parity to what ECA needs.
question: when I see litellm/completion is not clear if for :openai it will use Responses API or Chat API (legacy) - you may want to support both
FYI @zikajk
Currently it does legacy API call. Yes I would need to support both.
I think default should be Responses API.
Makes sense! Also, stream/not stream would be nice to support
Recently I added support for non-stream in ECA for openai-chat, all other only support streaming, you may want to take a look and use as inspiration
Yes. There is a dedicated API for streaming. Everything else is non-stream.
https://cljdoc.org/d/tech.unravel/litellm-clj/0.3.0-alpha/doc/readme#streaming-responses
Great to see this library! Definitely fills a vacuum :^) Could it support embedding models too?
awesome, API wise looks pretty solid!
@post972 I am not sure. I suspect it might need some dependency to support embeddings.
@kapil The embeddin APIs I've used are exposed via HTTP, e.g the OpenAI embedding API. I don't think you need any extra dependencies :^).
Then it should be straightforward to implement.
litellm-clj 0.3.0-alpha.1 released • Add support for Reasoning tokens • Add support for Embeddings API • Add support for GPT-5* models