History

chore(codex): update codex user-agent to 0.153.3

- Update default Codex executor user-agent and model override headers to `codex-tui/0.153.3`.

Luis Pater committed 2 months agov7.2.152

Commit c76dfd41 parent 580df366 files · +16 −16Browse files

Unified · Split

6 files
  1. internal/client/codex/optimize-multi-agent-v2/optimize_multi_agent_v2_test.go +8 −8
  2. internal/registry/model_definitions_test.go +1 −1
  3. internal/registry/models/models.json +4 −4
  4. internal/runtime/executor/codex_executor_request.go +1 −1
  5. internal/runtime/executor/codex_executor_spawn_agent_test.go +1 −1
  6. internal/runtime/executor/codex_websockets_executor_test.go +1 −1
internal/client/codex/optimize-multi-agent-v2/optimize_multi_agent_v2_test.go+8−8
@@ -30,7 +30,7 @@ func TestIsCodexMultiAgentClient(t *testing.T) { · 29 unmodified lines
3030 },
3131 {
3232 name: "codex tui",
33− userAgent: "codex-tui/0.145.0 (Mac OS 26.5.2; arm64) iTerm.app/3.6.11 (codex-tui; 0.145.0)",
33+ userAgent: "codex-tui/0.153.3 (Mac OS 26.5.1; arm64) iTerm.app/3.6.11 (codex-tui; 0.153.3)",
3434 want: true,
3535 },
3636 {
@@ -237,7 +237,7 @@ func TestOptimizeCodexMultiAgentV2RequestSkipsNamespaceConflict(t *testing.T) { · 200 unmodified lines
237237 t.Parallel()
238238
239239 payload := []byte(`{"tools":[{"type":"namespace","name":"collaboration","tools":[{"type":"function","name":"spawn_agent"}]},{"type":"namespace","name":"collaboration-optimize","tools":[]}]}`)
240− headers := http.Header{"User-Agent": []string{"codex-tui/0.145.0"}}
240+ headers := http.Header{"User-Agent": []string{"codex-tui/0.153.3"}}
241241 cfg := &config.Config{Codex: config.CodexConfig{OptimizeMultiAgentV2: true}}
242242 got, optimized := OptimizeCodexMultiAgentV2Request(context.Background(), headers, payload, cfg)
243243 if optimized {
@@ -516,13 +516,13 @@ func TestRewriteCodexMultiAgentV2InputConditions(t *testing.T) { · 272 unmodified lines
516516 {
517517 name: "codex tui enabled",
518518 cfg: &config.Config{Codex: config.CodexConfig{OptimizeMultiAgentV2: true}},
519− userAgent: "codex-tui/0.145.0",
519+ userAgent: "codex-tui/0.153.3",
520520 want: true,
521521 },
522522 {
523523 name: "optimization disabled",
524524 cfg: &config.Config{},
525− userAgent: "codex-tui/0.145.0",
525+ userAgent: "codex-tui/0.153.3",
526526 },
527527 {
528528 name: "unrelated client",
@@ -607,7 +607,7 @@ func TestRewriteCodexSpawnAgentDescriptionDisabledLeavesPayloadUnchanged(t *test · 78 unmodified lines
607607 t.Parallel()
608608
609609 payload := []byte(`{"tools":[{"type":"function","name":"spawn_agent","description":"unchanged","parameters":{"properties":{"message":{"encrypted":true}}}}]}`)
610− headers := http.Header{"User-Agent": []string{"codex-tui/0.145.0"}}
610+ headers := http.Header{"User-Agent": []string{"codex-tui/0.153.3"}}
611611 got := RewriteCodexSpawnAgentDescription(context.Background(), headers, payload, &config.Config{})
612612 if string(got) != string(payload) {
613613 t.Fatalf("disabled optimization changed payload: %s", got)
@@ -645,13 +645,13 @@ func TestReplaceCodexSpawnAgentModelsNormalizesSectionsAndPreservesInstructions( · 31 unmodified lines
645645 func TestCodexClientUserAgentPrefersGinRequest(t *testing.T) {
646646 gin.SetMode(gin.TestMode)
647647 request := httptest.NewRequest(http.MethodPost, "/v1/responses", nil)
648− request.Header.Set("User-Agent", "codex-tui/0.145.0")
648+ request.Header.Set("User-Agent", "codex-tui/0.153.3")
649649 ginCtx, _ := gin.CreateTestContext(httptest.NewRecorder())
650650 ginCtx.Request = request
651651 ctx := context.WithValue(context.Background(), "gin", ginCtx)
652652 headers := http.Header{"User-Agent": []string{"overridden-client/1.0"}}
653653
654− if got := codexClientUserAgent(ctx, headers); got != "codex-tui/0.145.0" {
654+ if got := codexClientUserAgent(ctx, headers); got != "codex-tui/0.153.3" {
655655 t.Fatalf("codexClientUserAgent() = %q, want gin request User-Agent", got)
656656 }
657657 }
@@ -785,7 +785,7 @@ func TestOptimizeCodexMultiAgentV2RequestRemovesEncryptionInAdditionalTools(t *t · 127 unmodified lines
785785 ]}
786786 ]
787787 }`)
788− headers := http.Header{"User-Agent": []string{"codex-tui/0.145.0"}}
788+ headers := http.Header{"User-Agent": []string{"codex-tui/0.153.3"}}
789789 cfg := &config.Config{Codex: config.CodexConfig{OptimizeMultiAgentV2: true}}
790790 got, _ := OptimizeCodexMultiAgentV2Request(context.Background(), headers, payload, cfg)
791791
internal/registry/model_definitions_test.go+1−1
@@ -10,7 +10,7 @@ func TestGetStaticModelDefinitionsByChannelSupportsGeminiInteractions(t *testing · 9 unmodified lines
1010 }
1111
1212 func TestModelOverrideHeadersFromEmbeddedModels(t *testing.T) {
13− const wantUA = "codex-tui/0.144.0 (Mac OS 26.5.1; arm64) iTerm.app/3.6.11 (codex-tui; 0.144.0)"
13+ const wantUA = "codex-tui/0.153.3 (Mac OS 26.5.1; arm64) iTerm.app/3.6.11 (codex-tui; 0.153.3)"
1414 got := ModelOverrideHeaders("gpt-5.6-luna")
1515 if got == nil {
1616 t.Fatal("ModelOverrideHeaders(gpt-5.6-luna) = nil, want headers")
internal/registry/models/models.json+4−4
@@ -2459,7 +2459,7 @@ · 2458 unmodified lines
24592459 },
24602460 "config": {
24612461 "override_header": {
2462− "user-agent": "codex-tui/0.144.0 (Mac OS 26.5.1; arm64) iTerm.app/3.6.11 (codex-tui; 0.144.0)",
2462+ "user-agent": "codex-tui/0.153.3 (Mac OS 26.5.1; arm64) iTerm.app/3.6.11 (codex-tui; 0.153.3)",
24632463 "originator": "codex-tui"
24642464 }
24652465 },
@@ -2651,7 +2651,7 @@ · 185 unmodified lines
26512651 },
26522652 "config": {
26532653 "override_header": {
2654− "user-agent": "codex-tui/0.144.0 (Mac OS 26.5.1; arm64) iTerm.app/3.6.11 (codex-tui; 0.144.0)",
2654+ "user-agent": "codex-tui/0.153.3 (Mac OS 26.5.1; arm64) iTerm.app/3.6.11 (codex-tui; 0.153.3)",
26552655 "originator": "codex-tui"
26562656 }
26572657 },
@@ -2872,7 +2872,7 @@ · 214 unmodified lines
28722872 },
28732873 "config": {
28742874 "override_header": {
2875− "user-agent": "codex-tui/0.144.0 (Mac OS 26.5.1; arm64) iTerm.app/3.6.11 (codex-tui; 0.144.0)",
2875+ "user-agent": "codex-tui/0.153.3 (Mac OS 26.5.1; arm64) iTerm.app/3.6.11 (codex-tui; 0.153.3)",
28762876 "originator": "codex-tui"
28772877 }
28782878 },
@@ -3093,7 +3093,7 @@ · 214 unmodified lines
30933093 },
30943094 "config": {
30953095 "override_header": {
3096− "user-agent": "codex-tui/0.144.0 (Mac OS 26.5.1; arm64) iTerm.app/3.6.11 (codex-tui; 0.144.0)",
3096+ "user-agent": "codex-tui/0.153.3 (Mac OS 26.5.1; arm64) iTerm.app/3.6.11 (codex-tui; 0.153.3)",
30973097 "originator": "codex-tui"
30983098 }
30993099 },
internal/runtime/executor/codex_executor_request.go+1−1
@@ -23,7 +23,7 @@ import ( · 22 unmodified lines
2323 )
2424
2525 const (
26− codexUserAgent = "codex-tui/0.146.0 (Mac OS 26.5.0; arm64) iTerm.app/3.6.10 (codex-tui; 0.146.0)"
26+ codexUserAgent = "codex-tui/0.153.3 (Mac OS 26.5.1; arm64) iTerm.app/3.6.11 (codex-tui; 0.153.3)"
2727 codexOriginator = "codex-tui"
2828 codexDefaultImageToolModel = "gpt-image-2"
2929 codexResponsesLiteHeader = "X-OpenAI-Internal-Codex-Responses-Lite"
internal/runtime/executor/codex_executor_spawn_agent_test.go+1−1
@@ -234,7 +234,7 @@ func codexSpawnAgentTestPayload() []byte { · 233 unmodified lines
234234
235235 func codexSpawnAgentTestContext() context.Context {
236236 request := httptest.NewRequest(http.MethodPost, "/v1/responses", nil)
237− request.Header.Set("User-Agent", "codex-tui/0.145.0")
237+ request.Header.Set("User-Agent", "codex-tui/0.153.3")
238238 ginCtx, _ := gin.CreateTestContext(httptest.NewRecorder())
239239 ginCtx.Request = request
240240 return context.WithValue(context.Background(), "gin", ginCtx)
internal/runtime/executor/codex_websockets_executor_test.go+1−1
@@ -1822,7 +1822,7 @@ func TestApplyCodexWebsocketHeaders_EmptyAPIKey_OmitsAuthorizationAndOAuthHeader · 1821 unmodified lines
18221822 }
18231823
18241824 func TestApplyModelHeaderOverridesFromModelConfig(t *testing.T) {
1825− const wantUA = "codex-tui/0.144.0 (Mac OS 26.5.1; arm64) iTerm.app/3.6.11 (codex-tui; 0.144.0)"
1825+ const wantUA = "codex-tui/0.153.3 (Mac OS 26.5.1; arm64) iTerm.app/3.6.11 (codex-tui; 0.153.3)"
18261826 req, err := http.NewRequest(http.MethodPost, "https://example.com/responses", nil)
18271827 if err != nil {
18281828 t.Fatalf("NewRequest() error = %v", err)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t