feat(provider): add GPT-6 Sol and Luna to Codex catalog (#219)
- commit
- d12400c14cd16064e0e6e4714625dda85fcb005a
- author
- bnema · · 2026-09-22 18:30 UTC
- committer
- GitHub · · 2026-09-22 18:30 UTC
- parent
- 6084eb1
- signature
- GPG Unverified
B5690EEEBB952194The key is unknown
4 files · +20 -4
M packages/provider/models.go +14 -0
| @@ -432,6 +432,20 @@ var Catalog = []Model{ | |||
| 432 | 432 | PriceTierInputTokens: 272000, | |
| 433 | 433 | PriceInputAbove: 20, PriceOutputAbove: 75, PriceCacheReadAbove: 2, PriceCacheWriteAbove: 25, | |
| 434 | 434 | }, | |
| 435 | + | { | |
| 436 | + | Provider: "openai-codex", ID: "gpt-6-sol", DisplayName: "GPT-6 Sol", | |
| 437 | + | ContextWindow: openAIContextWindowTarget, MaxOutput: 128000, Reasoning: true, | |
| 438 | + | PriceInput: 2, PriceOutput: 10, PriceCacheRead: 0.2, PriceCacheWrite: 2.5, | |
| 439 | + | PriceTierInputTokens: 272000, | |
| 440 | + | PriceInputAbove: 4, PriceOutputAbove: 15, PriceCacheReadAbove: 0.4, PriceCacheWriteAbove: 5, | |
| 441 | + | }, | |
| 442 | + | { | |
| 443 | + | Provider: "openai-codex", ID: "gpt-6-luna", DisplayName: "GPT-6 Luna", | |
| 444 | + | ContextWindow: openAIContextWindowTarget, MaxOutput: 128000, Reasoning: true, | |
| 445 | + | PriceInput: 0.1, PriceOutput: 0.5, PriceCacheRead: 0.01, PriceCacheWrite: 0.125, | |
| 446 | + | PriceTierInputTokens: 272000, | |
| 447 | + | PriceInputAbove: 0.2, PriceOutputAbove: 0.75, PriceCacheReadAbove: 0.02, PriceCacheWriteAbove: 0.25, | |
| 448 | + | }, | |
| 435 | 449 | } | |
| 436 | 450 | ||
| 437 | 451 | // DefaultModel is used when the user does not specify one. | |
| @@ -432,6 +432,20 @@ var Catalog = []Model{ | |||||
| 432 | PriceTierInputTokens: 272000, | 432 | PriceTierInputTokens: 272000, | ||
| 433 | PriceInputAbove: 20, PriceOutputAbove: 75, PriceCacheReadAbove: 2, PriceCacheWriteAbove: 25, | 433 | PriceInputAbove: 20, PriceOutputAbove: 75, PriceCacheReadAbove: 2, PriceCacheWriteAbove: 25, | ||
| 434 | }, | 434 | }, | ||
| 435 | + | { | |||
| 436 | + | Provider: "openai-codex", ID: "gpt-6-sol", DisplayName: "GPT-6 Sol", | |||
| 437 | + | ContextWindow: openAIContextWindowTarget, MaxOutput: 128000, Reasoning: true, | |||
| 438 | + | PriceInput: 2, PriceOutput: 10, PriceCacheRead: 0.2, PriceCacheWrite: 2.5, | |||
| 439 | + | PriceTierInputTokens: 272000, | |||
| 440 | + | PriceInputAbove: 4, PriceOutputAbove: 15, PriceCacheReadAbove: 0.4, PriceCacheWriteAbove: 5, | |||
| 441 | + | }, | |||
| 442 | + | { | |||
| 443 | + | Provider: "openai-codex", ID: "gpt-6-luna", DisplayName: "GPT-6 Luna", | |||
| 444 | + | ContextWindow: openAIContextWindowTarget, MaxOutput: 128000, Reasoning: true, | |||
| 445 | + | PriceInput: 0.1, PriceOutput: 0.5, PriceCacheRead: 0.01, PriceCacheWrite: 0.125, | |||
| 446 | + | PriceTierInputTokens: 272000, | |||
| 447 | + | PriceInputAbove: 0.2, PriceOutputAbove: 0.75, PriceCacheReadAbove: 0.02, PriceCacheWriteAbove: 0.25, | |||
| 448 | + | }, | |||
| 435 | } | 449 | } | ||
| 436 | 450 | ||||
| 437 | // DefaultModel is used when the user does not specify one. | 451 | // DefaultModel is used when the user does not specify one. | ||
M packages/provider/openai_codex.go +1 -1
| @@ -296,7 +296,7 @@ func (c *codexClient) findModel(id string) (Model, error) { | |||
| 296 | 296 | ||
| 297 | 297 | func supportsOpenAIExplicitPromptCache(model string) bool { | |
| 298 | 298 | id := strings.ToLower(strings.TrimSpace(model)) | |
| 299 | - | return strings.HasPrefix(id, "gpt-5.6-") || id == "gpt-6-astra" | |
| 299 | + | return strings.HasPrefix(id, "gpt-5.6-") || strings.HasPrefix(id, "gpt-6-") | |
| 300 | 300 | } | |
| 301 | 301 | ||
| 302 | 302 | func (c *codexClient) buildRequest(req Request) (*codexRequest, error) { | |
| @@ -296,7 +296,7 @@ func (c *codexClient) findModel(id string) (Model, error) { | |||||
| 296 | 296 | ||||
| 297 | func supportsOpenAIExplicitPromptCache(model string) bool { | 297 | func supportsOpenAIExplicitPromptCache(model string) bool { | ||
| 298 | id := strings.ToLower(strings.TrimSpace(model)) | 298 | id := strings.ToLower(strings.TrimSpace(model)) | ||
| 299 | - | return strings.HasPrefix(id, "gpt-5.6-") || id == "gpt-6-astra" | 299 | + | return strings.HasPrefix(id, "gpt-5.6-") || strings.HasPrefix(id, "gpt-6-") |
| 300 | } | 300 | } | ||
| 301 | 301 | ||||
| 302 | func (c *codexClient) buildRequest(req Request) (*codexRequest, error) { | 302 | func (c *codexClient) buildRequest(req Request) (*codexRequest, error) { | ||
M packages/provider/provider_test.go +2 -0
| @@ -731,6 +731,8 @@ func TestGPT56AndGPT6CatalogEntries(t *testing.T) { | |||
| 731 | 731 | {"openai-codex", "gpt-5.6-sol", 500000, 5, 30, 0.5, 6.25}, | |
| 732 | 732 | {"openai-codex", "gpt-5.6-terra", 500000, 2.5, 15, 0.25, 3.125}, | |
| 733 | 733 | {"openai-codex", "gpt-6-astra", 500000, 10, 50, 1, 12.5}, | |
| 734 | + | {"openai-codex", "gpt-6-sol", 500000, 2, 10, 0.2, 2.5}, | |
| 735 | + | {"openai-codex", "gpt-6-luna", 500000, 0.1, 0.5, 0.01, 0.125}, | |
| 734 | 736 | {"azure-openai-responses", "gpt-5.6-luna", 1050000, 1, 6, 0.1, 1.25}, | |
| 735 | 737 | {"azure-openai-responses", "gpt-5.6-sol", 1050000, 5, 30, 0.5, 6.25}, | |
| 736 | 738 | {"azure-openai-responses", "gpt-5.6-terra", 1050000, 2.5, 15, 0.25, 3.125}, | |
| @@ -731,6 +731,8 @@ func TestGPT56AndGPT6CatalogEntries(t *testing.T) { | |||||
| 731 | {"openai-codex", "gpt-5.6-sol", 500000, 5, 30, 0.5, 6.25}, | 731 | {"openai-codex", "gpt-5.6-sol", 500000, 5, 30, 0.5, 6.25}, | ||
| 732 | {"openai-codex", "gpt-5.6-terra", 500000, 2.5, 15, 0.25, 3.125}, | 732 | {"openai-codex", "gpt-5.6-terra", 500000, 2.5, 15, 0.25, 3.125}, | ||
| 733 | {"openai-codex", "gpt-6-astra", 500000, 10, 50, 1, 12.5}, | 733 | {"openai-codex", "gpt-6-astra", 500000, 10, 50, 1, 12.5}, | ||
| 734 | + | {"openai-codex", "gpt-6-sol", 500000, 2, 10, 0.2, 2.5}, | |||
| 735 | + | {"openai-codex", "gpt-6-luna", 500000, 0.1, 0.5, 0.01, 0.125}, | |||
| 734 | {"azure-openai-responses", "gpt-5.6-luna", 1050000, 1, 6, 0.1, 1.25}, | 736 | {"azure-openai-responses", "gpt-5.6-luna", 1050000, 1, 6, 0.1, 1.25}, | ||
| 735 | {"azure-openai-responses", "gpt-5.6-sol", 1050000, 5, 30, 0.5, 6.25}, | 737 | {"azure-openai-responses", "gpt-5.6-sol", 1050000, 5, 30, 0.5, 6.25}, | ||
| 736 | {"azure-openai-responses", "gpt-5.6-terra", 1050000, 2.5, 15, 0.25, 3.125}, | 738 | {"azure-openai-responses", "gpt-5.6-terra", 1050000, 2.5, 15, 0.25, 3.125}, | ||
M packages/provider/reasoning.go +3 -3
| @@ -58,7 +58,7 @@ func defaultReasoningLevels(model Model) []string { | |||
| 58 | 58 | } | |
| 59 | 59 | if model.API == APIResponses || model.Provider == "openai-codex" || model.Provider == "openai-responses" || model.Provider == "azure-openai-responses" { | |
| 60 | 60 | levels := []string{"", "low", "medium", "high", "xhigh"} | |
| 61 | - | if strings.HasPrefix(id, "gpt-5.6-") || id == "gpt-6-astra" { | |
| 61 | + | if strings.HasPrefix(id, "gpt-5.6-") || strings.HasPrefix(id, "gpt-6-") { | |
| 62 | 62 | levels = append(levels, "max") | |
| 63 | 63 | } | |
| 64 | 64 | return levels | |
| @@ -262,7 +262,7 @@ func OpenAICompatAnthropicEffort(level string) string { | |||
| 262 | 262 | } | |
| 263 | 263 | ||
| 264 | 264 | // OpenAICodexReasoningEffort maps zut levels onto the Responses API effort | |
| 265 | - | // enum. GPT-5.6 and GPT-6 Astra support native max; other models clamp to xhigh. | |
| 265 | + | // enum. GPT-5.6 and GPT-6 support native max; other models clamp to xhigh. | |
| 266 | 266 | func OpenAICodexReasoningEffort(level, model string) string { | |
| 267 | 267 | switch NormalizeReasoning(level) { | |
| 268 | 268 | case "minimum", "low": | |
| @@ -274,7 +274,7 @@ func OpenAICodexReasoningEffort(level, model string) string { | |||
| 274 | 274 | case "xhigh": | |
| 275 | 275 | return "xhigh" | |
| 276 | 276 | case "max": | |
| 277 | - | if strings.HasPrefix(strings.ToLower(model), "gpt-5.6-") || strings.EqualFold(model, "gpt-6-astra") { | |
| 277 | + | if strings.HasPrefix(strings.ToLower(model), "gpt-5.6-") || strings.HasPrefix(strings.ToLower(model), "gpt-6-") { | |
| 278 | 278 | return "max" | |
| 279 | 279 | } | |
| 280 | 280 | return "xhigh" | |
| @@ -58,7 +58,7 @@ func defaultReasoningLevels(model Model) []string { | |||||
| 58 | } | 58 | } | ||
| 59 | if model.API == APIResponses || model.Provider == "openai-codex" || model.Provider == "openai-responses" || model.Provider == "azure-openai-responses" { | 59 | if model.API == APIResponses || model.Provider == "openai-codex" || model.Provider == "openai-responses" || model.Provider == "azure-openai-responses" { | ||
| 60 | levels := []string{"", "low", "medium", "high", "xhigh"} | 60 | levels := []string{"", "low", "medium", "high", "xhigh"} | ||
| 61 | - | if strings.HasPrefix(id, "gpt-5.6-") || id == "gpt-6-astra" { | 61 | + | if strings.HasPrefix(id, "gpt-5.6-") || strings.HasPrefix(id, "gpt-6-") { |
| 62 | levels = append(levels, "max") | 62 | levels = append(levels, "max") | ||
| 63 | } | 63 | } | ||
| 64 | return levels | 64 | return levels | ||
| @@ -262,7 +262,7 @@ func OpenAICompatAnthropicEffort(level string) string { | |||||
| 262 | } | 262 | } | ||
| 263 | 263 | ||||
| 264 | // OpenAICodexReasoningEffort maps zut levels onto the Responses API effort | 264 | // OpenAICodexReasoningEffort maps zut levels onto the Responses API effort | ||
| 265 | - | // enum. GPT-5.6 and GPT-6 Astra support native max; other models clamp to xhigh. | 265 | + | // enum. GPT-5.6 and GPT-6 support native max; other models clamp to xhigh. |
| 266 | func OpenAICodexReasoningEffort(level, model string) string { | 266 | func OpenAICodexReasoningEffort(level, model string) string { | ||
| 267 | switch NormalizeReasoning(level) { | 267 | switch NormalizeReasoning(level) { | ||
| 268 | case "minimum", "low": | 268 | case "minimum", "low": | ||
| @@ -274,7 +274,7 @@ func OpenAICodexReasoningEffort(level, model string) string { | |||||
| 274 | case "xhigh": | 274 | case "xhigh": | ||
| 275 | return "xhigh" | 275 | return "xhigh" | ||
| 276 | case "max": | 276 | case "max": | ||
| 277 | - | if strings.HasPrefix(strings.ToLower(model), "gpt-5.6-") || strings.EqualFold(model, "gpt-6-astra") { | 277 | + | if strings.HasPrefix(strings.ToLower(model), "gpt-5.6-") || strings.HasPrefix(strings.ToLower(model), "gpt-6-") { |
| 278 | return "max" | 278 | return "max" | ||
| 279 | } | 279 | } | ||
| 280 | return "xhigh" | 280 | return "xhigh" | ||