Embed, rerank and answer through one contract.
Embeddings and rerank models sit in the same catalog as chat, on their own OpenAI-shaped routes. Keep one embedding model per index so vectors stay comparable, and route the answer step by cost inside your region.
WHAT YOU GET
One embedding model per index, by exact slug
Rerank as a first-class route: POST /v1/rerank
Region-constrained answer generation
MODELS FOR THIS WORKLOAD · LIVE CATALOG
rag.py · OpenAI SDK, base URL changed
emb = client.embeddings.create(
model=EMBED_MODEL,
input=chunks,
)
ranked = httpx.post(f"{BASE}/rerank", headers=AUTH, json={
"model": RERANK_MODEL,
"query": q,
"documents": hits,
"top_n": 8,
}).json()["results"]
ans = client.chat.completions.create(
model="openai/gpt-5.4",
messages=grounded(q, ranked),
)
# every response carries res.yelno["provider"] and ["charge"]Go live in three steps
01
Fix the embedding model
Reference the exact slug for the index lifetime; an endpoint retirement carries at least 14 days' notice and a Yelno-Deprecation header on every response until then.
02
Rerank in the same call chain
Rerank endpoints carry health and price like any other; fallbacks stay within your region.
03
Route the answer by cost
eu-cheapest picks the lowest eligible price among EU endpoints.