Skip to content
archived Visibility internal Owner erik@uvilo.com Approver _ Created _ Updated _

OpenRouter Requirements

Purpose

Integrate OpenRouter into Uvilo OS LibreChat to provide access to a wide range of Large Language Models beyond the directly-configured providers (Anthropic, OpenAI, etc.). OpenRouter acts as a unified API gateway to 300+ models from dozens of providers, enabling pay-per-token access without individual provider accounts.

Prerequisites

  • An OpenRouter account has been created and funded at openrouter.ai
  • OPENROUTER_KEY environment variable has been added to the LibreChat Railway service
  • LibreChat has been redeployed to pick up the new env var

Requirements

Configuration

  • OpenRouter must be enabled as a custom endpoint in librechat.yaml
  • The API key must be referenced via the OPENROUTER_KEY env var (NOT OPENROUTER_API_KEY — using that name overrides the OpenAI endpoint)
  • Model fetching (fetch: true) should be enabled so all available OpenRouter models appear in the model selector
  • The stop parameter should be dropped from requests, as OpenRouter models use a variety of stop tokens

First Model

  • The first model to enable as default: z-ai/glm-5-turbo
    • GLM-5 Turbo is Z.ai’s latest model designed for fast inference and strong performance in agent-driven workflows
    • $0.96/M input tokens, $3.20/M output tokens
    • Supports reasoning, tool use, and 200+ tokens/second throughput
    • Use as the titleModel for conversation title generation as well

User Experience

  • OpenRouter should appear as a selectable endpoint in the LibreChat UI alongside existing providers
  • Users should be able to browse and select from all available OpenRouter models
  • Token usage and costs should be trackable via the OpenRouter dashboard