diff --git a/changelog/unreleased/codex-stable-identity.md b/changelog/unreleased/codex-stable-identity.md new file mode 100644 index 00000000..9eee6270 --- /dev/null +++ b/changelog/unreleased/codex-stable-identity.md @@ -0,0 +1,7 @@ +### English + +- Codex requests present the official stable CLI identity, `codex_cli_rs/0.172.0`. + +### 中文 + +- Codex 请求使用官方稳定版 CLI 身份 `codex_cli_rs/0.172.0`。 diff --git a/internal/providers/codex/credential.go b/internal/providers/codex/credential.go index beaa10ac..5a818eb7 100644 --- a/internal/providers/codex/credential.go +++ b/internal/providers/codex/credential.go @@ -58,11 +58,11 @@ const ( pathWhamUsage = "/wham/usage" // Cloaking: upstream gates on the official Codex CLI UA/originator. - // rust-v0.171.0 (stable) defaults the originator to codex_cli_rs and + // rust-v0.172.0 (stable) defaults the originator to codex_cli_rs and // builds the UA as "{originator}/{version} ({os} {os_version}; {arch}) {terminal}". // Alpha releases stay off this pin. The OS and terminal stay on the // previously captured host identity; only the CLI version tracks stable. - UserAgent = "codex_cli_rs/0.171.0 (Mac OS 26.5.2; arm64) iTerm.app/3.6.11" + UserAgent = "codex_cli_rs/0.172.0 (Mac OS 26.5.2; arm64) iTerm.app/3.6.11" Originator = "codex_cli_rs" QuotaUnit = "rate_limit_window" diff --git a/internal/providers/codex/headers_passthrough_test.go b/internal/providers/codex/headers_passthrough_test.go index 779c4bd1..64cda915 100644 --- a/internal/providers/codex/headers_passthrough_test.go +++ b/internal/providers/codex/headers_passthrough_test.go @@ -80,7 +80,7 @@ func TestRoutingHintCarriesAcceptedTier(t *testing.T) { } func TestUserAgentPinnedToOfficialStable(t *testing.T) { - if UserAgent != "codex_cli_rs/0.171.0 (Mac OS 26.5.2; arm64) iTerm.app/3.6.11" || Originator != "codex_cli_rs" { + if UserAgent != "codex_cli_rs/0.172.0 (Mac OS 26.5.2; arm64) iTerm.app/3.6.11" || Originator != "codex_cli_rs" { t.Fatalf("UserAgent=%q Originator=%q", UserAgent, Originator) } }