Commit Graph
2 Commits
Author SHA1 Message Date
ding-oai b059ce11f9 Allow hosts to route selected analytics events (#62684)
## Why

The analytics client sends eligible events through HTTP. Hosts that
embed Codex need a way to deliver specific event types themselves while
keeping HTTP delivery for the rest of the batch.

## What changed

Add `AnalyticsEventsClient::new_with_event_transport` so hosts can opt
in and select eligible events by wire type. The transport receives the
complete wire payload and the event's product SKU, when available.
Events stay on the HTTP path unless the transport returns `Handled`,
which suppresses a duplicate HTTP send.

Disabled analytics and local file capture bypass the transport.
Rebinding the client to a new auth context restores HTTP delivery.

## Testing

Add tests for mixed batches that verify HTTP payloads and product
attribution, plus coverage for auth eligibility, local capture,
analytics opt-out, and auth rebinding.

GitOrigin-RevId: 27ba3fe54050754b5f844f00e7e761a4d7bcb8c0
2026-11-20 06:37:15 +00:00
cooper-oai 388aee4b26 Use runtime authentication across backend request paths (#59572)
## What changed

- Share the harness runtime identity with analytics delivery and turn-cost queries, and resolve request authentication together with its account-bound transport policy.
- Add runtime authentication to ChatGPT request helpers and `codex cloud`, including environment discovery. Resolve environment credentials for each request and honor CLI configuration overrides when loading cloud authentication.
- Preserve custom-backend authentication, validate runtime destinations, and keep cloud requests from following redirects.
- Forward only organization and project selectors from model-provider headers to API-key analytics requests.

## Testing

Add regression coverage for runtime request signing, credential refresh, account and resource selection, redirect credential handling, custom destinations, and cloud credential-store overrides.

GitOrigin-RevId: 75f33961ee6482881e9ff9817e99d977f31b65b8
2026-11-05 05:09:32 +00:00