From feea5ab959f59cd2135443ed2a0c19bf7643db8f Mon Sep 17 00:00:00 2001 From: Ethan <39577870+ethanndickson@users.noreply.github.com> Date: Thu, 19 Nov 2026 00:33:46 +1100 Subject: [PATCH] feat: add GPT-6.2 Astra and GPT-6.2 Sol to Agents and AI Gateway (#32370) Closes CODAGT-1608 This adds `gpt-6.2-astra` and `gpt-6.2-sol` to the Agents known models catalog, so they're suggested when an admin adds a chat model, and regenerates the AI Gateway price book from models.dev so the gateway can price them. | Model | Input | Output | Cache read | Cache write | |---|---|---|---|---| | GPT-6.2 Astra | $8 | $40 | $0.40 | $10 | | GPT-6.2 Sol | $2 | $10 | $0.10 | $2.50 | Prices are per 1M tokens, and both models have a 1,050,000 token context window and 128,000 max output tokens. They're in the catalog for OpenAI (with a suggested effort of `medium`, same as `gpt-6-astra` and `gpt-6.1-sol`), OpenRouter and Vercel. models.dev doesn't list them on Azure or Bedrock yet, so I've left those out for now. Both models also reject the `none` and `minimal` reasoning efforts. A model config only sets a default and a maximum effort, so the picker always offers both, and picking either one fails the turn: ``` Unsupported value: 'none' is not supported with the 'gpt-6.2-astra' model. Supported values are: 'low', 'medium', 'high', 'xhigh', and 'max'. ``` We already send `low` instead for `gpt-6-astra` and `gpt-6.1-sol`, so to fix, we'll just do the same for the two new models. All four now live in one list of model ID prefixes, rather than a helper each. I checked this against the real models: all four return a 400 like the one above for `none` and `minimal`, and accept `low`. `gpt-6-sol` and `gpt-6.1-terra` still accept `none`, so they're left alone. Regenerating the price book also brings in everything else models.dev changed since the last weekly refresh, mostly on OpenRouter and Vercel: 22 other new entries (4 of them `-pro` and `-fast` variants of these two), 29 it dropped and 51 price changes. 6 existing catalog entries get new prices or limits the same way. --- coderd/aibridge/prices/data/prices.json | 672 +++++++++--------- coderd/x/chatd/ARCHITECTURE.md | 2 - coderd/x/chatd/chatopenai/transport.go | 11 - coderd/x/chatd/chatopenai/transport_test.go | 18 - .../x/chatd/chatprovider/reasoningeffort.go | 20 +- .../reasoningeffort_internal_test.go | 5 +- scripts/aibridgepricesgen/curation.json | 20 + .../knownModels/knownModelsGenerated.json | 106 ++- 8 files changed, 462 insertions(+), 392 deletions(-) diff --git a/coderd/aibridge/prices/data/prices.json b/coderd/aibridge/prices/data/prices.json index 696a8082e43..13cb6c4174f 100644 --- a/coderd/aibridge/prices/data/prices.json +++ b/coderd/aibridge/prices/data/prices.json @@ -663,43 +663,11 @@ "cache_read_price": 500000, "cache_write_price": null }, - { - "provider": "azure", - "model": "gpt-image-1", - "input_price": 5000000, - "output_price": 40000000, - "cache_read_price": 1250000, - "cache_write_price": null - }, { "provider": "azure", "model": "gpt-image-1.5", "input_price": 5000000, - "output_price": 32000000, - "cache_read_price": 1250000, - "cache_write_price": null - }, - { - "provider": "azure", - "model": "gpt-image-2", - "input_price": 5000000, - "output_price": 30000000, - "cache_read_price": 1250000, - "cache_write_price": null - }, - { - "provider": "azure", - "model": "gpt-image-2.5-flare", - "input_price": 5000000, - "output_price": 30000000, - "cache_read_price": 1250000, - "cache_write_price": null - }, - { - "provider": "azure", - "model": "gpt-image-2.5-sunburst", - "input_price": 5000000, - "output_price": 30000000, + "output_price": 10000000, "cache_read_price": 1250000, "cache_write_price": null }, @@ -2735,6 +2703,14 @@ "cache_read_price": 100000, "cache_write_price": null }, + { + "provider": "copilot", + "model": "gemini-4-hydrogen", + "input_price": 1500000, + "output_price": 7500000, + "cache_read_price": 75000, + "cache_write_price": null + }, { "provider": "copilot", "model": "gpt-4.1", @@ -2955,7 +2931,7 @@ "provider": "google", "model": "gemini-2.5-flash-image", "input_price": 300000, - "output_price": 30000000, + "output_price": 2500000, "cache_read_price": 75000, "cache_write_price": null }, @@ -3003,7 +2979,7 @@ "provider": "google", "model": "gemini-3-pro-image", "input_price": 2000000, - "output_price": 120000000, + "output_price": 12000000, "cache_read_price": null, "cache_write_price": null }, @@ -3011,7 +2987,7 @@ "provider": "google", "model": "gemini-3.1-flash-image", "input_price": 500000, - "output_price": 60000000, + "output_price": 3000000, "cache_read_price": null, "cache_write_price": null }, @@ -3027,7 +3003,7 @@ "provider": "google", "model": "gemini-3.1-flash-lite-image", "input_price": 250000, - "output_price": 30000000, + "output_price": 1500000, "cache_read_price": null, "cache_write_price": null }, @@ -3135,6 +3111,14 @@ "cache_read_price": 100000, "cache_write_price": null }, + { + "provider": "google", + "model": "gemini-4-hydrogen", + "input_price": 1500000, + "output_price": 7500000, + "cache_read_price": 75000, + "cache_write_price": null + }, { "provider": "google", "model": "gemini-embedding-001", @@ -3183,6 +3167,22 @@ "cache_read_price": 200000, "cache_write_price": null }, + { + "provider": "google", + "model": "gemma-4-26b-a4b-it", + "input_price": 0, + "output_price": 0, + "cache_read_price": null, + "cache_write_price": null + }, + { + "provider": "google", + "model": "gemma-4-31b-it", + "input_price": 0, + "output_price": 0, + "cache_read_price": null, + "cache_write_price": null + }, { "provider": "google", "model": "lyria-3-clip-preview", @@ -3199,6 +3199,14 @@ "cache_read_price": null, "cache_write_price": null }, + { + "provider": "openai", + "model": "chatgpt-image-latest", + "input_price": 5000000, + "output_price": 10000000, + "cache_read_price": 1250000, + "cache_write_price": null + }, { "provider": "openai", "model": "gpt-3.5-turbo", @@ -3479,6 +3487,22 @@ "cache_read_price": 50000, "cache_write_price": 1250000 }, + { + "provider": "openai", + "model": "gpt-6.2-astra", + "input_price": 8000000, + "output_price": 40000000, + "cache_read_price": 400000, + "cache_write_price": 10000000 + }, + { + "provider": "openai", + "model": "gpt-6.2-sol", + "input_price": 2000000, + "output_price": 10000000, + "cache_read_price": 100000, + "cache_write_price": 2500000 + }, { "provider": "openai", "model": "gpt-daybreak-blue-latest", @@ -3497,9 +3521,9 @@ }, { "provider": "openai", - "model": "gpt-image-2", + "model": "gpt-image-1.5", "input_price": 5000000, - "output_price": 30000000, + "output_price": 10000000, "cache_read_price": 1250000, "cache_write_price": null }, @@ -3914,8 +3938,8 @@ { "provider": "openrouter", "model": "deepseek/deepseek-chat", - "input_price": 320000, - "output_price": 890000, + "input_price": 257400, + "output_price": 1028700, "cache_read_price": null, "cache_write_price": null }, @@ -3978,9 +4002,9 @@ { "provider": "openrouter", "model": "deepseek/deepseek-v4-flash-0731", - "input_price": 43400, - "output_price": 300000, - "cache_read_price": 35000, + "input_price": 60000, + "output_price": 180000, + "cache_read_price": 15000, "cache_write_price": null }, { @@ -3994,9 +4018,9 @@ { "provider": "openrouter", "model": "deepseek/deepseek-v4-pro", - "input_price": 955260, - "output_price": 1910520, - "cache_read_price": 79605, + "input_price": 900000, + "output_price": 1500000, + "cache_read_price": 250000, "cache_write_price": null }, { @@ -4010,17 +4034,17 @@ { "provider": "openrouter", "model": "deepseek/deepseek-v4.1-flash", - "input_price": 22000, - "output_price": 400000, - "cache_read_price": 4000, + "input_price": 51000, + "output_price": 567000, + "cache_read_price": 18000, "cache_write_price": null }, { "provider": "openrouter", "model": "deepseek/deepseek-v4.1-flash-1017", - "input_price": 300000, - "output_price": 1200000, - "cache_read_price": 6000, + "input_price": 36000, + "output_price": 500000, + "cache_read_price": 10000, "cache_write_price": null }, { @@ -4223,6 +4247,14 @@ "cache_read_price": 100000, "cache_write_price": 187500 }, + { + "provider": "openrouter", + "model": "google/gemini-4-hydrogen", + "input_price": 1500000, + "output_price": 7500000, + "cache_read_price": 75000, + "cache_write_price": 83333 + }, { "provider": "openrouter", "model": "google/gemini-nano-banana-2.1", @@ -4267,7 +4299,7 @@ "provider": "openrouter", "model": "google/gemma-3-27b-it", "input_price": 80000, - "output_price": 350000, + "output_price": 450000, "cache_read_price": 40000, "cache_write_price": null }, @@ -4282,9 +4314,9 @@ { "provider": "openrouter", "model": "google/gemma-4-26b-a4b-it", - "input_price": 80000, - "output_price": 100000, - "cache_read_price": 46000, + "input_price": 76500, + "output_price": 255000, + "cache_read_price": 42500, "cache_write_price": null }, { @@ -4375,6 +4407,14 @@ "cache_read_price": 9000, "cache_write_price": null }, + { + "provider": "openrouter", + "model": "inclusionai/ling-3.2-flash:free", + "input_price": 0, + "output_price": 0, + "cache_read_price": null, + "cache_write_price": null + }, { "provider": "openrouter", "model": "inference-net/schematron-v2-small", @@ -4399,22 +4439,6 @@ "cache_read_price": 40000, "cache_write_price": null }, - { - "provider": "openrouter", - "model": "liquid/lfm-2.5-2.6b", - "input_price": 350000, - "output_price": 500000, - "cache_read_price": 40000, - "cache_write_price": null - }, - { - "provider": "openrouter", - "model": "liquid/lfm-2.5-2.6b:free", - "input_price": 0, - "output_price": 0, - "cache_read_price": null, - "cache_write_price": null - }, { "provider": "openrouter", "model": "liquid/lfm-2.5-24b-a2b", @@ -4482,8 +4506,8 @@ { "provider": "openrouter", "model": "meta-llama/llama-3.2-3b-instruct", - "input_price": 50000, - "output_price": 330000, + "input_price": 50900, + "output_price": 335000, "cache_read_price": null, "cache_write_price": null }, @@ -4530,8 +4554,8 @@ { "provider": "openrouter", "model": "meta/muse-glimmer-30b", - "input_price": 300000, - "output_price": 1200000, + "input_price": 350000, + "output_price": 1500000, "cache_read_price": 40000, "cache_write_price": null }, @@ -4602,9 +4626,9 @@ { "provider": "openrouter", "model": "minimax/minimax-m2.5", - "input_price": 270000, - "output_price": 1080000, - "cache_read_price": 27000, + "input_price": 295000, + "output_price": 1200000, + "cache_read_price": 60000, "cache_write_price": null }, { @@ -4626,9 +4650,9 @@ { "provider": "openrouter", "model": "minimax/minimax-m3.1-flash", - "input_price": 150000, - "output_price": 600000, - "cache_read_price": 15000, + "input_price": 75000, + "output_price": 300000, + "cache_read_price": 7500, "cache_write_price": null }, { @@ -4706,9 +4730,9 @@ { "provider": "openrouter", "model": "mistralai/mistral-medium-3", - "input_price": 400000, - "output_price": 2000000, - "cache_read_price": 40000, + "input_price": 440000, + "output_price": 2200000, + "cache_read_price": 44000, "cache_write_price": null }, { @@ -4722,9 +4746,9 @@ { "provider": "openrouter", "model": "mistralai/mistral-medium-3.1", - "input_price": 400000, - "output_price": 2000000, - "cache_read_price": 40000, + "input_price": 440000, + "output_price": 2200000, + "cache_read_price": 44000, "cache_write_price": null }, { @@ -4770,9 +4794,9 @@ { "provider": "openrouter", "model": "mistralai/mistral-small-3.2-24b-instruct", - "input_price": 100000, - "output_price": 300000, - "cache_read_price": 10000, + "input_price": 75000, + "output_price": 200000, + "cache_read_price": null, "cache_write_price": null }, { @@ -4834,9 +4858,9 @@ { "provider": "openrouter", "model": "moonshotai/kimi-k2.5", - "input_price": 532000, - "output_price": 3325000, - "cache_read_price": 209000, + "input_price": 500000, + "output_price": 2500000, + "cache_read_price": 150000, "cache_write_price": null }, { @@ -4850,24 +4874,24 @@ { "provider": "openrouter", "model": "moonshotai/kimi-k2.7-code", - "input_price": 600000, - "output_price": 3500000, - "cache_read_price": 160000, + "input_price": 700000, + "output_price": 3750000, + "cache_read_price": 170000, "cache_write_price": null }, { "provider": "openrouter", "model": "moonshotai/kimi-k3", - "input_price": 192000, + "input_price": 200000, "output_price": 16000000, - "cache_read_price": 182000, + "cache_read_price": 190000, "cache_write_price": null }, { "provider": "openrouter", "model": "moonshotai/kimi-k3.1-pro", - "input_price": 237500, - "output_price": 8408500, + "input_price": 240300, + "output_price": 8402300, "cache_read_price": 200000, "cache_write_price": null }, @@ -4954,9 +4978,9 @@ { "provider": "openrouter", "model": "nvidia/nemotron-3-ultra-550b-a55b", - "input_price": 600000, - "output_price": 2400000, - "cache_read_price": 120000, + "input_price": 500000, + "output_price": 2200000, + "cache_read_price": 100000, "cache_write_price": null }, { @@ -4995,7 +5019,7 @@ "provider": "openrouter", "model": "nvidia/nemotron-3.5-super-vl", "input_price": 150000, - "output_price": 470000, + "output_price": 500000, "cache_read_price": 20000, "cache_write_price": null }, @@ -5399,6 +5423,38 @@ "cache_read_price": 50000, "cache_write_price": 1250000 }, + { + "provider": "openrouter", + "model": "openai/gpt-6.2-astra", + "input_price": 8000000, + "output_price": 40000000, + "cache_read_price": 400000, + "cache_write_price": 10000000 + }, + { + "provider": "openrouter", + "model": "openai/gpt-6.2-astra-pro", + "input_price": 8000000, + "output_price": 40000000, + "cache_read_price": 400000, + "cache_write_price": 10000000 + }, + { + "provider": "openrouter", + "model": "openai/gpt-6.2-sol", + "input_price": 2000000, + "output_price": 10000000, + "cache_read_price": 100000, + "cache_write_price": 2500000 + }, + { + "provider": "openrouter", + "model": "openai/gpt-6.2-sol-pro", + "input_price": 2000000, + "output_price": 10000000, + "cache_read_price": 100000, + "cache_write_price": 2500000 + }, { "provider": "openrouter", "model": "openai/gpt-audio", @@ -5434,9 +5490,9 @@ { "provider": "openrouter", "model": "openai/gpt-oss-20b", - "input_price": 30000, - "output_price": 130000, - "cache_read_price": 30000, + "input_price": 18000, + "output_price": 90000, + "cache_read_price": 9000, "cache_write_price": null }, { @@ -5474,11 +5530,19 @@ { "provider": "openrouter", "model": "particle-ai/particle-1", - "input_price": 50000, + "input_price": 60000, "output_price": 500000, "cache_read_price": 3000, "cache_write_price": null }, + { + "provider": "openrouter", + "model": "particle-ai/particle-1:free", + "input_price": 0, + "output_price": 0, + "cache_read_price": null, + "cache_write_price": null + }, { "provider": "openrouter", "model": "perceptron/perceptron-mk1", @@ -5586,8 +5650,8 @@ { "provider": "openrouter", "model": "qwen/qwen3-14b", - "input_price": 100000, - "output_price": 220000, + "input_price": 120000, + "output_price": 240000, "cache_read_price": null, "cache_write_price": null }, @@ -5666,9 +5730,9 @@ { "provider": "openrouter", "model": "qwen/qwen3-next-80b-a3b-instruct", - "input_price": 90000, + "input_price": 100000, "output_price": 1100000, - "cache_read_price": null, + "cache_read_price": 70000, "cache_write_price": null }, { @@ -5687,14 +5751,6 @@ "cache_read_price": null, "cache_write_price": null }, - { - "provider": "openrouter", - "model": "qwen/qwen3-vl-30b-a3b-thinking", - "input_price": 290000, - "output_price": 1000000, - "cache_read_price": null, - "cache_write_price": null - }, { "provider": "openrouter", "model": "qwen/qwen3-vl-8b-instruct", @@ -5714,8 +5770,8 @@ { "provider": "openrouter", "model": "qwen/qwen3.5-27b", - "input_price": 260000, - "output_price": 2600000, + "input_price": 300000, + "output_price": 2400000, "cache_read_price": null, "cache_write_price": null }, @@ -5730,17 +5786,17 @@ { "provider": "openrouter", "model": "qwen/qwen3.5-397b-a17b", - "input_price": 600000, - "output_price": 3600000, - "cache_read_price": 120000, + "input_price": 450000, + "output_price": 3000000, + "cache_read_price": 220000, "cache_write_price": null }, { "provider": "openrouter", "model": "qwen/qwen3.5-9b", - "input_price": 49000, - "output_price": 72000, - "cache_read_price": 44000, + "input_price": 57000, + "output_price": 84000, + "cache_read_price": 52000, "cache_write_price": null }, { @@ -5834,9 +5890,9 @@ { "provider": "openrouter", "model": "qwen/qwen3.8-27b", - "input_price": 150000, - "output_price": 1875000, - "cache_read_price": 37500, + "input_price": 60000, + "output_price": 2200000, + "cache_read_price": 59000, "cache_write_price": null }, { @@ -5871,6 +5927,14 @@ "cache_read_price": 16000, "cache_write_price": null }, + { + "provider": "openrouter", + "model": "qwen/qwen4-max", + "input_price": 1425000, + "output_price": 4275000, + "cache_read_price": 71250, + "cache_write_price": 1781250 + }, { "provider": "openrouter", "model": "recursive/flint-v1.0:free", @@ -5922,9 +5986,9 @@ { "provider": "openrouter", "model": "ricursiveai/ripple-65b-preview", - "input_price": 200000, - "output_price": 600000, - "cache_read_price": 50000, + "input_price": 100000, + "output_price": 300000, + "cache_read_price": 25000, "cache_write_price": null }, { @@ -5991,14 +6055,6 @@ "cache_read_price": null, "cache_write_price": null }, - { - "provider": "openrouter", - "model": "stepfun/step-3.5-flash", - "input_price": 100000, - "output_price": 300000, - "cache_read_price": null, - "cache_write_price": null - }, { "provider": "openrouter", "model": "stepfun/step-3.7-flash", @@ -6015,14 +6071,6 @@ "cache_read_price": 100000, "cache_write_price": null }, - { - "provider": "openrouter", - "model": "tencent/hunyuan-a13b-instruct", - "input_price": 140000, - "output_price": 570000, - "cache_read_price": null, - "cache_write_price": null - }, { "provider": "openrouter", "model": "tencent/hy-mt2-1.8b", @@ -6071,6 +6119,14 @@ "cache_read_price": 21000, "cache_write_price": null }, + { + "provider": "openrouter", + "model": "tencent/hy4-flash", + "input_price": 35000, + "output_price": 140500, + "cache_read_price": 1500, + "cache_write_price": null + }, { "provider": "openrouter", "model": "tencent/hy4-preview", @@ -6111,6 +6167,14 @@ "cache_read_price": 170000, "cache_write_price": null }, + { + "provider": "openrouter", + "model": "thinkingmachines/inkling-2-small", + "input_price": 300000, + "output_price": 1000000, + "cache_read_price": 30000, + "cache_write_price": null + }, { "provider": "openrouter", "model": "thinkingmachines/inkling-2-small:free", @@ -6250,9 +6314,9 @@ { "provider": "openrouter", "model": "xiaomi/mimo-v2.5-pro", - "input_price": 480000, - "output_price": 1800000, - "cache_read_price": 96000, + "input_price": 435000, + "output_price": 870000, + "cache_read_price": 3600, "cache_write_price": null }, { @@ -6290,9 +6354,9 @@ { "provider": "openrouter", "model": "z-ai/glm-4.5-air", - "input_price": 200000, - "output_price": 1100000, - "cache_read_price": 30000, + "input_price": 130000, + "output_price": 850000, + "cache_read_price": 25000, "cache_write_price": null }, { @@ -6316,15 +6380,15 @@ "model": "z-ai/glm-4.6v", "input_price": 300000, "output_price": 900000, - "cache_read_price": 55000, + "cache_read_price": 50000, "cache_write_price": null }, { "provider": "openrouter", "model": "z-ai/glm-4.7", - "input_price": 600000, - "output_price": 2200000, - "cache_read_price": 110000, + "input_price": 400000, + "output_price": 1750000, + "cache_read_price": 80000, "cache_write_price": null }, { @@ -6402,9 +6466,9 @@ { "provider": "openrouter", "model": "z-ai/glm-5.3-prime", - "input_price": 2800000, - "output_price": 8800000, - "cache_read_price": 560000, + "input_price": 1680000, + "output_price": 5280000, + "cache_read_price": 336000, "cache_write_price": null }, { @@ -6450,9 +6514,9 @@ { "provider": "openrouter", "model": "~deepseek/deepseek-flash-latest", - "input_price": 22000, - "output_price": 400000, - "cache_read_price": 4000, + "input_price": 36000, + "output_price": 500000, + "cache_read_price": 10000, "cache_write_price": null }, { @@ -6474,10 +6538,10 @@ { "provider": "openrouter", "model": "~google/gemini-flash-latest", - "input_price": 750000, - "output_price": 3750000, + "input_price": 1500000, + "output_price": 7500000, "cache_read_price": 75000, - "cache_write_price": 41667 + "cache_write_price": 83333 }, { "provider": "openrouter", @@ -6490,18 +6554,18 @@ { "provider": "openrouter", "model": "~moonshotai/kimi-latest", - "input_price": 182400, - "output_price": 11005500, - "cache_read_price": 180000, + "input_price": 190000, + "output_price": 10606600, + "cache_read_price": 190000, "cache_write_price": null }, { "provider": "openrouter", "model": "~openai/gpt-astra-latest", - "input_price": 10000000, - "output_price": 50000000, - "cache_read_price": 1000000, - "cache_write_price": 12500000 + "input_price": 8000000, + "output_price": 40000000, + "cache_read_price": 400000, + "cache_write_price": 10000000 }, { "provider": "openrouter", @@ -6575,14 +6639,6 @@ "cache_read_price": null, "cache_write_price": null }, - { - "provider": "vercel", - "model": "alibaba/qwen-3-235b", - "input_price": 220000, - "output_price": 880000, - "cache_read_price": null, - "cache_write_price": null - }, { "provider": "vercel", "model": "alibaba/qwen-3-30b", @@ -6599,14 +6655,6 @@ "cache_read_price": null, "cache_write_price": null }, - { - "provider": "vercel", - "model": "alibaba/qwen3-coder", - "input_price": 220000, - "output_price": 1800000, - "cache_read_price": 22000, - "cache_write_price": null - }, { "provider": "vercel", "model": "alibaba/qwen3-coder-30b-a3b", @@ -6634,16 +6682,8 @@ { "provider": "vercel", "model": "alibaba/qwen3-next-80b-a3b-instruct", - "input_price": 150000, - "output_price": 1200000, - "cache_read_price": null, - "cache_write_price": null - }, - { - "provider": "vercel", - "model": "alibaba/qwen3-next-80b-a3b-thinking", - "input_price": 150000, - "output_price": 1200000, + "input_price": 90000, + "output_price": 1100000, "cache_read_price": null, "cache_write_price": null }, @@ -6749,7 +6789,7 @@ "input_price": 2000000, "output_price": 6000000, "cache_read_price": 250000, - "cache_write_price": null + "cache_write_price": 2500000 }, { "provider": "vercel", @@ -6775,6 +6815,14 @@ "cache_read_price": 16000, "cache_write_price": null }, + { + "provider": "vercel", + "model": "alibaba/qwen4-max", + "input_price": 1500000, + "output_price": 4500000, + "cache_read_price": 75000, + "cache_write_price": 1875000 + }, { "provider": "vercel", "model": "amazon/nova-2-lite", @@ -7060,7 +7108,7 @@ "model": "deepseek/deepseek-v4.1-flash", "input_price": 300000, "output_price": 1200000, - "cache_read_price": 7000, + "cache_read_price": 6000, "cache_write_price": null }, { @@ -7287,6 +7335,14 @@ "cache_read_price": 100000, "cache_write_price": null }, + { + "provider": "vercel", + "model": "google/gemini-4-hydrogen", + "input_price": 1500000, + "output_price": 7500000, + "cache_read_price": 75000, + "cache_write_price": null + }, { "provider": "vercel", "model": "google/gemini-nano-banana-2.1", @@ -7335,22 +7391,6 @@ "cache_read_price": null, "cache_write_price": null }, - { - "provider": "vercel", - "model": "inception/mercury-2", - "input_price": 250000, - "output_price": 750000, - "cache_read_price": 25000, - "cache_write_price": null - }, - { - "provider": "vercel", - "model": "inception/mercury-2.5", - "input_price": 40000, - "output_price": 150000, - "cache_read_price": 4000, - "cache_write_price": null - }, { "provider": "vercel", "model": "inception/mercury-3", @@ -7359,14 +7399,6 @@ "cache_read_price": 10000, "cache_write_price": null }, - { - "provider": "vercel", - "model": "inception/mercury-coder-small", - "input_price": 250000, - "output_price": 1000000, - "cache_read_price": null, - "cache_write_price": null - }, { "provider": "vercel", "model": "inclusionai/ling-3.0-flash", @@ -7567,77 +7599,29 @@ "cache_read_price": 200000, "cache_write_price": null }, - { - "provider": "vercel", - "model": "microsoft/mai-image-2.6", - "input_price": 5000000, - "output_price": 38000000, - "cache_read_price": null, - "cache_write_price": null - }, - { - "provider": "vercel", - "model": "microsoft/mai-image-2.6-flash", - "input_price": 1750000, - "output_price": 19000000, - "cache_read_price": null, - "cache_write_price": null - }, - { - "provider": "vercel", - "model": "minimax/minimax-m2", - "input_price": 300000, - "output_price": 1200000, - "cache_read_price": 30000, - "cache_write_price": 375000 - }, { "provider": "vercel", "model": "minimax/minimax-m2.1", "input_price": 300000, "output_price": 1200000, - "cache_read_price": 30000, - "cache_write_price": 375000 - }, - { - "provider": "vercel", - "model": "minimax/minimax-m2.1-lightning", - "input_price": 300000, - "output_price": 2400000, - "cache_read_price": 30000, - "cache_write_price": 375000 + "cache_read_price": 150000, + "cache_write_price": null }, { "provider": "vercel", "model": "minimax/minimax-m2.5", "input_price": 300000, "output_price": 1200000, - "cache_read_price": 30000, - "cache_write_price": 375000 - }, - { - "provider": "vercel", - "model": "minimax/minimax-m2.5-highspeed", - "input_price": 600000, - "output_price": 2400000, - "cache_read_price": 30000, - "cache_write_price": 375000 + "cache_read_price": null, + "cache_write_price": null }, { "provider": "vercel", "model": "minimax/minimax-m2.7", - "input_price": 300000, - "output_price": 1200000, - "cache_read_price": 60000, - "cache_write_price": 375000 - }, - { - "provider": "vercel", - "model": "minimax/minimax-m2.7-highspeed", - "input_price": 600000, - "output_price": 2400000, - "cache_read_price": 60000, - "cache_write_price": 375000 + "input_price": 210000, + "output_price": 840000, + "cache_read_price": 42000, + "cache_write_price": null }, { "provider": "vercel", @@ -7786,9 +7770,9 @@ { "provider": "vercel", "model": "moonshotai/kimi-k3-fast", - "input_price": 4500000, + "input_price": 6000000, "output_price": 22500000, - "cache_read_price": 450000, + "cache_read_price": 600000, "cache_write_price": null }, { @@ -7805,7 +7789,7 @@ "input_price": 4000000, "output_price": 20000000, "cache_read_price": 200000, - "cache_write_price": 4000000 + "cache_write_price": 5000000 }, { "provider": "vercel", @@ -7823,14 +7807,6 @@ "cache_read_price": null, "cache_write_price": null }, - { - "provider": "vercel", - "model": "nvidia/nemotron-3-nano-30b-a3b", - "input_price": 50000, - "output_price": 200000, - "cache_read_price": 25000, - "cache_write_price": null - }, { "provider": "vercel", "model": "nvidia/nemotron-3-super-120b-a12b", @@ -8321,43 +8297,35 @@ }, { "provider": "vercel", - "model": "openai/gpt-image-1-mini", + "model": "openai/gpt-6.2-astra", + "input_price": 8000000, + "output_price": 40000000, + "cache_read_price": 400000, + "cache_write_price": 10000000 + }, + { + "provider": "vercel", + "model": "openai/gpt-6.2-astra-fast", + "input_price": 16000000, + "output_price": 80000000, + "cache_read_price": 800000, + "cache_write_price": 20000000 + }, + { + "provider": "vercel", + "model": "openai/gpt-6.2-sol", "input_price": 2000000, - "output_price": 8000000, + "output_price": 10000000, + "cache_read_price": 100000, + "cache_write_price": 2500000 + }, + { + "provider": "vercel", + "model": "openai/gpt-6.2-sol-fast", + "input_price": 4000000, + "output_price": 20000000, "cache_read_price": 200000, - "cache_write_price": null - }, - { - "provider": "vercel", - "model": "openai/gpt-image-1.5", - "input_price": 5000000, - "output_price": 32000000, - "cache_read_price": 1250000, - "cache_write_price": null - }, - { - "provider": "vercel", - "model": "openai/gpt-image-2", - "input_price": 5000000, - "output_price": 30000000, - "cache_read_price": 1250000, - "cache_write_price": null - }, - { - "provider": "vercel", - "model": "openai/gpt-image-2.5-flare", - "input_price": 5000000, - "output_price": 30000000, - "cache_read_price": 1250000, - "cache_write_price": null - }, - { - "provider": "vercel", - "model": "openai/gpt-image-2.5-sunburst", - "input_price": 5000000, - "output_price": 30000000, - "cache_read_price": 1250000, - "cache_write_price": null + "cache_write_price": 5000000 }, { "provider": "vercel", @@ -8471,6 +8439,14 @@ "cache_read_price": 275000, "cache_write_price": null }, + { + "provider": "vercel", + "model": "paperinstruments/ultramarine-1-flash", + "input_price": 150000, + "output_price": 500000, + "cache_read_price": 30000, + "cache_write_price": null + }, { "provider": "vercel", "model": "particle/particle-1", @@ -8487,14 +8463,6 @@ "cache_read_price": null, "cache_write_price": 62500 }, - { - "provider": "vercel", - "model": "poolside/laguna-s-2.1", - "input_price": 90000, - "output_price": 180000, - "cache_read_price": 9000, - "cache_write_price": null - }, { "provider": "vercel", "model": "quiverai/arrow-2", @@ -8511,6 +8479,14 @@ "cache_read_price": 600000, "cache_write_price": 7500000 }, + { + "provider": "vercel", + "model": "recursive/flint-v1.0", + "input_price": 0, + "output_price": 0, + "cache_read_price": null, + "cache_write_price": null + }, { "provider": "vercel", "model": "reflection/beam", @@ -8727,6 +8703,14 @@ "cache_read_price": 21000, "cache_write_price": null }, + { + "provider": "vercel", + "model": "tencent/hy4-flash", + "input_price": 35000, + "output_price": 140500, + "cache_read_price": 1500, + "cache_write_price": null + }, { "provider": "vercel", "model": "tencent/hy4-preview", @@ -8743,6 +8727,14 @@ "cache_read_price": 170000, "cache_write_price": null }, + { + "provider": "vercel", + "model": "thinkingmachines/inkling-2-small", + "input_price": 300000, + "output_price": 1000000, + "cache_read_price": 30000, + "cache_write_price": null + }, { "provider": "vercel", "model": "thinkingmachines/inkling-small", diff --git a/coderd/x/chatd/ARCHITECTURE.md b/coderd/x/chatd/ARCHITECTURE.md index d84df99190e..51f9b74aeff 100644 --- a/coderd/x/chatd/ARCHITECTURE.md +++ b/coderd/x/chatd/ARCHITECTURE.md @@ -1233,8 +1233,6 @@ Subagent model and effort resolution follows this precedence: During generation preparation, the effective effort is resolved as the chat's `last_reasoning_effort` if set, else the config's `default`; clamped to the config's `max` on the global scale `none < minimal < low < medium < high < xhigh < max`; and passed through to the provider. The provider verifies whether the configured value is valid for that model at runtime. If the model config has no `reasoning_effort`, any user-selected value is ignored. The resolved value is injected into the provider-native options by `chatprovider.ProviderOptionsForCall`, which converts the model config and applies the effort in one step. For Anthropic, the fantasy provider converts effort into enabled budget thinking on models older than Claude 4.6, which reject adaptive thinking. -`applyReasoningEffort` clamps `none` and `minimal` to `low` for GPT-6 Astra and its dated snapshots (`chatopenai.IsGPT6Astra`, a case-insensitive prefix match on `gpt-6-astra`), because that model rejects `none` with HTTP 400 and lists no `minimal` effort. - ##### OpenAI transport selection OpenAI models speak either the Responses API or Chat Completions. The provider SDK picks per model from a static known-model list, so a newly released model absent from that list falls back to Chat Completions. Model configs may override the choice with `openai_config.use_responses_api` inside `chat_model_configs.options`: unset keeps the known-model list, true forces Responses, false forces Chat Completions. It sits in `openai_config` rather than `provider_options.openai` because it is applied once when the client is built, while `provider_options` holds per-request parameters. diff --git a/coderd/x/chatd/chatopenai/transport.go b/coderd/x/chatd/chatopenai/transport.go index 7c8420d64c8..4ec3341d1a9 100644 --- a/coderd/x/chatd/chatopenai/transport.go +++ b/coderd/x/chatd/chatopenai/transport.go @@ -2,7 +2,6 @@ package chatopenai import ( "fmt" - "strings" fantasyopenai "charm.land/fantasy/providers/openai" fantasyopenaicompat "charm.land/fantasy/providers/openaicompat" @@ -62,13 +61,3 @@ func UsesResponsesAPI(modelID string, override *bool) bool { } return fantasyopenai.IsResponsesModel(modelID) } - -// IsGPT6Astra matches gpt-6-astra and its dated snapshots. -func IsGPT6Astra(modelID string) bool { - return strings.HasPrefix(strings.ToLower(modelID), "gpt-6-astra") -} - -// IsGPT61Sol matches gpt-6.1-sol and its dated snapshots. -func IsGPT61Sol(modelID string) bool { - return strings.HasPrefix(strings.ToLower(modelID), "gpt-6.1-sol") -} diff --git a/coderd/x/chatd/chatopenai/transport_test.go b/coderd/x/chatd/chatopenai/transport_test.go index c384abb195d..3b0c8727d52 100644 --- a/coderd/x/chatd/chatopenai/transport_test.go +++ b/coderd/x/chatd/chatopenai/transport_test.go @@ -47,24 +47,6 @@ func TestTransportFor(t *testing.T) { } } -func TestIsGPT6Astra(t *testing.T) { - t.Parallel() - - require.True(t, chatopenai.IsGPT6Astra("gpt-6-astra")) - require.True(t, chatopenai.IsGPT6Astra("GPT-6-Astra-2026-09-03")) - require.False(t, chatopenai.IsGPT6Astra("gpt-5.6-sol")) - require.False(t, chatopenai.IsGPT6Astra("gpt-6")) -} - -func TestIsGPT61Sol(t *testing.T) { - t.Parallel() - - require.True(t, chatopenai.IsGPT61Sol("gpt-6.1-sol")) - require.True(t, chatopenai.IsGPT61Sol("GPT-6.1-Sol-2026-09-24")) - require.False(t, chatopenai.IsGPT61Sol("gpt-6-sol")) - require.False(t, chatopenai.IsGPT61Sol("gpt-6.1")) -} - func TestTransportUsesResponses(t *testing.T) { t.Parallel() diff --git a/coderd/x/chatd/chatprovider/reasoningeffort.go b/coderd/x/chatd/chatprovider/reasoningeffort.go index 9207cfa300e..224c92c8c52 100644 --- a/coderd/x/chatd/chatprovider/reasoningeffort.go +++ b/coderd/x/chatd/chatprovider/reasoningeffort.go @@ -11,7 +11,6 @@ import ( fantasyopenai "charm.land/fantasy/providers/openai" fantasyopenaicompat "charm.land/fantasy/providers/openaicompat" - "github.com/coder/coder/v2/coderd/x/chatd/chatopenai" "github.com/coder/coder/v2/codersdk" ) @@ -133,11 +132,24 @@ func applyReasoningEffort( return options } +// openAILowFloorPrefixes lists the OpenAI models that reject none and minimal +// with HTTP 400, so they start at low. Each entry is a lowercase model ID +// prefix, which also matches the model's dated snapshots. +var openAILowFloorPrefixes = []string{ + "gpt-6-astra", + "gpt-6.1-sol", + "gpt-6.2-astra", + "gpt-6.2-sol", +} + // openAIReasoningEffort maps the global reasoning effort scale onto what an -// OpenAI model accepts. GPT-6 Astra and GPT-6.1 Sol reject none with HTTP 400 -// and do not list minimal, so both start at low, the lowest effort they accept. +// OpenAI model accepts. func openAIReasoningEffort(modelID, effort string) string { - if !chatopenai.IsGPT6Astra(modelID) && !chatopenai.IsGPT61Sol(modelID) { + id := strings.ToLower(modelID) + startsAtLow := slices.ContainsFunc(openAILowFloorPrefixes, func(prefix string) bool { + return strings.HasPrefix(id, prefix) + }) + if !startsAtLow { return effort } switch effort { diff --git a/coderd/x/chatd/chatprovider/reasoningeffort_internal_test.go b/coderd/x/chatd/chatprovider/reasoningeffort_internal_test.go index d2dfb2e0430..2a63ad5fe68 100644 --- a/coderd/x/chatd/chatprovider/reasoningeffort_internal_test.go +++ b/coderd/x/chatd/chatprovider/reasoningeffort_internal_test.go @@ -70,6 +70,9 @@ func TestApplyReasoningEffort(t *testing.T) { for _, model := range []Model{ NewModel(&chattest.FakeModel{ProviderName: fantasyopenai.Name, ModelName: "gpt-6-astra"}, nil), NewModel(&chattest.FakeModel{ProviderName: fantasyopenai.Name, ModelName: "gpt-6.1-sol"}, nil), + NewModel(&chattest.FakeModel{ProviderName: fantasyopenai.Name, ModelName: "gpt-6.2-astra"}, nil), + NewModel(&chattest.FakeModel{ProviderName: fantasyopenai.Name, ModelName: "gpt-6.2-sol"}, nil), + NewModel(&chattest.FakeModel{ProviderName: fantasyopenai.Name, ModelName: "GPT-6-Astra-2026-09-03"}, nil), } { for effort, want := range map[string]fantasyopenai.ReasoningEffort{ codersdk.ChatModelReasoningEffortNone: fantasyopenai.ReasoningEffortLow, @@ -85,7 +88,7 @@ func TestApplyReasoningEffort(t *testing.T) { } // Other OpenAI models keep the caller's value. - for _, modelID := range []string{"gpt-5.6-sol", "gpt-6-sol"} { + for _, modelID := range []string{"gpt-5.6-sol", "gpt-6-sol", "gpt-6.1-terra"} { model := NewModel(&chattest.FakeModel{ProviderName: fantasyopenai.Name, ModelName: modelID}, nil) got := applyReasoningEffort(model, nil, new(codersdk.ChatModelReasoningEffortNone)) require.Equal(t, fantasyopenai.ReasoningEffortNone, *got[fantasyopenai.Name].(*fantasyopenai.ResponsesProviderOptions).ReasoningEffort, "model %q", modelID) diff --git a/scripts/aibridgepricesgen/curation.json b/scripts/aibridgepricesgen/curation.json index 5718585baae..413304a3195 100644 --- a/scripts/aibridgepricesgen/curation.json +++ b/scripts/aibridgepricesgen/curation.json @@ -200,10 +200,18 @@ } ], "openai": [ + { + "modelIdentifier": "gpt-6.2-astra", + "reasoningEffort": "medium" + }, { "modelIdentifier": "gpt-6-astra", "reasoningEffort": "medium" }, + { + "modelIdentifier": "gpt-6.2-sol", + "reasoningEffort": "medium" + }, { "modelIdentifier": "gpt-6.1-sol", "reasoningEffort": "medium" @@ -253,9 +261,15 @@ } ], "openrouter": [ + { + "modelIdentifier": "openai/gpt-6.2-astra" + }, { "modelIdentifier": "openai/gpt-6-astra" }, + { + "modelIdentifier": "openai/gpt-6.2-sol" + }, { "modelIdentifier": "openai/gpt-6.1-sol" }, @@ -370,9 +384,15 @@ } ], "vercel": [ + { + "modelIdentifier": "openai/gpt-6.2-astra" + }, { "modelIdentifier": "openai/gpt-6-astra" }, + { + "modelIdentifier": "openai/gpt-6.2-sol" + }, { "modelIdentifier": "openai/gpt-6.1-sol" }, diff --git a/site/src/modules/aiModels/knownModels/knownModelsGenerated.json b/site/src/modules/aiModels/knownModels/knownModelsGenerated.json index e2a8b2ad908..29f2adf3f4f 100644 --- a/site/src/modules/aiModels/knownModels/knownModelsGenerated.json +++ b/site/src/modules/aiModels/knownModels/knownModelsGenerated.json @@ -668,6 +668,19 @@ } ], "openai": [ + { + "provider": "openai", + "modelIdentifier": "gpt-6.2-astra", + "displayName": "GPT-6.2 Astra", + "aliases": [], + "contextLimit": 1050000, + "maxOutputTokens": 128000, + "reasoningEffort": "medium", + "inputCost": 8, + "outputCost": 40, + "cacheReadCost": 0.4, + "cacheWriteCost": 10 + }, { "provider": "openai", "modelIdentifier": "gpt-6-astra", @@ -681,6 +694,19 @@ "cacheReadCost": 1, "cacheWriteCost": 12.5 }, + { + "provider": "openai", + "modelIdentifier": "gpt-6.2-sol", + "displayName": "GPT-6.2 Sol", + "aliases": [], + "contextLimit": 1050000, + "maxOutputTokens": 128000, + "reasoningEffort": "medium", + "inputCost": 2, + "outputCost": 10, + "cacheReadCost": 0.1, + "cacheWriteCost": 2.5 + }, { "provider": "openai", "modelIdentifier": "gpt-6.1-sol", @@ -830,6 +856,18 @@ } ], "openrouter": [ + { + "provider": "openrouter", + "modelIdentifier": "openai/gpt-6.2-astra", + "displayName": "GPT-6.2 Astra", + "aliases": [], + "contextLimit": 1050000, + "maxOutputTokens": 128000, + "inputCost": 8, + "outputCost": 40, + "cacheReadCost": 0.4, + "cacheWriteCost": 10 + }, { "provider": "openrouter", "modelIdentifier": "openai/gpt-6-astra", @@ -842,6 +880,18 @@ "cacheReadCost": 1, "cacheWriteCost": 12.5 }, + { + "provider": "openrouter", + "modelIdentifier": "openai/gpt-6.2-sol", + "displayName": "GPT-6.2 Sol", + "aliases": [], + "contextLimit": 1050000, + "maxOutputTokens": 128000, + "inputCost": 2, + "outputCost": 10, + "cacheReadCost": 0.1, + "cacheWriteCost": 2.5 + }, { "provider": "openrouter", "modelIdentifier": "openai/gpt-6.1-sol", @@ -954,9 +1004,9 @@ "aliases": [], "contextLimit": 1048576, "maxOutputTokens": 943718, - "inputCost": 0.192, + "inputCost": 0.2, "outputCost": 16, - "cacheReadCost": 0.182 + "cacheReadCost": 0.19 }, { "provider": "openrouter", @@ -965,9 +1015,9 @@ "aliases": [], "contextLimit": 262144, "maxOutputTokens": 235929, - "inputCost": 0.6, - "outputCost": 3.5, - "cacheReadCost": 0.16 + "inputCost": 0.7, + "outputCost": 3.75, + "cacheReadCost": 0.17 }, { "provider": "openrouter", @@ -1177,9 +1227,9 @@ "aliases": [], "contextLimit": 1048576, "maxOutputTokens": 943718, - "inputCost": 0.022, - "outputCost": 0.4, - "cacheReadCost": 0.004 + "inputCost": 0.051, + "outputCost": 0.567, + "cacheReadCost": 0.018 }, { "provider": "openrouter", @@ -1198,10 +1248,10 @@ "displayName": "DeepSeek V4 Pro", "aliases": [], "contextLimit": 1048576, - "maxOutputTokens": 384000, - "inputCost": 0.95526, - "outputCost": 1.91052, - "cacheReadCost": 0.079605 + "maxOutputTokens": 393216, + "inputCost": 0.9, + "outputCost": 1.5, + "cacheReadCost": 0.25 }, { "provider": "openrouter", @@ -1271,6 +1321,18 @@ } ], "vercel": [ + { + "provider": "vercel", + "modelIdentifier": "openai/gpt-6.2-astra", + "displayName": "GPT-6.2 Astra", + "aliases": [], + "contextLimit": 1050000, + "maxOutputTokens": 128000, + "inputCost": 8, + "outputCost": 40, + "cacheReadCost": 0.4, + "cacheWriteCost": 10 + }, { "provider": "vercel", "modelIdentifier": "openai/gpt-6-astra", @@ -1283,6 +1345,18 @@ "cacheReadCost": 1, "cacheWriteCost": 12.5 }, + { + "provider": "vercel", + "modelIdentifier": "openai/gpt-6.2-sol", + "displayName": "GPT-6.2 Sol", + "aliases": [], + "contextLimit": 1050000, + "maxOutputTokens": 128000, + "inputCost": 2, + "outputCost": 10, + "cacheReadCost": 0.1, + "cacheWriteCost": 2.5 + }, { "provider": "vercel", "modelIdentifier": "openai/gpt-6.1-sol", @@ -1613,10 +1687,10 @@ "displayName": "DeepSeek V4.1 Flash", "aliases": [], "contextLimit": 1048576, - "maxOutputTokens": 32768, + "maxOutputTokens": 1048576, "inputCost": 0.3, "outputCost": 1.2, - "cacheReadCost": 0.007 + "cacheReadCost": 0.006 }, { "provider": "vercel", @@ -1691,8 +1765,8 @@ "modelIdentifier": "minimax/minimax-m3", "displayName": "MiniMax M3", "aliases": [], - "contextLimit": 512000, - "maxOutputTokens": 512000, + "contextLimit": 1000000, + "maxOutputTokens": 1000000, "inputCost": 0.3, "outputCost": 1.2, "cacheReadCost": 0.06