Skip to content

Repository files navigation

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.

About

An OpenAI-compatible HTTP API and provider proxy for Ruby.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages