Migrate from LiteLLM to DVARA
If you run the LiteLLM Proxy today, your providers, models, fallbacks and teams are in its config.yaml. The DVARA
LiteLLM importer reads that file and writes a gateway.yaml that the open-source DVARA LLM Gateway starts on. It
also writes a report that says, for every part of your file, whether it maps cleanly, maps with a difference, or has
no equivalent, and why. Nothing is dropped without a line in the report.
The output is for the Open Source distribution, which is configured from one gateway.yaml. Once the gateway runs on
it, every call carries an API key that resolves to a workspace, passes the policy, PII and guardrail checks, and
leaves a tamper-evident audit record when audit is configured.
Want a second pair of eyes on your config.yaml first? Book a 20-minute migration call and we'll
walk through the report with you.
The importer is open source under the Apache License 2.0, at
github.com/dvarahq/dvara-litellm-importer. The quickest way to run it
is JBang, which fetches the released jar and, if you don't have Java 25, downloads
it the first time. To keep it as a command, run jbang app install litellm-to-dvara@dvarahq.
Without JBang, download dvara-litellm-importer.jar from the
latest release and run it with
java -jar dvara-litellm-importer.jar on Java 25.
Run the importer
jbang litellm-to-dvara@dvarahq config.yaml -o dvara-import/
For LiteLLM's quick-start file (an OpenAI model, an Anthropic model under an alias, and a master key), it prints:
Wrote gateway.yaml, import-report.md to dvara-import
2 providers, 2 routes, 1 workspaces, 1 policies
Maps cleanly: 6
Maps, with a difference: 0
No equivalent: 1
You need to: 3
What DVARA adds: 6
Read dvara-import/import-report.md before you start the gateway.
| Option | What it does |
|---|---|
<config.yaml> | The LiteLLM file to read. One file at a time |
-o, --out <folder> | Where to write. Created if missing. The default is dvara-import |
--force | Replace files already in the folder |
-h, --help | Show the help |
The importer reads only the file you name. It opens no network connection and writes only into the output folder.
It never copies a secret. os.environ/NAME becomes ${NAME}, which the gateway reads from its environment at
startup. A key written in your file as a literal value is not copied: the output names an environment variable
instead, and the report tells you to set it and rotate the key. A URL with credentials or a query string is not
copied either.
| Exit code | Meaning |
|---|---|
0 | Written |
1 | The input could not be read, or is not a LiteLLM config (it has no model_list). Nothing is written |
2 | Usage error |
3 | A file in the output folder would be replaced. Nothing is written; pass --force |
What it writes
| File | What it is |
|---|---|
gateway.yaml | Providers, workspaces, routes, model limits and policies, in the open gateway's format |
import-report.md | The report: what you need to do, what has no equivalent and why, what changed, what maps cleanly, and what DVARA adds |
dvara-import.properties | Retries and timeouts, which gateway.yaml cannot carry. Written only when your file sets them |
For the quick-start file above, gateway.yaml routes gpt-4o to OpenAI and claude-sonnet to Anthropic, sends
Anthropic the real model name, and adds a policy that refuses any other model:
providers:
- type: openai
api_key: ${OPENAI_API_KEY}
- type: anthropic
api_key: ${ANTHROPIC_API_KEY}
workspaces:
- id: "default"
routes:
- id: "gpt-4o"
model: "gpt-4o"
strategy: weighted
providers:
- provider: openai
weight: 1
- id: "claude-sonnet"
model: "claude-sonnet"
strategy: weighted
providers:
- provider: anthropic
weight: 1
pinned_model_version: "claude-sonnet-4-5"
model_limits:
- model: "claude-sonnet-4-5"
provider: anthropic
context_tokens: 200000
output_tokens: 64000
policies:
- id: "litellm-served-models"
status: ACTIVE
dsl: |
version: "1"
rules:
- id: only-listed-models
conditions:
model:
allowlist:
- "claude-sonnet"
- "claude-sonnet-4-5"
- "gpt-4o"
action: DENY
deny_message: "This model is not served by this gateway"
The real file also carries comments that explain each part.
Start the gateway on the result
-
Read
import-report.md. Its first section, You need to, lists what to do before you start. -
Set the environment variables the report lists, such as
OPENAI_API_KEYandANTHROPIC_API_KEY. -
Add an API key.
gateway.yamlhas none, so the gateway starts and refuses every call until you add one. Mint a key and paste theapi_keysentry it prints into the file:java -jar dvara-gateway-server-<version>-app.jar --generate-key --name my-app --workspace defaultTo let your callers keep LiteLLM's master key, fingerprint it instead and add the result under
api_keyswithworkspace: default:printf '%s' "$LITELLM_MASTER_KEY" | java -jar dvara-gateway-server-<version>-app.jar --hash-key - -
Start the gateway on the file. Pass the properties file too when the importer wrote one:
DVARA_CONFIG_FILE=dvara-import/gateway.yaml \OPENAI_API_KEY=<your-openai-key> \ANTHROPIC_API_KEY=<your-anthropic-key> \java -jar dvara-gateway-server-<version>-app.jar \--spring.config.additional-location=file:dvara-import/dvara-import.properties -
Check an allowed and a refused model. A model the file serves answers as before. A model it does not serve is refused with
403 policy_denied, as LiteLLM refused it.
See Open-source gateway configuration for every key in the file, and API keys for minting and fingerprinting keys.
How a LiteLLM file maps
| LiteLLM | DVARA |
|---|---|
A model_list entry | A provider, and a route for its model_name |
model_name different from the model it calls | A route whose pinned_model_version is the model the provider is sent |
Several deployments of one model_name on different providers | One weighted route, by weight or rpm |
Deployments of one model_name that call different models | The first is served; the others become its fallbacks |
router_settings.fallbacks, litellm_settings.fallbacks | The route's fallbacks chain, at most 5 |
default_fallbacks | Added to each route that names no fallbacks of its own |
model_group_alias | A route for the alias that sends its target's model |
model_info.max_input_tokens, max_output_tokens | A model_limits entry |
| Only the listed models are served | A policy, litellm-served-models, that refuses any other model with 403 |
default_team_settings | A workspace per team, with rpm_limit and tpm_limit and a model allowlist policy for its models |
| Presidio guardrail | pii.action: REDACT on the workspaces |
| Lakera or prompt-injection guardrail | guardrail.action: BLOCK on the workspaces |
router_settings: num_retries, timeout, stream_timeout, cooldown_time, max_fallbacks | dvara.llm-gateway.resilience.* in dvara-import.properties |
litellm_settings: num_retries, request_timeout, stream_timeout | The same properties. When router_settings sets the same thing, it wins, as in LiteLLM |
os.environ/NAME | ${NAME} |
Without a Presidio or prompt-injection guardrail in your file, the workspace logs PII and prompt-injection detections
and lets the request through, which is the gateway's default. gateway.yaml has the two stricter lines as comments;
uncomment them to redact PII and block injections.
Providers
| LiteLLM prefix | DVARA provider | Model the gateway is sent, for example |
|---|---|---|
openai/, or a bare gpt-*, o1, o3 or o4 name | openai | gpt-4o |
custom_openai/, hosted_vllm/, openai/ with api_base | openai, at that base_url (without any user, password or query string) | the model id |
azure/ | azure-openai (base_url gets /openai added) | azure/<deployment> |
anthropic/, or a bare claude-* name | anthropic | claude-sonnet-4-5 |
gemini/ | gemini | gemini-2.5-flash |
bedrock/ (converse/ and invoke/ dropped) | bedrock | bedrock/<model id> |
mistral/ | mistral | mistral-large-latest |
cohere/, cohere_chat/ | cohere | command-r-plus |
groq/ | groq | groq/<model> |
deepseek/ | deepseek | deepseek-chat |
xai/ | grok | grok-4 |
dashscope/ | qwen | qwen-plus |
moonshot/ | moonshot | kimi-k2-0711-preview |
zai/ | chatglm | glm-4.6 |
ollama/, ollama_chat/ | ollama | ollama/<model> |
A deployment that names its own server is never pointed at the provider's public API. Credentials or a query string
in its api_base are not copied, and the report tells you to give the server a key the gateway can send and to rotate
the old credentials. If the api_base cannot be used, the deployment is not served and the report says so.
Any other prefix, such as vertex_ai/, azure_ai/, together_ai/ or openrouter/, has no provider in the open
gateway. No provider or route is written for it, and the report names each such deployment and the reason.
What does not carry over
The report names each one. The main ones:
- One endpoint per provider. The open gateway has one OpenAI, one Azure OpenAI and so on. A second deployment of
the same provider with a different key or URL is not served; the first is. A workspace can bring its own provider
key under
credentials. An OpenAI-compatible server shares theopenaislot with OpenAI itself. - Wildcards that rename models. A pattern the gateway names the same way, such as
groq/*, becomes a pattern route.anthropic/*cannot, because the gateway names Anthropic's models without the prefix: the provider is still configured, and callers sendclaude-sonnet-4-5. - Wildcards on the model allowlist. An allowlist matches exact names only. The named models keep their allowlist and each team keeps its own, but the models a wildcard served are refused with 403 until you add them by hand. The report lists each wildcard under "You need to". A file whose every entry is a wildcard gets no allowlist.
- Routing strategies other than simple-shuffle. Least-busy, usage-based and latency-based routing become
weighted. - Per-deployment
rpmandtpmlimits, default parameters such astemperatureandmax_tokens, and custom prices. - Caching, Redis, budgets, callbacks to other tools such as Langfuse, alerting, the database,
context_window_fallbacksandcontent_policy_fallbacks. - Anything in LiteLLM's database: virtual keys, users, teams, budgets and models added through its UI or API.
Only
config.yamlis read.
Next steps
- Migrate model traffic to DVARA: move clients in stages, with a rollback path.
- Routing and load balancing: weighted routes, patterns and pinned models.
- Resilience and failover: retries, timeouts and fallback chains.
- Enforce AI policy as code: extend the starter policy.
- Book a 20-minute migration call: go through your importer report with the DVARA team.