Add GPT-5.6 Sol and Terra models
- commit
- c6b35a28041a74a264a2832202a0f181f36dd1f8
- author
- patriceckhart · · 2026-07-09 18:27 UTC
- parent
- 444dd12
- signature
- unsigned
- refs
- tag: v0.2.69
2 files · +51 -0
M packages/provider/models.go +24 -0
| @@ -316,6 +316,18 @@ var Catalog = []Model{ | |||
| 316 | 316 | PriceInput: 5, PriceOutput: 30, PriceCacheRead: 0.5, | |
| 317 | 317 | Speculative: true, | |
| 318 | 318 | }, | |
| 319 | + | { | |
| 320 | + | Provider: "openai", ID: "gpt-5.6-sol", DisplayName: "GPT-5.6 Sol", | |
| 321 | + | ContextWindow: 1050000, MaxOutput: 128000, Reasoning: true, | |
| 322 | + | PriceInput: 5, PriceOutput: 30, PriceCacheRead: 0.5, | |
| 323 | + | Speculative: true, | |
| 324 | + | }, | |
| 325 | + | { | |
| 326 | + | Provider: "openai", ID: "gpt-5.6-terra", DisplayName: "GPT-5.6 Terra", | |
| 327 | + | ContextWindow: 1050000, MaxOutput: 128000, Reasoning: true, | |
| 328 | + | PriceInput: 2.5, PriceOutput: 15, PriceCacheRead: 0.25, | |
| 329 | + | Speculative: true, | |
| 330 | + | }, | |
| 319 | 331 | ||
| 320 | 332 | // ---- OpenAI Codex / ChatGPT subscription backend ---- | |
| 321 | 333 | // Same model ids as the OpenAI family, but routed through the | |
| @@ -344,6 +356,18 @@ var Catalog = []Model{ | |||
| 344 | 356 | PriceInput: 5, PriceOutput: 30, PriceCacheRead: 0.5, | |
| 345 | 357 | Speculative: true, | |
| 346 | 358 | }, | |
| 359 | + | { | |
| 360 | + | Provider: "openai-codex", ID: "gpt-5.6-sol", DisplayName: "GPT-5.6 Sol", | |
| 361 | + | ContextWindow: 1050000, MaxOutput: 128000, Reasoning: true, | |
| 362 | + | PriceInput: 5, PriceOutput: 30, PriceCacheRead: 0.5, | |
| 363 | + | Speculative: true, | |
| 364 | + | }, | |
| 365 | + | { | |
| 366 | + | Provider: "openai-codex", ID: "gpt-5.6-terra", DisplayName: "GPT-5.6 Terra", | |
| 367 | + | ContextWindow: 1050000, MaxOutput: 128000, Reasoning: true, | |
| 368 | + | PriceInput: 2.5, PriceOutput: 15, PriceCacheRead: 0.25, | |
| 369 | + | Speculative: true, | |
| 370 | + | }, | |
| 347 | 371 | } | |
| 348 | 372 | ||
| 349 | 373 | // DefaultModel is used when the user does not specify one. | |
| @@ -316,6 +316,18 @@ var Catalog = []Model{ | |||||
| 316 | PriceInput: 5, PriceOutput: 30, PriceCacheRead: 0.5, | 316 | PriceInput: 5, PriceOutput: 30, PriceCacheRead: 0.5, | ||
| 317 | Speculative: true, | 317 | Speculative: true, | ||
| 318 | }, | 318 | }, | ||
| 319 | + | { | |||
| 320 | + | Provider: "openai", ID: "gpt-5.6-sol", DisplayName: "GPT-5.6 Sol", | |||
| 321 | + | ContextWindow: 1050000, MaxOutput: 128000, Reasoning: true, | |||
| 322 | + | PriceInput: 5, PriceOutput: 30, PriceCacheRead: 0.5, | |||
| 323 | + | Speculative: true, | |||
| 324 | + | }, | |||
| 325 | + | { | |||
| 326 | + | Provider: "openai", ID: "gpt-5.6-terra", DisplayName: "GPT-5.6 Terra", | |||
| 327 | + | ContextWindow: 1050000, MaxOutput: 128000, Reasoning: true, | |||
| 328 | + | PriceInput: 2.5, PriceOutput: 15, PriceCacheRead: 0.25, | |||
| 329 | + | Speculative: true, | |||
| 330 | + | }, | |||
| 319 | 331 | ||||
| 320 | // ---- OpenAI Codex / ChatGPT subscription backend ---- | 332 | // ---- OpenAI Codex / ChatGPT subscription backend ---- | ||
| 321 | // Same model ids as the OpenAI family, but routed through the | 333 | // Same model ids as the OpenAI family, but routed through the | ||
| @@ -344,6 +356,18 @@ var Catalog = []Model{ | |||||
| 344 | PriceInput: 5, PriceOutput: 30, PriceCacheRead: 0.5, | 356 | PriceInput: 5, PriceOutput: 30, PriceCacheRead: 0.5, | ||
| 345 | Speculative: true, | 357 | Speculative: true, | ||
| 346 | }, | 358 | }, | ||
| 359 | + | { | |||
| 360 | + | Provider: "openai-codex", ID: "gpt-5.6-sol", DisplayName: "GPT-5.6 Sol", | |||
| 361 | + | ContextWindow: 1050000, MaxOutput: 128000, Reasoning: true, | |||
| 362 | + | PriceInput: 5, PriceOutput: 30, PriceCacheRead: 0.5, | |||
| 363 | + | Speculative: true, | |||
| 364 | + | }, | |||
| 365 | + | { | |||
| 366 | + | Provider: "openai-codex", ID: "gpt-5.6-terra", DisplayName: "GPT-5.6 Terra", | |||
| 367 | + | ContextWindow: 1050000, MaxOutput: 128000, Reasoning: true, | |||
| 368 | + | PriceInput: 2.5, PriceOutput: 15, PriceCacheRead: 0.25, | |||
| 369 | + | Speculative: true, | |||
| 370 | + | }, | |||
| 347 | } | 371 | } | ||
| 348 | 372 | ||||
| 349 | // DefaultModel is used when the user does not specify one. | 373 | // DefaultModel is used when the user does not specify one. | ||
M packages/provider/provider_test.go +27 -0
| @@ -385,6 +385,33 @@ func TestDiscoverOpenRouter(t *testing.T) { | |||
| 385 | 385 | } | |
| 386 | 386 | } | |
| 387 | 387 | ||
| 388 | + | func TestGPT56CatalogEntries(t *testing.T) { | |
| 389 | + | cases := []struct { | |
| 390 | + | provider string | |
| 391 | + | id string | |
| 392 | + | priceInput float64 | |
| 393 | + | priceOut float64 | |
| 394 | + | cacheRead float64 | |
| 395 | + | }{ | |
| 396 | + | {"openai", "gpt-5.6-sol", 5, 30, 0.5}, | |
| 397 | + | {"openai", "gpt-5.6-terra", 2.5, 15, 0.25}, | |
| 398 | + | {"openai-codex", "gpt-5.6-sol", 5, 30, 0.5}, | |
| 399 | + | {"openai-codex", "gpt-5.6-terra", 2.5, 15, 0.25}, | |
| 400 | + | } | |
| 401 | + | for _, tc := range cases { | |
| 402 | + | m, err := FindModel(tc.provider, tc.id) | |
| 403 | + | if err != nil { | |
| 404 | + | t.Fatal(err) | |
| 405 | + | } | |
| 406 | + | if m.ContextWindow != 1050000 || m.MaxOutput != 128000 || !m.Reasoning { | |
| 407 | + | t.Fatalf("%s/%s limits: %+v", tc.provider, tc.id, m) | |
| 408 | + | } | |
| 409 | + | if m.PriceInput != tc.priceInput || m.PriceOutput != tc.priceOut || m.PriceCacheRead != tc.cacheRead { | |
| 410 | + | t.Fatalf("%s/%s prices: %+v", tc.provider, tc.id, m) | |
| 411 | + | } | |
| 412 | + | } | |
| 413 | + | } | |
| 414 | + | ||
| 388 | 415 | // TestOpenAIOmitsZeroMaxTokens guards against sending max_tokens: 0 for | |
| 389 | 416 | // discovered models that don't advertise an output cap (MaxOutput == 0). | |
| 390 | 417 | func TestOpenAIOmitsZeroMaxTokens(t *testing.T) { | |
| @@ -385,6 +385,33 @@ func TestDiscoverOpenRouter(t *testing.T) { | |||||
| 385 | } | 385 | } | ||
| 386 | } | 386 | } | ||
| 387 | 387 | ||||
| 388 | + | func TestGPT56CatalogEntries(t *testing.T) { | |||
| 389 | + | cases := []struct { | |||
| 390 | + | provider string | |||
| 391 | + | id string | |||
| 392 | + | priceInput float64 | |||
| 393 | + | priceOut float64 | |||
| 394 | + | cacheRead float64 | |||
| 395 | + | }{ | |||
| 396 | + | {"openai", "gpt-5.6-sol", 5, 30, 0.5}, | |||
| 397 | + | {"openai", "gpt-5.6-terra", 2.5, 15, 0.25}, | |||
| 398 | + | {"openai-codex", "gpt-5.6-sol", 5, 30, 0.5}, | |||
| 399 | + | {"openai-codex", "gpt-5.6-terra", 2.5, 15, 0.25}, | |||
| 400 | + | } | |||
| 401 | + | for _, tc := range cases { | |||
| 402 | + | m, err := FindModel(tc.provider, tc.id) | |||
| 403 | + | if err != nil { | |||
| 404 | + | t.Fatal(err) | |||
| 405 | + | } | |||
| 406 | + | if m.ContextWindow != 1050000 || m.MaxOutput != 128000 || !m.Reasoning { | |||
| 407 | + | t.Fatalf("%s/%s limits: %+v", tc.provider, tc.id, m) | |||
| 408 | + | } | |||
| 409 | + | if m.PriceInput != tc.priceInput || m.PriceOutput != tc.priceOut || m.PriceCacheRead != tc.cacheRead { | |||
| 410 | + | t.Fatalf("%s/%s prices: %+v", tc.provider, tc.id, m) | |||
| 411 | + | } | |||
| 412 | + | } | |||
| 413 | + | } | |||
| 414 | + | ||||
| 388 | // TestOpenAIOmitsZeroMaxTokens guards against sending max_tokens: 0 for | 415 | // TestOpenAIOmitsZeroMaxTokens guards against sending max_tokens: 0 for | ||
| 389 | // discovered models that don't advertise an output cap (MaxOutput == 0). | 416 | // discovered models that don't advertise an output cap (MaxOutput == 0). | ||
| 390 | func TestOpenAIOmitsZeroMaxTokens(t *testing.T) { | 417 | func TestOpenAIOmitsZeroMaxTokens(t *testing.T) { | ||