Model switching
Change the connection. Keep your app.
If your app already uses the OpenAI chat format, the main changes are the API address, secret key and model name.
The three values to check
1Base URL
https://api.qabas.ae/v12API key
QABAS_API_KEY3Model
qwen-2.5-7bYour messages, roles, streaming option and standard response handling can stay in the familiar chat-completions shape.
Before and after
Before
from openai import OpenAI
client = OpenAI(
api_key="YOUR_EXISTING_PROVIDER_KEY",
base_url="https://your-existing-provider.example/v1",
)With Qabas
from openai import OpenAI
import os
client = OpenAI(
api_key=os.environ["QABAS_API_KEY"],
base_url="https://api.qabas.ae/v1",
)
response = client.chat.completions.create(
model="qwen-2.5-7b",
messages=[{"role": "user", "content": "Marhaba"}],
)Ask which models are available
Do not guess the model name. List the models that your key can see.
curl https://api.qabas.ae/v1/models \
-H "Authorization: Bearer $QABAS_API_KEY"Compatible does not mean every model behaves identically
- Quality, speed, context length and token use can change.
- Future vision, tools or structured-output support may vary by model.
- Test your important prompts before changing a production model.
- Qabas does not silently move a request to another model unless that behaviour is explicitly documented.