docs: front the long tail of providers with LiteLLM upstream - #141
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
This reuses the existing
RISKKERNEL_OPENAI_BASE_URLoverride (the OpenAI provider POSTs to<base>/v1/chat/completions, which is exactly LiteLLM's proxy path) — the same patternexamples/quickstart-composealready proves against a mock upstream.What's in
docs/PROVIDERS.mdRISKKERNEL_OPENAI_BASE_URL→ LiteLLM,OPENAI_BASE_URL→ RiskKernel on the app, real provider keys living in LiteLLM. Copy-pasteable docker-compose plus a minimal LiteLLMconfig.yamland a governedcurl.Honest caveats documented
claude-*→Anthropic,gpt-*/o1/o3→OpenAI, else→default provider). Arbitrary LiteLLM names (gemini-1.5-pro,command-r) don't matchgpt-*, so you setRISKKERNEL_DEFAULT_PROVIDER=openaito send unmatched names to the LiteLLM-backed OpenAI provider;claude-*still routes natively.OPENAI_API_KEYis set, so you set it to LiteLLM's master key (RiskKernel authenticates to LiteLLM, not OpenAI).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 aRISKKERNEL_PRICING_FILEoverride.Linked from the README proxy/providers bullet;
### Addedentry under## [Unreleased]in CHANGELOG.md.Closes #88