From 5589f1c6b0bc6903ba16093a24b171e692174bfa Mon Sep 17 00:00:00 2001 From: Andrew Nesbitt Date: Mon, 16 Nov 2026 09:23:07 +0000 Subject: [PATCH 1/2] Mirror Codex's current model catalog in its defaults --- README.md | 2 +- codex.go | 19 ++++++++++++------- codex_test.go | 19 +++++++++++++++++++ copilot.go | 4 ++-- harness.go | 2 ++ pricing.go | 14 ++++++++++++-- pricing_feed_test.go | 4 ++-- 7 files changed, 50 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 258133f..ac8356d 100644 --- a/README.md +++ b/README.md @@ -240,7 +240,7 @@ job := harness.Job{ Workspace: "/work", SrcDir: ".", SkillName: skill.Name, - Model: "gpt-5.3-codex", + Model: "gpt-6.1-sol", OutputFile: "report.json", } if _, err := harness.StageSkill(h, job, nil, skill); err != nil { diff --git a/codex.go b/codex.go index c081ff4..55bb153 100644 --- a/codex.go +++ b/codex.go @@ -285,14 +285,19 @@ func (CodexHarness) StateEnv(dir string) []string { } func (CodexHarness) DefaultModels() []ModelDefault { - // IDs mirror Codex's built-in model catalog. The Codex-tuned model comes - // first because that is the CLI's default when --model is absent. + // IDs mirror the listed models in Codex 0.169.0's bundled catalog, in its + // priority order, except GPT-5.5, which Codex rejects for ChatGPT logins. + // GPT-6.1 Sol comes first because that is the CLI's default when --model is + // absent. return []ModelDefault{ - {Name: "GPT-5.3 Codex", ID: modelGPT53CodexID, Tier: modelTierHigh}, - {Name: "GPT-5.4 mini", ID: modelGPT54MiniID, Tier: modelTierMid}, - {Name: "GPT-5.4", ID: modelGPT54ID}, - {Name: "GPT-5.5", ID: modelGPT55ID, Tier: modelTierMax}, - {Name: "GPT-5.2", ID: "gpt-5.2"}, + {Name: "GPT-6.1 Sol", ID: "gpt-6.1-sol", Tier: modelTierHigh}, + {Name: "GPT-6 Astra", ID: "gpt-6-astra", Tier: modelTierMax}, + {Name: "GPT-6 Sol", ID: "gpt-6-sol"}, + {Name: "GPT-6 Luna", ID: "gpt-6-luna"}, + {Name: "GPT-5.6 Sol", ID: modelGPT56SolID}, + {Name: "GPT-6.1 Terra", ID: "gpt-6.1-terra", Tier: modelTierMid}, + {Name: "GPT-5.6 Terra", ID: modelGPT56TerraID}, + {Name: "GPT-5.6 Luna", ID: modelGPT56LunaID}, } } diff --git a/codex_test.go b/codex_test.go index b8e4fc6..2588a96 100644 --- a/codex_test.go +++ b/codex_test.go @@ -1,6 +1,7 @@ package harness import ( + "math" "slices" "strings" "testing" @@ -43,6 +44,24 @@ func TestCodexArgsAndStream(t *testing.T) { } } +func TestCodexDefaultModelResultCost(t *testing.T) { + t.Parallel() + + model := CodexHarness{}.DefaultModels()[0].ID + if model != "gpt-6.1-sol" { + t.Fatalf("default model = %q, want gpt-6.1-sol", model) + } + input := `{"type":"turn.completed","usage":{"input_tokens":100000,"cached_input_tokens":40000,"output_tokens":5000}}` + var result Event + CodexHarness{}.ParseStream(strings.NewReader(input), func(event Event) { + result = event + }) + want := (60000*2.00 + 40000*0.10 + 5000*10.00) / 1e6 + if got := CostFromUsage(model, result.Usage); math.Abs(got-want) > 1e-9 { + t.Errorf("CostFromUsage(%q, %+v) = %v, want %v", model, result.Usage, got, want) + } +} + func TestCodexArgsConfigOverrides(t *testing.T) { t.Parallel() diff --git a/copilot.go b/copilot.go index 7bafe49..2b191e1 100644 --- a/copilot.go +++ b/copilot.go @@ -572,8 +572,8 @@ func (CopilotHarness) DefaultModels() []ModelDefault { {Name: "Claude Sonnet 4.6", ID: "claude-sonnet-4.6", Tier: modelTierMid}, {Name: "Claude Opus 4.6", ID: "claude-opus-4.6", Tier: modelTierHigh}, {Name: "Claude Haiku 4.5", ID: "claude-haiku-4.5"}, - {Name: "GPT-5.6 Terra", ID: "gpt-5.6-terra"}, - {Name: "GPT-5.6 Luna", ID: "gpt-5.6-luna"}, + {Name: "GPT-5.6 Terra", ID: modelGPT56TerraID}, + {Name: "GPT-5.6 Luna", ID: modelGPT56LunaID}, {Name: "GPT-5.5", ID: modelGPT55ID}, {Name: "GPT-5.4", ID: modelGPT54ID}, {Name: "GPT-5.4 mini", ID: modelGPT54MiniID}, diff --git a/harness.go b/harness.go index 0ce361d..f5d4533 100644 --- a/harness.go +++ b/harness.go @@ -19,6 +19,8 @@ const ( modelGPT54ID = "gpt-5.4" modelGPT55ID = "gpt-5.5" modelGPT56SolID = "gpt-5.6-sol" + modelGPT56TerraID = "gpt-5.6-terra" + modelGPT56LunaID = "gpt-5.6-luna" modelDaybreakBlueID = "gpt-daybreak-blue-latest" modelTierMid = "mid" diff --git a/pricing.go b/pricing.go index 4f85621..7f24604 100644 --- a/pricing.go +++ b/pricing.go @@ -74,11 +74,21 @@ var modelPricing = map[string]modelPrice{ // OpenAI // Sol's promotional standard rates apply through 2026-11-30. // https://developers.openai.com/api/docs/pricing + "gpt-6.1-sol": modelPrice{In: 2.00, Out: 10.00, CachedIn: 0.10, CacheWrite: 2.50}. + over(openAILongPrompt, modelPrice{In: 4.00, Out: 15.00, CachedIn: 0.20, CacheWrite: 5.00}), + "gpt-6.1-terra": modelPrice{In: 1.00, Out: 5.00, CachedIn: 0.05, CacheWrite: 1.25}. + over(openAILongPrompt, modelPrice{In: 2.00, Out: 7.50, CachedIn: 0.10, CacheWrite: 2.50}), + "gpt-6-astra": modelPrice{In: 10.00, Out: 50.00, CachedIn: 1.00, CacheWrite: 12.50}. + over(openAILongPrompt, modelPrice{In: 20.00, Out: 75.00, CachedIn: 2.00, CacheWrite: 25.00}), + "gpt-6-sol": modelPrice{In: 2.00, Out: 10.00, CachedIn: 0.20, CacheWrite: 2.50}. + over(openAILongPrompt, modelPrice{In: 4.00, Out: 15.00, CachedIn: 0.40, CacheWrite: 5.00}), + "gpt-6-luna": modelPrice{In: 0.10, Out: 0.50, CachedIn: 0.01, CacheWrite: 0.125}. + over(openAILongPrompt, modelPrice{In: 0.20, Out: 0.75, CachedIn: 0.02, CacheWrite: 0.25}), modelGPT56SolID: modelPrice{In: 4.00, Out: 20.00, CachedIn: 0.40, CacheWrite: 5.00}. over(openAILongPrompt, modelPrice{In: 8.00, Out: 30.00, CachedIn: 0.80, CacheWrite: 10.00}), - "gpt-5.6-terra": modelPrice{In: 2.00, Out: 12.00, CachedIn: 0.20, CacheWrite: 2.50}. + modelGPT56TerraID: modelPrice{In: 2.00, Out: 12.00, CachedIn: 0.20, CacheWrite: 2.50}. over(openAILongPrompt, modelPrice{In: 4.00, Out: 18.00, CachedIn: 0.40, CacheWrite: 5.00}), - "gpt-5.6-luna": modelPrice{In: 0.20, Out: 1.20, CachedIn: 0.02, CacheWrite: 0.25}. + modelGPT56LunaID: modelPrice{In: 0.20, Out: 1.20, CachedIn: 0.02, CacheWrite: 0.25}. over(openAILongPrompt, modelPrice{In: 0.40, Out: 1.80, CachedIn: 0.04, CacheWrite: 0.50}), modelGPT55ID: modelPrice{In: 5.00, Out: 30.00, CachedIn: 0.50}. over(openAILongPrompt, modelPrice{In: 10.00, Out: 45.00, CachedIn: 1.00}), diff --git a/pricing_feed_test.go b/pricing_feed_test.go index bdc9524..b38f17a 100644 --- a/pricing_feed_test.go +++ b/pricing_feed_test.go @@ -288,7 +288,7 @@ func TestPricingDrift_reportsDifferences(t *testing.T) { delete(anthropic["claude-haiku-5-5"], "tiers") delete(anthropic, "claude-fable-5-2") anthropic["claude-opus-4-8"]["tiers"] = []map[string]any{fixtureTier(200_000, 10, 37.5, 1, 12.5)} - feed["openai"]["gpt-5.5"]["tiers"] = []map[string]any{fixtureTier(272_000, 10, 50, 1, 0)} + feed["openai"]["gpt-6.1-sol"]["tiers"] = []map[string]any{fixtureTier(272_000, 4, 20, 0.2, 5)} feed["github-copilot"]["gpt-5-mini"] = nil want := []string{ @@ -298,7 +298,7 @@ func TestPricingDrift_reportsDifferences(t *testing.T) { "anthropic/claude-opus-5-5 input: table 4, feed 3.5", "anthropic/claude-sonnet-5-5 cache_write: table 2.5, feed 9", "github-copilot/gpt-5-mini missing: feed has no price", - "openai/gpt-5.5 long_prompt: table over 272000 tokens in=10 out=45 cache_read=1 cache_write=0, feed over 272000 tokens in=10 out=50 cache_read=1 cache_write=0", + "openai/gpt-6.1-sol long_prompt: table over 272000 tokens in=4 out=15 cache_read=0.2 cache_write=5, feed over 272000 tokens in=4 out=20 cache_read=0.2 cache_write=5", } if got := pricingDrift(feed.decode(t), nil); !slices.Equal(got, want) { t.Errorf("pricingDrift() =\n%s\nwant\n%s", strings.Join(got, "\n"), strings.Join(want, "\n")) From 56e32e480c15fd390d124f2939eca57c093307b8 Mon Sep 17 00:00:00 2001 From: Andrew Nesbitt Date: Mon, 16 Nov 2026 12:37:36 +0000 Subject: [PATCH 2/2] Scope the Sol promo note to GPT-5.6 and drop the gpt-5.2 price Also note the Codex 0.153.0 floor for GPT-6 and read the test's rates from the table. --- codex.go | 2 +- codex_test.go | 3 ++- pricing.go | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/codex.go b/codex.go index 55bb153..418de15 100644 --- a/codex.go +++ b/codex.go @@ -288,7 +288,7 @@ func (CodexHarness) DefaultModels() []ModelDefault { // IDs mirror the listed models in Codex 0.169.0's bundled catalog, in its // priority order, except GPT-5.5, which Codex rejects for ChatGPT logins. // GPT-6.1 Sol comes first because that is the CLI's default when --model is - // absent. + // absent. The GPT-6 models require Codex 0.153.0 or later. return []ModelDefault{ {Name: "GPT-6.1 Sol", ID: "gpt-6.1-sol", Tier: modelTierHigh}, {Name: "GPT-6 Astra", ID: "gpt-6-astra", Tier: modelTierMax}, diff --git a/codex_test.go b/codex_test.go index 2588a96..94f17ae 100644 --- a/codex_test.go +++ b/codex_test.go @@ -56,7 +56,8 @@ func TestCodexDefaultModelResultCost(t *testing.T) { CodexHarness{}.ParseStream(strings.NewReader(input), func(event Event) { result = event }) - want := (60000*2.00 + 40000*0.10 + 5000*10.00) / 1e6 + price := modelPricing[model] + want := (60000*price.In + 40000*price.CachedIn + 5000*price.Out) / 1e6 if got := CostFromUsage(model, result.Usage); math.Abs(got-want) > 1e-9 { t.Errorf("CostFromUsage(%q, %+v) = %v, want %v", model, result.Usage, got, want) } diff --git a/pricing.go b/pricing.go index 7f24604..f05f277 100644 --- a/pricing.go +++ b/pricing.go @@ -72,7 +72,6 @@ var modelPricing = map[string]modelPrice{ "claude-fable-5.2": {In: 8.00, Out: 40.00, CachedIn: 0.20, CacheWrite: 10.00}, // OpenAI - // Sol's promotional standard rates apply through 2026-11-30. // https://developers.openai.com/api/docs/pricing "gpt-6.1-sol": modelPrice{In: 2.00, Out: 10.00, CachedIn: 0.10, CacheWrite: 2.50}. over(openAILongPrompt, modelPrice{In: 4.00, Out: 15.00, CachedIn: 0.20, CacheWrite: 5.00}), @@ -84,6 +83,7 @@ var modelPricing = map[string]modelPrice{ over(openAILongPrompt, modelPrice{In: 4.00, Out: 15.00, CachedIn: 0.40, CacheWrite: 5.00}), "gpt-6-luna": modelPrice{In: 0.10, Out: 0.50, CachedIn: 0.01, CacheWrite: 0.125}. over(openAILongPrompt, modelPrice{In: 0.20, Out: 0.75, CachedIn: 0.02, CacheWrite: 0.25}), + // GPT-5.6 Sol's promotional standard rates apply through 2026-11-30. modelGPT56SolID: modelPrice{In: 4.00, Out: 20.00, CachedIn: 0.40, CacheWrite: 5.00}. over(openAILongPrompt, modelPrice{In: 8.00, Out: 30.00, CachedIn: 0.80, CacheWrite: 10.00}), modelGPT56TerraID: modelPrice{In: 2.00, Out: 12.00, CachedIn: 0.20, CacheWrite: 2.50}. @@ -96,7 +96,6 @@ var modelPricing = map[string]modelPrice{ over(openAILongPrompt, modelPrice{In: 5.00, Out: 22.50, CachedIn: 0.50}), modelGPT54MiniID: {In: 0.75, Out: 4.50, CachedIn: 0.075}, modelGPT53CodexID: {In: 1.75, Out: 14.00, CachedIn: 0.175}, - "gpt-5.2": {In: 1.75, Out: 14.00, CachedIn: 0.175}, "gpt-5-mini": {In: 0.25, Out: 2.00, CachedIn: 0.025}, // Copilot-hosted Microsoft, Google, and xAI models.