Routing model
cc-lb presents one operator-managed endpoint while keeping upstream and principal state explicit. The request path classifies traffic, builds an eligible candidate set, applies routing filters, and sends the request through the selected upstream.
The eight upstream kinds
Section titled “The eight upstream kinds”cc-lb supports anthropic_api_key, anthropic_oauth, openai_api_key, openai_oauth, gemini_api_key, gemini_oauth, vertex_api_key, and vertex_credential.
The routing model also combines session cache continuity, quota pacing, dynamic views, and Wasmtime hooks.
Read the focused pages for the behavior and its limits:
Request path boundaries
Section titled “Request path boundaries”The proxy key identifies a principal. The principal’s allowed models, limits, cache-keepalive settings, and plugin chain participate in request handling. Upstream credentials remain operator-managed runtime state and are not part of the client request.
Shared native routes cover Anthropic POST /v1/messages and POST /v1/messages/count_tokens, OpenAI POST /v1/responses and GET /v1/responses WebSocket, and Gemini POST /v1beta/models/{model}:generateContent, :streamGenerateContent, and :countTokens. The runtime endpoint reference lists additional provider-prefixed operations and their eligible credentials.
cc-lb preserves provider-native protocols and does not translate between providers or act as a universal multi-provider gateway. Vertex AI Gemini is supported through the scoped API-key and credential kinds; Express and regional API-key targets support generate/stream/countTokens only because Google rejects API keys for cache, catalog, and Live, while regional credentials add approved cached-content create/use, publisher model-catalog list/get, and Live routes through Vertex. The catalog is a minimal publisher projection, not entitlement-aware; explicit cached-content billing remains Vertex-controlled; Bedrock remains unsupported.
The keepalive scheduler is best effort. It can reduce avoidable cache eviction during active sessions, but it does not guarantee a cache hit.