Client identification guide
Cortega records which application made each governed request so operators can answer "which system called this?" without minting a virtual key per app.
What appears in Observability
On Observability → LLM Queries (and the other traffic tables), the first column is Agent Stack, above Timestamp Source.
Agent Stack is composed from request headers Cortega captures on every call:
| Source | Header | Role |
|---|---|---|
| Application name (recommended) | X-Cortega-Application | Stable name you choose for the workload |
| HTTP client identity | User-Agent | What the client library or tool already sends |
| OpenAI / Stainless SDK metadata | X-Stainless-Lang, X-Stainless-Package-Version, X-Stainless-Runtime, X-Stainless-Runtime-Version, X-Stainless-OS, X-Stainless-Arch, X-Stainless-Async | Language, runtime, OS, and SDK version |
| Anthropic API pin | anthropic-version | Anthropic SDK API version when present |
Example Agent Stack values:
billing-reconciler · pydantic-ai/2.25.0 · python CPython · Windows · sdk 2.53.0cortega-console/model-playground · cortega-console/model-playgroundcurl/8.7.1(no application header set)
Gateway config must have been published after this capture was added; older gateways only start recording these fields after their next config reload.
Set X-Cortega-Application from your app
Send a short, stable name for the workload on every request to the gateway:
POST /v1/chat/completions HTTP/1.1
Host: gateway.example.com
Authorization: Bearer <virtual-key>
X-Cortega-Application: billing-reconciler
User-Agent: my-service/1.4.0
Content-Type: application/json
Python (openai SDK):
from openai import OpenAI
client = OpenAI(
base_url="https://gateway.example.com/v1",
api_key="<virtual-key>",
default_headers={
"X-Cortega-Application": "billing-reconciler",
},
)
Naming tips:
- Prefer a durable workload name (
claims-intake,nightly-summarizer), not a host or pod name that changes every deploy. - Keep it under a few dozen characters; avoid secrets or PII.
- One shared virtual key can still separate traffic when each caller sets a distinct application name.
What the Cortega Console sends
Console-originated gateway calls set both User-Agent and
X-Cortega-Application so playground and diagnostic traffic is obvious
next to customer apps:
| Surface | Value |
|---|---|
| Model Playground | cortega-console/model-playground |
| MCP Playground | cortega-console/mcp-playground |
| Provider diagnostics | cortega-console/provider-diagnostics |
| LLM benchmarks | cortega-console/llm-benchmark |
| AI Verifier | cortega-console/edge-verifier |
You do not need to configure these; the management backend adds them when it originates the governed call.
Related guides
- Pass-through routing: credential modes are separate from client identification.