Skip to content

πŸ™Œ OpenHands: AI-Driven Development

Add GLM-4.7 model support to frontend (#13202)

Juan Michelinia11435b06182
diff --git a/frontend/src/utils/verified-models.ts b/frontend/src/utils/verified-models.ts
index d9e57b5fcb..2a6ffc69f4 100644
--- a/frontend/src/utils/verified-models.ts
+++ b/frontend/src/utils/verified-models.ts
@@ -20,6 +20,7 @@ export const VERIFIED_MODELS = [
"devstral-medium-2512",
"kimi-k2-0711-preview",
"qwen3-coder-480b",
+ "glm-4.7",
];
// LiteLLM does not return OpenAI models with the provider, so we list them here to set them ourselves for consistency
@@ -63,6 +64,7 @@ export const VERIFIED_OPENHANDS_MODELS = [
"devstral-medium-2512",
"kimi-k2-0711-preview",
"qwen3-coder-480b",
+ "glm-4.7",
];
// Default model for OpenHands provider
diff --git a/openhands/llm/model_features.py b/openhands/llm/model_features.py
index 96386026a4..8538f27456 100644
--- a/openhands/llm/model_features.py
+++ b/openhands/llm/model_features.py
@@ -97,6 +97,8 @@ FUNCTION_CALLING_PATTERNS: list[str] = [
'qwen3-coder-480b-a35b-instruct',
'deepseek-chat',
'grok-code-fast-1',
+ # GLM series - verified via official docs and litellm config
+ 'glm-4*',
]
REASONING_EFFORT_PATTERNS: list[str] = [
@@ -116,6 +118,8 @@ REASONING_EFFORT_PATTERNS: list[str] = [
'deepseek-r1-0528*',
'claude-sonnet-4-5*',
'claude-haiku-4-5*',
+ # GLM series - verified via litellm config
+ 'glm-4*',
]
PROMPT_CACHE_PATTERNS: list[str] = [
@@ -129,6 +133,8 @@ PROMPT_CACHE_PATTERNS: list[str] = [
'claude-3-opus-20240229',
'claude-sonnet-4*',
'claude-opus-4*',
+ # GLM series - verified via litellm config
+ 'glm-4*',
]
SUPPORTS_STOP_WORDS_FALSE_PATTERNS: list[str] = [
diff --git a/openhands/utils/llm.py b/openhands/utils/llm.py
index 40c47e2769..d5498fc766 100644
--- a/openhands/utils/llm.py
+++ b/openhands/utils/llm.py
@@ -26,6 +26,7 @@ OPENHANDS_MODELS = [
'openhands/devstral-medium-2512',
'openhands/kimi-k2-0711-preview',
'openhands/qwen3-coder-480b',
+ 'openhands/glm-4.7',
]
CLARIFAI_MODELS = [