Project

laiya

0.0
The project is in a healthy, maintained state
An OpenAI-compatible HTTP API and provider proxy
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

 Project Readme

Laiya

The AI layer for Ruby.

Development Status

Laiya is a play on “Layer AI”: an OpenAI-compatible HTTP API and provider proxy built on Async::HTTP.

Motivation

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.

Usage

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.

Releases

Please see the project releases for all releases.

v0.0.3

  • 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.

v0.0.2

  • 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.

Contributing

We welcome contributions to Laiya.

Running tests

bundle exec bake test

Running integration tests

The Ollama integration test requires Docker Compose and downloads a small CPU model on its first run:

bundle exec bake test:integration name=ollama

Making releases

bundle exec bake gem:github:release:patch

See bake-gem-github for release setup and process.

Developer Certificate of Origin

Contributions must comply with the Developer Certificate of Origin.