Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Remove two non-Azure model ids from Azure's context map (#83870)

Paolo Rascunàd14b63b89a69
diff --git a/src/metabase/metabot/self/azure.clj b/src/metabase/metabot/self/azure.clj
index 90b9b17ca55..6f9dd6af613 100644
--- a/src/metabase/metabot/self/azure.clj
+++ b/src/metabase/metabot/self/azure.clj
@@ -94,8 +94,6 @@
"gpt-5.6-sol" 922000
"gpt-5.6-terra" 922000
"gpt-5.6-luna" 922000
- "gpt-5.6" 922000
- "gpt-5.5-pro" 922000
"gpt-5.5" 922000
"gpt-5.4-pro" 922000
"gpt-5.4-mini" 272000
diff --git a/test/metabase/metabot/self/azure_test.clj b/test/metabase/metabot/self/azure_test.clj
index 789e59398c7..1cd0bb85d34 100644
--- a/test/metabase/metabot/self/azure_test.clj
+++ b/test/metabase/metabot/self/azure_test.clj
@@ -264,6 +264,30 @@
(captured-raw-request! {:model "evilai/some-deployment"
:input [{:role :user :content "hi"}]}))))
+;;; ──────────────────────────────────────────────────────────────────
+;;; Context windows
+;;; ──────────────────────────────────────────────────────────────────
+
+(deftest ^:parallel gpt-context-window-tokens-test
+ (testing "a deployment named gpt-5.6 gets no window"
+ (is (nil? (azure/context-window-tokens "openai/gpt-5.6"))))
+ (testing "gpt-5.6 is not a family prefix for custom names"
+ (is (nil? (azure/context-window-tokens "openai/gpt-5.6-mine"))))
+ ;; Foundry sells gpt-5.6-sol, -terra and -luna, and no model with the id gpt-5.6 or gpt-5.5-pro:
+ ;; https://learn.microsoft.com/en-us/azure/foundry/foundry-models/concepts/models-sold-directly-by-azure
+ (testing "Foundry sells neither id"
+ (doseq [id ["gpt-5.6" "gpt-5.5-pro"]]
+ (is (not (contains? @#'azure/model-context-windows id)) id)))
+ (testing "real ids keep their window"
+ (are [model window] (= window (azure/context-window-tokens model))
+ "openai/gpt-5.6-sol" 922000
+ "openai/gpt-5.6-terra" 922000
+ "openai/gpt-5.6-luna" 922000
+ "openai/gpt-5.6-sol-2026-07-09" 922000
+ "openai/gpt-5.5" 922000))
+ (testing "a gpt-5.5-pro deployment gets the window of the gpt-5.5 prefix"
+ (is (= 922000 (azure/context-window-tokens "openai/gpt-5.5-pro")))))
+
;;; ──────────────────────────────────────────────────────────────────
;;; AI proxy (unsupported)
;;; ──────────────────────────────────────────────────────────────────