Migrating from LiteLLM
Switch from LiteLLM to Shim
LiteLLM routes your calls. Shim does a different job: it masks personal data before a request leaves and keeps a record you can prove to an auditor.
What is different
Three things Shim does that LiteLLM does not
- 01
Native requests, no translation
LiteLLM maps every provider into one OpenAI-style format. Shim keeps each request in its own provider format, so new models and fields work the day they ship.
- 02
Privacy in the request path
Emails, cards, IBANs, Turkish IDs and secrets are masked before the request leaves and restored in the reply. In LiteLLM, PII masking is a guardrail integration you set up and run.
- 03
Evidence, not just logs
Every request lands in a hash-chained audit trail, with reports for KVKK, GDPR and the EU AI Act. LiteLLM sends logs to the observability tools you connect.
Side by side
How the two differ
| Dimension | LiteLLM | Shim |
|---|---|---|
| Main job | Route one API format to many providers | Protect and prove traffic to OpenAI, Anthropic and Gemini |
| Request format | OpenAI-style, translated for each provider | Each provider's native API, unchanged |
| PII masking | Guardrail integrations you configure | Built into the request path and reversible |
| Turkish identifiers | Not built in | TCKN, VKN and IBAN with checksum validation |
| Audit trail | Logs sent to your observability tools | Hash-chained and verifiable, with compliance reports |
| Keys, budgets, limits | Virtual keys, budgets and rate limits | Gateway keys, budgets and rate limits |
| Open source | Open source core, commercial enterprise tier | Apache-2.0 gateway on GitHub, source-available enterprise layer |
How to switch
From LiteLLM to Shim in 6 steps
- 1
Create a workspace
Sign up for the hosted gateway, or talk to us about running Shim Enterprise on your own servers.
- 2
Add your provider keys
Add OpenAI, Anthropic or Google keys under Gateway, Provider credentials. Shim uses your own provider accounts.
- 3
Create gateway keys
Issue one Shim key per app or team. It takes the place of your LiteLLM virtual keys.
- 4
Point your code at Shim
Change the base URL and the key. Calls to OpenAI models need nothing else.
- 5
Move other models to their own SDK
If you reached Claude or Gemini through LiteLLM's OpenAI format, switch that call to the Anthropic or Google SDK.
- 6
Turn on masking and check the trail
Choose which data types to mask, send a request, and find it under Requests and Governance in the console.
The code change
The diff, in full
OpenAI models
Same SDK, same request, same response. Only the base URL and the key change.
Before· today
from openai import OpenAI
client = OpenAI(
api_key="sk-litellm-...",
base_url="http://localhost:4000"
)After· through Shim
from openai import OpenAI
client = OpenAI(
api_key="sk-shim-...",
base_url="https://api.getshim.tech/v1"
)Claude through LiteLLM
Shim does not translate formats, so a Claude call moves to the Anthropic SDK and its native request shape.
Before· today
from openai import OpenAI
client = OpenAI(
api_key="sk-litellm-...",
base_url="http://localhost:4000"
)
client.chat.completions.create(
model="claude-haiku-4-5",
messages=[{"role": "user", "content": "Hi"}],
)After· through Shim
from anthropic import Anthropic
client = Anthropic(
api_key="sk-shim-...",
base_url="https://api.getshim.tech"
)
client.messages.create(
model="claude-haiku-4-5",
max_tokens=1024,
messages=[{"role": "user", "content": "Hi"}],
)What it takes
Minutes for OpenAI calls. A little longer for the rest.
Calls that already use OpenAI models only change the base URL and the key. Calls that reach Claude or Gemini through LiteLLM's OpenAI format move to that provider's SDK, which changes the request and response shape. Plan most of your time there, and for recreating per-team keys and budgets.
Ready to move your first service?
Start free on the hosted gateway, or tell us about your setup and we will plan the switch with you, on our cloud or on your own servers.