Skip to content

docs: front the long tail of providers with LiteLLM upstream - #141

Merged
prashar32 merged 1 commit into
mainfrom
docs/litellm-upstream
Jun 15, 2026
Merged

docs: front the long tail of providers with LiteLLM upstream#141
prashar32 merged 1 commit into
mainfrom
docs/litellm-upstream

Conversation

@prashar32

Copy link
Copy Markdown
Owner

RiskKernel implements Anthropic, OpenAI, and Ollama natively. For the 100+ other providers we don't reimplement them — we document fronting them with a LiteLLM OpenAI-compatible proxy placed upstream of RiskKernel, so any LiteLLM-supported model is governed.

your app → RiskKernel (budgets/approvals/audit/checkpoints/cost/OTel) → LiteLLM (routing to 100+ providers) → the real provider

This reuses the existing RISKKERNEL_OPENAI_BASE_URL override (the OpenAI provider POSTs to <base>/v1/chat/completions, which is exactly LiteLLM's proxy path) — the same pattern examples/quickstart-compose already proves against a mock upstream.

What's in docs/PROVIDERS.md

  • Topology diagram + a "when to use native vs the long tail" table.
  • Concrete config: RISKKERNEL_OPENAI_BASE_URL → LiteLLM, OPENAI_BASE_URL → RiskKernel on the app, real provider keys living in LiteLLM. Copy-pasteable docker-compose plus a minimal LiteLLM config.yaml and a governed curl.
  • Honest split: RiskKernel governs (budgets/loops/time/cost/approvals/audit/checkpoints/OTel); LiteLLM routes/fails-over and holds keys.

Honest caveats documented

  • Model-name routing. RiskKernel routes by prefix (claude-*→Anthropic, gpt-*/o1/o3→OpenAI, else→default provider). Arbitrary LiteLLM names (gemini-1.5-pro, command-r) don't match gpt-*, so you set RISKKERNEL_DEFAULT_PROVIDER=openai to send unmatched names to the LiteLLM-backed OpenAI provider; claude-* still routes natively.
  • OpenAI provider activation. It's only registered when OPENAI_API_KEY is set, so you set it to LiteLLM's master key (RiskKernel authenticates to LiteLLM, not OpenAI).
  • Cost accuracy. RiskKernel prices from its own token→$ table (built-in rates cover only claude-*/gpt-*). A long-tail model with no rate meters at $0 / priced:false — it counts toward the token budget but not the dollar budget until you add a RISKKERNEL_PRICING_FILE override.

Linked from the README proxy/providers bullet; ### Added entry under ## [Unreleased] in CHANGELOG.md.

Closes #88

Document calling the 100+ providers not implemented natively (Gemini,
Cohere, Mistral, Bedrock, ...) by putting a LiteLLM OpenAI-compatible
proxy upstream of RiskKernel via the existing RISKKERNEL_OPENAI_BASE_URL
override. RiskKernel governs every call (budgets, approvals, audit,
checkpoints, cost metering, OTel); LiteLLM does the provider routing and
holds the real keys.

Adds docs/PROVIDERS.md with a topology diagram, a copy-pasteable
docker-compose, a minimal LiteLLM config.yaml, and a governed-call
example. Honest about the model-name routing rule
(RISKKERNEL_DEFAULT_PROVIDER=openai for unmatched names) and the cost
caveat (long-tail models need a RISKKERNEL_PRICING_FILE rate to count
toward the dollar budget). Links it from the README proxy/providers
bullet.
@prashar32
prashar32 merged commit 32f1f90 into main Jun 15, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: front the long-tail of providers with LiteLLM as an upstream

1 participant