Skip to main content

Migrating from LiteLLM

This guide helps migrate from LiteLLM proxy to Phaseo Gateway.

Overview

Both provide unified API access. Migration involves:
  • Changing base URL
  • Updating API key
  • Adjusting model names

Prerequisites

  • Phaseo account
  • LiteLLM setup

Migration Steps

1. Update Configuration

Replace LiteLLM URL with Phaseo.
# Before (LiteLLM proxy)
curl http://localhost:8000/v1/chat/completions \
  -H "Authorization: Bearer your-litellm-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

# After (Phaseo)

curl https://api.phaseo.ai/v1/chat/completions \
 -H "Authorization: Bearer your-phaseo-key" \
 -H "Content-Type: application/json" \
 -d '{
"model": "gpt-4",
"messages": [{"role": "user", "content": "Hello!"}]
}'

import openai

# Before
client = openai.OpenAI(
    api_key="your-litellm-key",
    base_url="http://localhost:8000/v1"  # LiteLLM proxy
)

# After
client = openai.OpenAI(
    api_key="your-phaseo-key",
    base_url="https://api.phaseo.ai/v1"
)

response = client.chat.completions.create(
    model="gpt-4",
    messages=[{"role": "user", "content": "Hello!"}]
)
import OpenAI from "openai";

// Before
const client = new OpenAI({
	apiKey: "your-litellm-key",
	baseURL: "http://localhost:8000/v1",
});

// After
const client = new OpenAI({
	apiKey: "your-phaseo-key",
	baseURL: "https://api.phaseo.ai/v1",
});

const response = await client.chat.completions.create({
	model: "gpt-4",
	messages: [{ role: "user", content: "Hello!" }],
});

2. Model Names

LiteLLM uses provider/model format. Phaseo may use different names. Check /models for available models.

3. Test

Run your code to ensure compatibility.

Common Issues

  • Model support: Not all LiteLLM models may be in Phaseo.
  • Features: Some LiteLLM features may differ.

Next Steps

  • Use Phaseo’ built-in analytics.
Last modified on July 9, 2026