Outcome: every httpx-backed inference route now crosses one shared
final-request hook. It removes the two attribution headers, overwrites the framework
fingerprint with the single PROVIDER_USER_AGENT constant, and keeps the
existing W3C baggage strip.
agent or eval builds its provider model → shared egress_http_client() → provider SDK adds its request headers → sanitize_provider_egress() runs last → User-Agent = PROVIDER_USER_AGENT → X-Title / HTTP-Referer / baggage removed → x-session-id and authorization preserved → request leaves for the provider
agents/_shared/provider_egress.py owns both the hook and the selected
UA value. If the founder selects a different value, only the named constant changes;
providers and tests import the same definition.
| Surface | Covered paths |
|---|---|
| Atlas | OpenRouter gateway |
| Vani, Vega, context-judge | OpenRouter gateway + provider-direct |
| Blake, Indigo | OpenRouter gateway + provider-direct |
| Evals | Indigo bench clients + Blake judge client |
The root fleet guard constructs all 11 real agent HTTP provider branches, reaches each
model's actual registered httpx hook, and feeds it the old SDK UA, attribution headers,
baggage, cache-affinity header, and authorization header. A discovery assertion forces a
future agent provider into the roster, while an AST guard rejects raw
AsyncOpenAI clients that bypass the egress client.
uv run ruff check . → All checks passed uv run pytest -q → 457 passed atlas / context_judge / framer package suites → 516 / 58 / 164 passed indigo / mira / registrar package suites → 326 / 320 / 516 passed