Skip to main content
Migration guide

Migrate from Portkey to DVARA.
Move the controls, not just the traffic.

Both platforms can accept OpenAI-compatible requests. The real work is replacing Portkey keys, headers, Gateway Configs, limits and guardrails with controls you have tested in DVARA.

Map what you use before changing traffic

There is no one-click import. Start with the controls attached to production traffic today, then rebuild and review each one in DVARA.

In PortkeyIn DVARAMigration action
API keys, virtual keys and workspacesWorkspaces, roles, DVARA API keys and provider credentialsCreate new keys and rotate each client. Portkey credentials and header values do not transfer.
Gateway Configs and model targetsProviders, routes, model patterns and optional pinned model versionsRebuild every public model name and target. There is no supported Portkey configuration importer.
Fallback, load balancing and conditional routingRoutes plus retry, circuit-breaker and failover settingsMap the intent, not the JSON shape. Test status codes, model capabilities and stream behavior before cutover.
Budgets and rate limitsWorkspace and API-key limits, with budget controls in the Enterprise platformRecreate the values and verify accounting windows and denial responses. The two products do not share limit semantics.
Guardrails and content checksPolicies, configured PII detection and guardrail checksRebuild each control and test allow, log, redact and deny outcomes. Do not assume an existing action or default carries over.
Logs, metadata and analyticsAudit evidence, request correlation, metrics and Flightdeck viewsMap the fields your investigations and reports use. Configure retention and export for your deployment separately.

Move one workload in six steps

Pick a workload that represents production: include its real model, streaming mode, tools, structured output and failure cases.

  1. 1

    Write down the current contract

    Record the endpoints, models, Portkey-specific headers, API and virtual keys, Config IDs, routing rules, limits, guardrails and metadata in use. Save representative successful and failed responses for comparison.

  2. 2

    Choose the DVARA operating model

    DVARA Open Source provides a file-configured LLM data plane. The Enterprise platform adds Flightdeck, central persistence, workspaces and managed governance workflows. Deploy the shape you intend to operate after the test.

  3. 3

    Rebuild controls and replace credentials

    Add provider credentials, create new DVARA keys, preserve only the public model names clients need, and rebuild routes, limits and governance controls. In a multi-workspace deployment, set DVARA_LLM_GATEWAY_REQUIRE_API_KEY=true; it is false by default.

  4. 4

    Send one complete governed request

    A Portkey call can carry provider credentials plus Portkey headers for the account and Gateway Config. The DVARA call uses the DVARA host and bearer key; do not forward those old headers.

    Before — Portkey
    curl https://api.portkey.ai/v1/chat/completions \
      -H 'Authorization: Bearer <provider-api-key>' \
      -H 'x-portkey-api-key: <portkey-api-key>' \
      -H 'x-portkey-config: <portkey-config-id>' \
      -H 'Content-Type: application/json' \
      -d '{
        "model": "gpt-4o-mini",
        "messages": [{
          "role": "user",
          "content": "Summarize the refund policy."
        }],
        "temperature": 0
      }'
    After — DVARA
    curl https://<your-dvara-host>/v1/chat/completions \
      -H 'Authorization: Bearer <your-dvara-key>' \
      -H 'Content-Type: application/json' \
      -d '{
        "model": "gpt-4o-mini",
        "messages": [{
          "role": "user",
          "content": "Summarize the refund policy."
        }],
        "temperature": 0
      }'

    A representative successful response looks like this:

    {
      "id": "chatcmpl-01JQ4P8F6A2M9K7W3T5Y",
      "object": "chat.completion",
      "model": "gpt-4o-mini",
      "choices": [{
        "index": 0,
        "message": {
          "role": "assistant",
          "content": "Refunds are available within 30 days."
        },
        "finish_reason": "stop"
      }],
      "usage": {
        "prompt_tokens": 16,
        "completion_tokens": 9,
        "total_tokens": 25
      }
    }

    In the Enterprise platform, confirm the request under the expected workspace in Flightdeck. In Open Source, confirm it in the audit sink you configured. Check the provider, policy outcome, status and token usage.

  5. 5

    Test the paths that expose differences

    Test non-streaming and streaming calls, tool use, structured output, bad keys, unknown models, limit boundaries, policy denials, provider errors and failover. Compare response shape, status, token accounting, latency and the evidence recorded.

  6. 6

    Cut over in stages

    Put the Portkey and DVARA URL/key pairs behind runtime configuration. Move one workload, watch the agreed error, latency, cost and denial thresholds, then expand. Keep Portkey available until the acceptance window is complete.

Define rollback before cutover

Restore the Portkey URL and credentials when a response-contract, error-rate, latency, cost or governance threshold fails. Do not mirror sensitive prompts to both systems unless that data handling has been reviewed and approved.

Review DVARA resilience

Questions before you migrate

Is changing the base URL enough?

It is enough to test a simple OpenAI-compatible request. It does not move Gateway Configs, virtual keys, provider credentials, limits, guardrails, logs or metadata conventions. Rebuild those controls and test the paths your application uses before production cutover.

Can DVARA import a Portkey configuration?

No. There is no supported automatic importer. Use your Portkey configuration as an inventory, then create and review the corresponding DVARA workspaces, keys, routes and governance controls.

Which Portkey headers should I remove?

Remove Portkey-specific headers such as x-portkey-api-key, x-portkey-virtual-key, x-portkey-config and x-portkey-provider unless your application uses the same names for an unrelated purpose. Authenticate to DVARA with its Authorization bearer token when API-key enforcement is enabled.

Which DVARA distribution should I use?

Use DVARA Open Source for a file-configured LLM data plane. Use the Enterprise platform when you need Flightdeck, central persistence, managed workspaces and advanced governance workflows. MCP and A2A are Enterprise planes. They run with or without a licence; a production licence removes the Development limits of 3 workspaces and 100,000 governed calls a month.

Will fallback behave the same?

Do not assume it will. Rebuild the route and test the provider errors you expect. DVARA can retry and fail over when configured, but model compatibility and response state matter, and a stream cannot continue on another provider after response delivery has begun.

How do I roll back safely?

Keep Portkey available during the acceptance window and keep both URL and credential sets in runtime configuration. Restore the previous pair if an agreed response-contract, error-rate, latency, cost or governance threshold fails.

Prove one real workload first.

Rebuild its controls, remove the old headers, test its failure paths, and keep the Portkey endpoint ready until the results are clear.