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.

RAG & search guideproduction in four steps
1. Embeddings

Reference the embedding model by its exact slug for the index lifetime. An endpoint retirement carries at least 14 days' notice.

2. Rerank

Rerank endpoints participate in routing: health, price and region apply like any other endpoint type.

3. Answer step

Use eu-cheapest or a custom policy; require structured output as a hard constraint if you parse the answer.

4. Cost per query

Read cost per project and key in Usage & Cost; every response also carries its own charge.

guide copy · the code calls the gateway's OpenAI-compatible routes; model slugs are examples from the catalog · not yet connected