The AI layer for Ruby.
Laiya is a play on “Layer AI”: an OpenAI-compatible HTTP API and provider proxy
built on Async::HTTP.
LLM providers expose overlapping APIs but differ in authentication, model catalogs, and protocol details. Laiya provides a shared OpenAI-compatible HTTP surface and routes requests to configured providers, while allowing compatible providers to proxy request and response bodies without buffering them.
Please see the project documentation for more details.
-
Getting Started - This guide explains how to install Laiya, configure a provider, and make an OpenAI-compatible request.
-
Providers and Models - This guide explains how to route model IDs to providers and when to discover a provider's model catalog.
-
HTTP API - This guide explains how Laiya's OpenAI-compatible HTTP API handles routing, proxying, and streaming.
-
ChatGPT Codex Provider - This guide explains how to run the experimental Codex provider with a ChatGPT login while keeping tool execution on the client.
Please see the project releases for all releases.
- Enrich discovered Ollama models with thinking controls from
/api/show. - Discover account-visible Codex models and reasoning capabilities from the authenticated model catalog.
- Document a Responses-compatible OpenCode provider for Codex tool calling.
- Add Laiya's OpenAI-compatible HTTP API and Async::Service launcher.
- Add OpenAI and Ollama providers with model discovery and configurable model limits.
- Add an experimental ChatGPT Codex provider using Codex CLI credentials.
We welcome contributions to Laiya.
bundle exec bake testThe Ollama integration test requires Docker Compose and downloads a small CPU model on its first run:
bundle exec bake test:integration name=ollamabundle exec bake gem:github:release:patchSee bake-gem-github for release setup and process.
Contributions must comply with the Developer Certificate of Origin.