Skip to content

πŸ™Œ OpenHands: AI-Driven Development

Fix issue #10729: Add x-ai/grok-code-fast-1 to MODELS_WITHOUT_STOP_WORDS (#10867)

mamoodid5d5e265f887
diff --git a/openhands/llm/model_features.py b/openhands/llm/model_features.py
index 6f5d1b349c..48a40a38f6 100644
--- a/openhands/llm/model_features.py
+++ b/openhands/llm/model_features.py
@@ -122,6 +122,7 @@ SUPPORTS_STOP_WORDS_FALSE_PATTERNS: list[str] = [
'o1*',
# grok-4 specific model name (basename)
'grok-4-0709',
+ 'grok-code-fast-1',
# DeepSeek R1 family
'deepseek-r1-0528*',
]
diff --git a/tests/unit/llm/test_model_features.py b/tests/unit/llm/test_model_features.py
index 35aae2b248..8424268fdd 100644
--- a/tests/unit/llm/test_model_features.py
+++ b/tests/unit/llm/test_model_features.py
@@ -286,6 +286,8 @@ def test_prompt_cache_haiku_variants():
def test_stop_words_grok_provider_prefixed():
assert get_features('xai/grok-4-0709').supports_stop_words is False
assert get_features('grok-4-0709').supports_stop_words is False
+ assert get_features('xai/grok-code-fast-1').supports_stop_words is False
+ assert get_features('grok-code-fast-1').supports_stop_words is False
@pytest.mark.parametrize(
@@ -294,6 +296,7 @@ def test_stop_words_grok_provider_prefixed():
'o1-mini',
'o1-2024-12-17',
'xai/grok-4-0709',
+ 'xai/grok-code-fast-1',
'deepseek/DeepSeek-R1-0528:671b-Q4_K_XL',
'DeepSeek-R1-0528',
],