Skip to content
/ glide Public
forked from EinStack/glide

🐦 A Lightweight, Cloud-Native LLM Gateway

License

Notifications You must be signed in to change notification settings

y44k0v/glide

Β 
Β 

Repository files navigation

Glide: Cloud-Native LLM Gateway for Seamless LLMOps

Glide GH Header

codecov Discord Documentation LICENSE FOSSA Status


Glide is your go-to cloud-native LLM gateway, delivering high-performance LLMOps in a lightweight, all-in-one package.

We take all problems of managing and communicating with external providers out of your applications, so you can dive into tackling your core challenges.

Glide sits between your application and model providers to seamlessly handle various LLMOps tasks like model failover, caching, key management, etc.

Take a look at the develop branch.

Check out our documentation!

Warning

Glide is under active development right now. Give us a star to support the project ✨

Features

  • Unified REST API across providers. Avoid vendor lock-in and changes in your applications when you swap model providers.
  • High availability and resiliency when working with external model providers. Automatic fallbacks on provider failures, rate limits, transient errors. Smart retries to reduce communication latency.
  • Support popular LLM providers.
  • High performance. Performance is our priority. We want to keep Glide "invisible" for your latency-wise, while providing rich functionality.
  • Production-ready observability via OpenTelemetry, emit metrics on models health, allows whitebox monitoring (coming soon)
  • Straightforward and simple maintenance and configuration, centralized API key control & management & rotation, etc.

Supported Providers

Large Language Models

Provider Support Status
OpenAI πŸ‘ Supported
Azure OpenAI πŸ‘ Supported
Cohere πŸ‘ Supported
OctoML πŸ‘ Supported
Anthropic πŸ‘ Supported
Google Gemini πŸ—οΈ Coming Soon

Routers

Routers are a core functionality of Glide. Think of routers as a group of models with some predefined logic. For example, the resilience router allows a user to define a set of backup models should the initial model fail. Another example, would be to leverage the least-latency router to make latency sensitive LLM calls in the most efficient manner.

Detailed info on routers can be found here.

Available Routers

Router Description
Priority When the target model fails the request is sent to the secondary model. The entire service instance keeps track of the number of failures for a specific model reducing latency upon model failure
Least Latency This router selects the model with the lowest average latency over time. If the least latency model becomes unhealthy, it will pick the second the best, etc.
Round Robin Split traffic equally among specified models. Great for A/B testing.
Weighted Round Robin Split traffic based on weights. For example, 70% of traffic to Model A and 30% of traffic to Model B.

Get Started

Installation

The easiest way to deploy Glide is to our demo repository and docker-compose.

1. Clone the demo repository

git clone https://github.com/EinStack/glide-demo.git

2. Init Configs

The demo repository comes with a basic config. Additionally, you need to init your secrets by running:

make init # from the demo root

This will create the secrets directory with one .OPENAI_API_KEY file that you need to put your key to.

3. Start Glide

After that, just use docker compose via this command to start your demo environment:

make up

4. Sample API Request to /chat endpoint

See API Reference for more details.

{
 "model": "gpt-3.5-turbo", # this is not required but can be used to specify different prompts to different models
 "message":
      {
        "role": "user",
        "content": "Where was it played?"
      },
  "messageHistory": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Who won the world series in 2020?"},
      {"role": "assistant", "content": "The Los Angeles Dodgers won the World Series in 2020."}
    ]
}

API Docs

Finally, Glide comes with OpenAPI documentation that is accessible via https://127.0.0.1:9099/v1/swagger/index.html

That's it πŸ™Œ

Use our documentation to further learn about Glide capabilities and configs.


Other ways to install Glide are available:

Homebrew (MacOS)

brew tap einstack/tap
brew install einstack/tap/glide

Snapcraft (Linux)

Coming Soon

Docker Images

Glide provides official images in our GHCR:

  • Alpine 3.19:
docker pull ghcr.io/einstack/glide:latest-alpine 
  • Ubuntu 22.04 LTS:
docker pull ghcr.io/einstack/glide:latest-ubuntu
  • Google Distroless (non-root)
docker pull ghcr.io/einstack/glide:latest-distroless
  • RedHat UBI 8.9 Micro
docker pull ghcr.io/einstack/glide:latest-redhat

Helm Chart

Coming Soon

Community

  • Join Discord for real-time discussion

Open an issue or start a discussion if there is a feature or an enhancement you'd like to see in Glide.

Contribute

Thanks everyone for already put their effort to make Glide better and more feature-rich:

License

Apache 2.0

FOSSA Status

About

🐦 A Lightweight, Cloud-Native LLM Gateway

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 95.3%
  • Makefile 3.7%
  • Dockerfile 1.0%