olp

module
v0.0.0-...-81664e8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2026 License: AGPL-3.0

README

OpenLLMProxy

OpenLLMProxy, or OLP, is a self-hosted AI gateway and control plane. It lets a team connect model providers, certify the exact capabilities it will serve, publish stable route names and manage access, budgets and attempt-level accounting from one installation.

The gateway serves OpenAI, Anthropic, Gemini and Bedrock client interfaces alongside governed agent and MCP tool workflows, cloud retrieval bindings, guardrails and subscription-backed code mode for coding clients. Its persisted request history and telemetry are content-free by default. Provider-retained resources, response caching and optional external capture each have a separate and explicit storage contract.

Start here

Read the handbook for the task guides. To install OLP and make a first request, follow Getting Started. The Compatibility guide states which operations are supported and where protocol translation changes or refuses a request.

Production operators should continue with Deployment and Operations. Contributors should start with Contributing. Test suite selection is covered in Testing.

Project status

OpenLLMProxy is still a work in progress. During 0.x, releases may change the management API, configuration and storage formats. OLP therefore makes no compatibility, upgrade, mixed-version or rollback promises.

License and participation

OpenLLMProxy is licensed under AGPL-3.0-only, including Section 13 source disclosure obligations for modified network deployments. The project owner reserves the right to change the license for future releases and to offer commercial or alternative licenses. See the licensing policy and NOTICE for full scope, trademark terms and commercial licensing inquiries (support@mail.tyk.sh).

All contributions are governed by the Contributor License Agreement, which grants the project owner sublicensing and relicensing rights while you retain copyright in your work. Report vulnerabilities privately under the security policy. Participation follows the Code of Conduct.

Directories

