Skip to content

Providers & Channels

A provider in GPROXY is a named upstream LLM endpoint. Each provider is backed by exactly one channel (the code that speaks the upstream’s protocol) and has one or more credentials attached to it.

Provider ──(channel)──► upstream protocol implementation
├── settings (base_url, timeouts, …)
└── credentials (api keys, OAuth, service account, …)

The gproxy-channel crate ships the following channels. Feature flags of the same name (see the Rust SDK reference) let you compile only the subset you need.

ChannelTypical upstreamNotes
openaiapi.openai.com, any OpenAI-compatible gatewayUse custom to override base URL freely.
anthropicapi.anthropic.comClaude Messages API.
aistudioGoogle AI Studiogenerativelanguage.googleapis.com.
vertexGoogle Vertex AIUses a GCP service account.
vertexexpressVertex AI Express modeSimpler Gemini access via an API key.
geminicliLocal Gemini CLI toolingFor local dev / bridging.
claudecodeAnthropic Claude CodeDeveloper tooling channel.
codexCodex-family endpoints
antigravityAntigravity agent runtime
deepseekapi.deepseek.comOpenAI-compatible DeepSeek.
groqapi.groq.com
openrouteropenrouter.ai
nvidiaNVIDIA NIM endpoints
customAny OpenAI-compatible upstreamUse this for self-hosted or third-party gateways.

In the seed TOML:

[[providers]]
name = "openai-main"
channel = "openai"
settings = { base_url = "https://api.openai.com/v1" }
credentials = [
{ api_key = "sk-upstream-1" },
{ api_key = "sk-upstream-2" }
]

Or, at runtime, use the Providers tab in the embedded console. settings and each credentials[i] are free-form JSON blobs — their exact shape depends on the channel (OpenAiSettings, AnthropicCredential, and so on). The console renders a structured editor for each one.

When a provider has multiple credentials, GPROXY treats them as a rotation pool. The GproxyEngine picks a credential, calls upstream, and on failure updates a per-credential health state (cooldowns for rate-limited keys, disables for revoked keys, and so on). The HealthBroadcaster worker debounces those changes before writing them to storage so a burst of failures doesn’t spam the database.

You can watch the current health state from the console or from the /admin/health endpoints.

Every provider is reachable two ways on the same GPROXY instance:

ModeURL shapeHow the provider is chosen
Aggregated/v1/..., /v1beta/...From a provider/model prefix in the model field (or from an alias).
Scoped/{provider}/v1/...From the URL path; the model field carries just the upstream id.

Both modes serve every protocol (OpenAI / Claude / Gemini) and both go through the same permission → rewrite → alias → execute pipeline. Pick whichever fits your client — see First Request for concrete curl examples of each.

If the client and the selected upstream speak the same protocol (for example, an OpenAI-compatible client hitting an OpenAI provider), GPROXY forwards the request with minimal parsing. It still applies auth, model resolution, usage accounting, and rate limiting — it just avoids deserializing the body when nothing needs to be rewritten. This is the hot path and where GPROXY gets most of its throughput.

When the protocols differ, the gproxy-protocol::transform layer converts the request shape on the way in and the response shape on the way out.