The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
BOT-2003: Support GLM 5.3 (#81681)
Andrei Simionescuf1ddc2317bd5
diff --git a/src/metabase/metabot/self/openrouter.clj b/src/metabase/metabot/self/openrouter.cljindex 8a4e070d24f..04cfe50416f 100644--- a/src/metabase/metabot/self/openrouter.clj+++ b/src/metabase/metabot/self/openrouter.clj@@ -77,6 +77,7 @@"openai/gpt-5.4-pro" {:display-name "GPT-5.4 Pro" :context-window 922000}"openai/gpt-5.4-mini" {:display-name "GPT-5.4 Mini" :context-window 272000}"qwen/qwen3.8-max" {:display-name "Qwen3.8 Max" :context-window 1000000}+ "z-ai/glm-5.3" {:display-name "GLM-5.3" :context-window 1048576}"z-ai/glm-5.2" {:display-name "GLM-5.2" :context-window 1048576}})(defn context-window-tokensdiff --git a/src/metabase/metabot/self/zai.clj b/src/metabase/metabot/self/zai.cljindex 5edf2af3fc6..265c99e0806 100644--- a/src/metabase/metabot/self/zai.clj+++ b/src/metabase/metabot/self/zai.clj@@ -37,7 +37,8 @@(def supported-models"Z.AI models offered in the Metabot model picker, keyed by model id.`list-models` returns the intersection of this map with the `/models` catalog."- {"glm-5.2" {:display-name "GLM-5.2" :context-window 1048576}})+ {"glm-5.3" {:display-name "GLM-5.3" :context-window 1048576}+ "glm-5.2" {:display-name "GLM-5.2" :context-window 1048576}})(defn context-window-tokens"The input context window for `model`, or nil when it isn't one we know."diff --git a/test/metabase/metabot/self/openrouter_test.clj b/test/metabase/metabot/self/openrouter_test.cljindex c3414f9f935..bce118884fe 100644--- a/test/metabase/metabot/self/openrouter_test.clj+++ b/test/metabase/metabot/self/openrouter_test.clj@@ -373,6 +373,7 @@{:id "anthropic/claude-opus-5" :name "Anthropic: Claude Opus 5" :created 26}{:id "anthropic/claude-sonnet-4.6" :created 25}{:id "anthropic/claude-haiku-4.5" :name "Anthropic: Claude Haiku 4.5" :created 20}+ {:id "z-ai/glm-5.3" :name "Z.AI: GLM 5.3" :created 15}{:id "openai/gpt-4o" :name "OpenAI: GPT-4o" :created 10}{:id "openai/gpt-5" :name "OpenAI: GPT-5" :created 5}]}})](is (= [{:id "anthropic/claude-haiku-4.5" :display_name "Anthropic: Claude Haiku 4.5"}@@ -382,7 +383,8 @@{:id "openai/gpt-5.6-luna" :display_name "OpenAI: GPT-5.6 Luna"}{:id "openai/gpt-5.6-sol" :display_name "OpenAI: GPT-5.6 Sol"}{:id "openai/gpt-5.6-terra" :display_name "OpenAI: GPT-5.6 Terra"}- {:id "qwen/qwen3.8-max" :display_name "Qwen: Qwen3.8 Max"}]+ {:id "qwen/qwen3.8-max" :display_name "Qwen: Qwen3.8 Max"}+ {:id "z-ai/glm-5.3" :display_name "Z.AI: GLM 5.3"}](:models (openrouter/list-models {:credentials byok-credentials}))))))))(deftest openrouter-raw-explicit-credentials-testdiff --git a/test/metabase/metabot/self/zai_test.clj b/test/metabase/metabot/self/zai_test.cljindex ba34b43b438..00837dfe3a9 100644--- a/test/metabase/metabot/self/zai_test.clj+++ b/test/metabase/metabot/self/zai_test.clj@@ -271,8 +271,10 @@req)){:status 200 :body {:data [{:id "glm-4.7"}{:id "glm-5.2"}+ {:id "glm-5.3"}{:id "some-other-model"}]}})]- (is (= {:models [{:id "glm-5.2" :display_name "GLM-5.2"}]}+ (is (= {:models [{:id "glm-5.2" :display_name "GLM-5.2"}+ {:id "glm-5.3" :display_name "GLM-5.3"}]}(zai/list-models {:credentials byok-credentials}))))))(deftest list-models-prefers-catalog-display-name-testdiff --git a/test/metabase/metabot/self_test.clj b/test/metabase/metabot/self_test.cljindex 976be744dc1..0eb30a5c736 100644--- a/test/metabase/metabot/self_test.clj+++ b/test/metabase/metabot/self_test.clj@@ -1081,6 +1081,8 @@"metabase/anthropic/claude-sonnet-4-6" 1000000 ; proxy prefix is stripped"azure/openai/gpt-5.4-mini-prod" 272000 ; longest model-id prefix wins"google/google/gemini-3.6-flash" 1048576 ; publisher-qualified model reaches Google adapter+ "zai/glm-5.3" 1048576 ; Z.AI direct+ "openrouter/z-ai/glm-5.3" 1048576 ; OpenRouter serving limit"azure/openai/my-deployment" nil ; unmatched deployment"anthropic/some-future-model" nil ; unknown model"unknown" nil))) ; no such connection