RubyLLM unifies a dozen AI providers behind one Ruby interface
RubyLLM is an open-source Ruby library that wraps the APIs of every major AI provider—OpenAI, Anthropic, Gemini, xAI, Bedrock, VertexAI, DeepSeek, Mistral, local Ollama, and more—behind a single consistent interface. The pitch is straightforward: instead of juggling each vendor’s bespoke client, response format, and conventions, developers write the same code whether they target GPT, Claude, or a self-hosted model. The library keeps its footprint small, leaning on just three dependencies (Faraday, Zeitwerk, and Marcel).
The feature set spans the full range of modern LLM workloads: multi-turn chat, vision and audio analysis, document extraction, image generation, embeddings, content moderation, and streaming responses. It also covers the agent-building primitives developers increasingly expect—tool calling that lets a model invoke your Ruby methods, reusable agent classes with system instructions, structured JSON output via schema definitions, and a model registry tracking 800+ models with capability and pricing metadata. Extended-thinking controls let callers view and persist model deliberation.
The project leans heavily into Rails integration, offering an ActiveRecord-backed acts_as_chat mixin, generators for installation and a ready-made chat UI, and Fiber-based async concurrency. For Ruby shops that have watched the AI tooling ecosystem coalesce around Python, RubyLLM is a bid to make Ruby a first-class environment for building chatbots, RAG pipelines, and AI agents without leaving the language.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.