Skip to content

Migration from OpenAI (Drop-in Replacement)

The noris “LLM as a Service” platform fully implements the OpenAI API. As a result, existing code built on the OpenAI SDK or the OpenAI REST API continues to work unchanged after a minimal adjustment. There’s no need to port business logic, prompts, or any RAG pipelines.

Specifically, three parameter changes are enough to switch from OpenAI to noris. After that, the application runs as usual, only the underlying model now comes from the noris infrastructure.

ParameterOpenAInoris
Base URLhttps://api.openai.com/v1https://ai.noris.de/v1
API KeyOpenAI keynoris API key (against AI-Punkte)
Model Namegpt-4ovllm/release/gpt-oss-120b

We recommend storing these values as environment variables (OPENAI_BASE_URL, OPENAI_API_KEY, OPENAI_MODEL) so a switch requires no code changes.

Before, classic OpenAI call:

from openai import OpenAI
client = OpenAI(api_key="sk-...")
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)

After, identical code, only three values adjusted:

from openai import OpenAI
client = OpenAI(
base_url="https://ai.noris.de/v1",
api_key="YOUR_NORIS_API_KEY"
)
response = client.chat.completions.create(
model="vllm/release/gpt-oss-120b",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)

Before:

import OpenAI from "openai";
const client = new OpenAI({apiKey: "sk-..."});
const response = await client.chat.completions.create({
model: "gpt-4o",
messages: [{role: "user", content: "Hello!"}]
});
console.log(response.choices[0].message.content);

After:

import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://ai.noris.de/v1",
apiKey: "YOUR_NORIS_API_KEY"
});
const response = await client.chat.completions.create({
model: "vllm/release/gpt-oss-120b",
messages: [{role: "user", content: "Hello!"}]
});
console.log(response.choices[0].message.content);

LangChain abstracts the provider via the ChatOpenAI class. Here too, only three constructor arguments change.

Before:

from langchain_openai import ChatOpenAI
llm = ChatOpenAI(model="gpt-4o", api_key="sk-...")
response = llm.invoke("Hello!")
print(response.content)

After:

from langchain_openai import ChatOpenAI
llm = ChatOpenAI(
model="vllm/release/gpt-oss-120b",
api_key="YOUR_NORIS_API_KEY",
base_url="https://ai.noris.de/v1"
)
response = llm.invoke("Hello!")
print(response.content)

Existing chains, agents, memory, or RAG components remain untouched, they only communicate with the ChatOpenAI wrapper, whose target has changed.

  • Existing logic, prompts, tool schemas, and RAG pipelines can be adopted unchanged. The OpenAI-compatible interface covers chat completions, streaming, tool calling, and embeddings alike.
  • Note the different model names, see Model Selection for the right counterpart to your previous OpenAI model.
  • Billing is handled via AI-Punkte instead of OpenAI credits. Compare token prices beforehand to adjust your cost calculations.
  • In practice, a migration takes a few minutes: set the API key, swap three values, run a smoke test.