Skip to content

πŸ™Œ OpenHands: AI-Driven Development

Update OpenAI model selection for better agentic coding support (#9597)

Eleanor Bergerd04c4c493eea
diff --git a/frontend/src/utils/verified-models.ts b/frontend/src/utils/verified-models.ts
index 0c7dfb6d9e..af7dd51de4 100644
--- a/frontend/src/utils/verified-models.ts
+++ b/frontend/src/utils/verified-models.ts
@@ -16,17 +16,15 @@ export const VERIFIED_MODELS = [
export const VERIFIED_OPENAI_MODELS = [
"gpt-4o",
"gpt-4o-mini",
- "gpt-4-turbo",
- "gpt-4",
"gpt-4-32k",
+ "gpt-4.1",
+ "gpt-4.1-2025-04-14",
"o1-mini",
- "o1",
"o3",
"o3-2025-04-16",
- "o3-mini",
- "o3-mini-2025-01-31",
"o4-mini",
"o4-mini-2025-04-16",
+ "codex-mini-latest",
];
// LiteLLM does not return the compatible Anthropic models with the provider, so we list them here to set them ourselves
diff --git a/openhands/cli/utils.py b/openhands/cli/utils.py
index a88f76585a..cb21487bab 100644
--- a/openhands/cli/utils.py
+++ b/openhands/cli/utils.py
@@ -151,13 +151,12 @@ VERIFIED_OPENAI_MODELS = [
'o4-mini',
'gpt-4o',
'gpt-4o-mini',
- 'gpt-4-turbo',
- 'gpt-4',
'gpt-4-32k',
+ 'gpt-4.1',
+ 'gpt-4.1-2025-04-14',
'o1-mini',
- 'o1',
- 'o3-mini',
- 'o3-mini-2025-01-31',
+ 'o3',
+ 'codex-mini-latest',
]
VERIFIED_ANTHROPIC_MODELS = [
diff --git a/tests/unit/test_cli_utils.py b/tests/unit/test_cli_utils.py
index 26fb011630..b34f351fb7 100644
--- a/tests/unit/test_cli_utils.py
+++ b/tests/unit/test_cli_utils.py
@@ -397,7 +397,7 @@ class TestModelAndProviderFunctions:
models = [
'openai/gpt-4o',
'anthropic/claude-sonnet-4-20250514',
- 'o3-mini',
+ 'o3',
'o4-mini',
'devstral-small-2505',
'mistral/devstral-small-2505',
@@ -414,7 +414,7 @@ class TestModelAndProviderFunctions:
assert len(result['openai']['models']) == 3
assert 'gpt-4o' in result['openai']['models']
- assert 'o3-mini' in result['openai']['models']
+ assert 'o3' in result['openai']['models']
assert 'o4-mini' in result['openai']['models']
assert len(result['anthropic']['models']) == 1