Skip to main content

Module default_client

Module default_client 

Source
Expand description

Default Codex HTTP client: shared User-Agent, originator, optional residency header, and HttpClient construction.

Use crate::default_client or [codex_login::default_client] from other crates in this workspace.

Structs§

CodexRequestBuilder
Originator

Enums§

ResidencyRequirement
SetOriginatorError

Constants§

CODEX_INTERNAL_ORIGINATOR_OVERRIDE_ENV_VAR
DEFAULT_ORIGINATOR
RESIDENCY_HEADER_NAME

Statics§

USER_AGENT_SUFFIX
Set this to add a suffix to the User-Agent string.

Functions§

add_originator_header
Adds a valid, non-default thread originator override to request headers.
create_client
Create an HTTP client with default originator and User-Agent headers set.
create_client_for_route
Builds the default Codex HTTP client for a concrete outbound route.
create_client_for_route_async
Builds the default Codex HTTP client for a concrete outbound route without blocking the async runtime worker that initiated the request.
create_client_without_request_logging
Create the default HTTP client without request URL or response-header diagnostics.
default_headers
get_codex_user_agent
is_first_party_chat_originator
is_first_party_originator
originator
set_default_client_residency_requirement
set_default_originator