Path Synopsis
cmd
catalogdrift command
Command catalogdrift compares the embedded reference catalog with the models each vendor lists today and prints the drift as Markdown.
Command catalogdrift compares the embedded reference catalog with the models each vendor lists today and prints the drift as Markdown.
olp command
olpsign command
pluginindex command
Command pluginindex builds the plugins the reviewed plugin index lists from this repository, reproducibly, and compares them with the index.
Command pluginindex builds the plugins the reviewed plugin index lists from this repository, reproducibly, and compares them with the index.
Package guardrails provides primitives to interact with the openapi HTTP API.
Package guardrails provides primitives to interact with the openapi HTTP API.
Package inference provides primitives to interact with the openapi HTTP API.
Package inference provides primitives to interact with the openapi HTTP API.
internal
access
Package access owns installation identity and management transactions.
Package access owns installation identity and management transactions.
cache
Package cache owns the opt-in, sealed response cache.
Package cache owns the opt-in, sealed response cache.
catalog
Package catalog is the signed reference catalog: model facts and list prices by vendor, transcribed from each vendor's own documentation with the page and time every entry was observed.
Package catalog is the signed reference catalog: model facts and list prices by vendor, transcribed from each vendor's own documentation with the page and time every entry was observed.
catalog/drift
Package drift compares the reference catalog with what vendors list today, so maintainers can see where the catalog has fallen behind.
Package drift compares the reference catalog with what vendors list today, so maintainers can see where the catalog has fallen behind.
codemode
Package codemode defines the observation and management contracts of coding traffic.
Package codemode defines the observation and management contracts of coding traffic.
codemode/codeclient
Package codeclient selects models and renders client configuration from a frozen route and its account offers.
Package codeclient selects models and renders client configuration from a frozen route and its account offers.
codemode/codeplans
Package codeplans implements enrollment for API-key coding plans used by OLP code-mode.
Package codeplans implements enrollment for API-key coding plans used by OLP code-mode.
codemode/codexauth
Package codexauth implements the Codex device authorization contract.
Package codexauth implements the Codex device authorization contract.
console
Package console serves the separately built client-only SvelteKit console.
Package console serves the separately built client-only SvelteKit console.
contracts/duplex
Package duplexcontract compiles the native-only duplex profiles admitted by strict routes for providers whose realtime wire is not the OpenAI WebSocket contract.
Package duplexcontract compiles the native-only duplex profiles admitted by strict routes for providers whose realtime wire is not the OpenAI WebSocket contract.
contracts/interaction
Package interaction compiles and binds strict operation contracts.
Package interaction compiles and binds strict operation contracts.
contracts/media
Package mediacontract owns the strict native media contract.
Package mediacontract owns the strict native media contract.
contracts/unary
Package operationplan compiles strict unary contracts without a generation representation.
Package operationplan compiles strict unary contracts without a generation representation.
domain/agentcontract
Package agentcontract owns project-scoped agent publications and their authority references.
Package agentcontract owns project-scoped agent publications and their authority references.
domain/bodylimit
Package bodylimit defines the operator's optional per-route ingress bound.
Package bodylimit defines the operator's optional per-route ingress bound.
domain/geminilifecycle
Package geminilifecycle validates the two distinct native Gemini lifecycle dialects.
Package geminilifecycle validates the two distinct native Gemini lifecycle dialects.
domain/oif
Package oif owns source-preserving, in-process operation contracts.
Package oif owns source-preserving, in-process operation contracts.
domain/operations/classification
Package classification retains operation-owned moderation, classification and similarity views.
Package classification retains operation-owned moderation, classification and similarity views.
domain/operations/embeddings
Package embeddings retains native vector storage and its logical shape.
Package embeddings retains native vector storage and its logical shape.
domain/operations/ocr
Package ocr owns the frozen Mistral OCR document contract.
Package ocr owns the frozen Mistral OCR document contract.
domain/operations/rerank
Package rerank preserves candidate identity, exact native scores and order.
Package rerank preserves candidate identity, exact native scores and order.
domain/operations/search
Package search owns the frozen Perplexity Search contract and the reviewed native search dialects its qualified mappings serve: Tavily, Exa, Parallel and Brave.
Package search owns the frozen Perplexity Search contract and the reviewed native search dialects its qualified mappings serve: Tavily, Exa, Parallel and Brave.
domain/operations/tokenization
Package tokenization preserves native counting and tokenizer results.
Package tokenization preserves native counting and tokenizer results.
domain/operations/tokenization/estimate
Package estimate counts the tokens of a request before the provider reports them, which is what admission reserves, what the planner compares with a model's context window, and what budgets charge.
Package estimate counts the tokens of a request before the provider reports them, which is what admission reserves, what the planner compares with a model's context window, and what budgets charge.
domain/protocols
Package protocols connects native wire codecs through the shared operation model.
Package protocols connects native wire codecs through the shared operation model.
domain/protocols/awsframe
Package awsframe validates native AWS event framing before the SDK decoder can normalize duplicate headers or allocate from untrusted header lengths.
Package awsframe validates native AWS event framing before the SDK decoder can normalize duplicate headers or allocate from untrusted header lengths.
domain/protocols/openai
Package openai implements the OpenAI Chat Completions and Responses codecs: gateway envelope validation, upstream encoding with model rewriting, and unary/streaming response decoding with usage extraction.
Package openai implements the OpenAI Chat Completions and Responses codecs: gateway envelope validation, upstream encoding with model rewriting, and unary/streaming response decoding with usage extraction.
domain/protocols/sse
Package sse decodes and encodes bounded server-sent events independently of provider codecs.
Package sse decodes and encodes bounded server-sent events independently of provider codecs.
domain/protocols/wire
Package wire owns shared request and result envelopes.
Package wire owns shared request and result envelopes.
domain/surface
Package surface classifies public request paths.
Package surface classifies public request paths.
domain/vendors
Package vendors holds the reviewed vendor contracts: the documented facts the onboarding catalogue, the connector matrix and the request codecs share.
Package vendors holds the reviewed vendor contracts: the documented facts the onboarding catalogue, the connector matrix and the request codecs share.
gateway
Package gateway assembles the execution kernel and the surfaces built on it.
Package gateway assembles the execution kernel and the surfaces built on it.
gateway/codeforward/coderesearch
Package coderesearch bounds and filters the subscription research MCP surface.
Package coderesearch bounds and filters the subscription research MCP surface.
gateway/kernel
Package kernel is the execution kernel behind every inference surface: it owns the call, route selection, the attempt loop, streaming commitment and settlement on top of a pinned runtime release.
Package kernel is the execution kernel behind every inference surface: it owns the call, route selection, the attempt loop, streaming commitment and settlement on top of a pinned runtime release.
gateway/models
Package models serves the model catalog on the OpenAI, Anthropic and Gemini surfaces.
Package models serves the model catalog on the OpenAI, Anthropic and Gemini surfaces.
gateway/surface/geministate
Package geministate serves native Gemini files, resumable uploads and batches.
Package geministate serves native Gemini files, resumable uploads and batches.
grants
Package grants holds grants beneath immutable credential versions and runs grant enrollment through provider plugins.
Package grants holds grants beneath immutable credential versions and runs grant enrollment through provider plugins.
identity/samlidentity
Package samlidentity implements OLP's bounded, solicited SAML POST profile.
Package samlidentity implements OLP's bounded, solicited SAML POST profile.
management/contract
Package contract provides primitives to interact with the openapi HTTP API.
Package contract provides primitives to interact with the openapi HTTP API.
mcp
operatorcli
Package operatorcli implements management commands over the public SDK.
Package operatorcli implements management commands over the public SDK.
platform/coordination
Package coordination owns the concrete Valkey client lifecycle and transport outcome classification.
Package coordination owns the concrete Valkey client lifecycle and transport outcome classification.
platform/database
Package database owns PostgreSQL connection lifecycle.
Package database owns PostgreSQL connection lifecycle.
platform/egress
Package egress validates provider destinations and builds bounded outbound HTTP clients whose dials are pinned to validated addresses.
Package egress validates provider destinations and builds bounded outbound HTTP clients whose dials are pinned to validated addresses.
platform/secrets
Package secrets owns secret input, domain-separated digests, and record-bound encryption.
Package secrets owns secret input, domain-separated digests, and record-bound encryption.
platform/secretstore
Package secretstore resolves version-pinned external secrets and unwraps data keys.
Package secretstore resolves version-pinned external secrets and unwraps data keys.
plugins/pluginindex
Package pluginindex is the signed index of reviewed provider plugins: for each plugin, its source and every reviewed release's module digest, ABI, origins and profiles.
Package pluginindex is the signed index of reviewed provider plugins: for each plugin, its source and every reviewed release's module digest, ABI, origins and profiles.
providerinvoke
Package providerinvoke links semantic preparation to a validated hosting profile.
Package providerinvoke links semantic preparation to a validated hosting profile.
providers
Package providers owns provider connections: configuration drafts, model discovery and certification, credential pools, activation into immutable revisions, and history for the connector matrix.
Package providers owns provider connections: configuration drafts, model discovery and certification, credential pools, activation into immutable revisions, and history for the connector matrix.
retainedapi
Package retainedapi describes provider-retained resource contracts.
Package retainedapi describes provider-retained resource contracts.
retrieval
Package retrieval implements query-only access to operator-managed indexes.
Package retrieval implements query-only access to operator-managed indexes.
routes
Package routes serves route drafts, published routes, revision history, and routing simulation on the management surface.
Package routes serves route drafts, published routes, revision history, and routing simulation on the management surface.
routes/modelcatalog
Package modelcatalog projects published routes into a consumer-facing catalog.
Package modelcatalog projects published routes into a consumer-facing catalog.
routing
Package routing owns immutable serving configuration, pure validation and selection.
Package routing owns immutable serving configuration, pure validation and selection.
upstream
Package upstream classifies how an exchange with a provider ended: the failure class that governs failover and cooldown, and the upstream acceptance that records what is known about the provider's work.
Package upstream classifies how an exchange with a provider ended: the failure class that governs failover and cooldown, and the upstream acceptance that records what is known about the provider's work.
workload
Package workload verifies bounded workload JWTs against operator-declared issuers.
Package workload verifies bounded workload JWTs against operator-declared issuers.
Package management provides contract-generated operations and a bounded HTTP client for OLP's management API.
Package management provides contract-generated operations and a bounded HTTP client for OLP's management API.
abi
reference command
Command reference is the reference provider plugin built on the Go SDK.
Command reference is the reference provider plugin built on the Go SDK.
templates/oauth-client-credentials command
Command oauth-client-credentials is a template for a provider plugin whose upstream authenticates API calls with short-lived access tokens issued to OAuth 2.0 clients by the client credentials grant (RFC 6749, section 4.4).
Command oauth-client-credentials is a template for a provider plugin whose upstream authenticates API calls with short-lived access tokens issued to OAuth 2.0 clients by the client credentials grant (RFC 6749, section 4.4).
templates/signed-request command
Command signed-request is a template for a provider plugin whose upstream authenticates each request by a signature rather than a bearer token: the secret never travels, so a captured request cannot be replayed against another path, body or time.
Command signed-request is a template for a provider plugin whose upstream authenticates each request by a signature rather than a bearer token: the secret never travels, so a captured request cannot be replayed against another path, body or time.
templates/token-exchange command
Command token-exchange is a template for a provider plugin whose upstream takes short-lived bearer tokens that an authorization server issues in exchange for a long-lived API key, as OAuth 2.0 token exchange (RFC 8693) describes and cloud IAM services commonly do.
Command token-exchange is a template for a provider plugin whose upstream takes short-lived bearer tokens that an authorization server issues in exchange for a long-lived API key, as OAuth 2.0 token exchange (RFC 8693) describes and cloud IAM services commonly do.
tests
fidelity
Package fidelity compares externally observable protocol documents without importing production codecs.
Package fidelity compares externally observable protocol documents without importing production codecs.
fixtures
Package fixtures preserves the language-neutral reference corpus used by the routing, stream, and token tests.
Package fixtures preserves the language-neutral reference corpus used by the routing, stream, and token tests.
fixtures/fidelity
Package fidelity contains independently authored, versioned reference inputs.
Package fidelity contains independently authored, versioned reference inputs.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL