Skip to main content
Version: 1.14.0

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.

Where to get the importer

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.
OptionWhat 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
--forceReplace files already in the folder
-h, --helpShow 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 codeMeaning
0Written
1The input could not be read, or is not a LiteLLM config (it has no model_list). Nothing is written
2Usage error
3A file in the output folder would be replaced. Nothing is written; pass --force

What it writes​

FileWhat it is
gateway.yamlProviders, workspaces, routes, model limits and policies, in the open gateway's format
import-report.mdThe report: what you need to do, what has no equivalent and why, what changed, what maps cleanly, and what DVARA adds
dvara-import.propertiesRetries 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​

  1. Read import-report.md. Its first section, You need to, lists what to do before you start.

  2. Set the environment variables the report lists, such as OPENAI_API_KEY and ANTHROPIC_API_KEY.

  3. Add an API key. gateway.yaml has none, so the gateway starts and refuses every call until you add one. Mint a key and paste the api_keys entry it prints into the file:

    java -jar dvara-gateway-server-<version>-app.jar --generate-key --name my-app --workspace default

    To let your callers keep LiteLLM's master key, fingerprint it instead and add the result under api_keys with workspace: default:

    printf '%s' "$LITELLM_MASTER_KEY" | java -jar dvara-gateway-server-<version>-app.jar --hash-key -
  4. 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
  5. 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​

LiteLLMDVARA
A model_list entryA provider, and a route for its model_name
model_name different from the model it callsA route whose pinned_model_version is the model the provider is sent
Several deployments of one model_name on different providersOne weighted route, by weight or rpm
Deployments of one model_name that call different modelsThe first is served; the others become its fallbacks
router_settings.fallbacks, litellm_settings.fallbacksThe route's fallbacks chain, at most 5
default_fallbacksAdded to each route that names no fallbacks of its own
model_group_aliasA route for the alias that sends its target's model
model_info.max_input_tokens, max_output_tokensA model_limits entry
Only the listed models are servedA policy, litellm-served-models, that refuses any other model with 403
default_team_settingsA workspace per team, with rpm_limit and tpm_limit and a model allowlist policy for its models
Presidio guardrailpii.action: REDACT on the workspaces
Lakera or prompt-injection guardrailguardrail.action: BLOCK on the workspaces
router_settings: num_retries, timeout, stream_timeout, cooldown_time, max_fallbacksdvara.llm-gateway.resilience.* in dvara-import.properties
litellm_settings: num_retries, request_timeout, stream_timeoutThe 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 prefixDVARA providerModel the gateway is sent, for example
openai/, or a bare gpt-*, o1, o3 or o4 nameopenaigpt-4o
custom_openai/, hosted_vllm/, openai/ with api_baseopenai, 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-* nameanthropicclaude-sonnet-4-5
gemini/geminigemini-2.5-flash
bedrock/ (converse/ and invoke/ dropped)bedrockbedrock/<model id>
mistral/mistralmistral-large-latest
cohere/, cohere_chat/coherecommand-r-plus
groq/groqgroq/<model>
deepseek/deepseekdeepseek-chat
xai/grokgrok-4
dashscope/qwenqwen-plus
moonshot/moonshotkimi-k2-0711-preview
zai/chatglmglm-4.6
ollama/, ollama_chat/ollamaollama/<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 the openai slot 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 send claude-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 rpm and tpm limits, default parameters such as temperature and max_tokens, and custom prices.
  • Caching, Redis, budgets, callbacks to other tools such as Langfuse, alerting, the database, context_window_fallbacks and content_policy_fallbacks.
  • Anything in LiteLLM's database: virtual keys, users, teams, budgets and models added through its UI or API. Only config.yaml is read.

Next steps​