Skip to content

Commit d608708

Browse files
enystadityasoni9998
authored andcommitted
OpenAI models fixes (All-Hands-AI#7045)
1 parent f73edd7 commit d608708

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

openhands/llm/llm.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@
7676
MODELS_WITHOUT_STOP_WORDS = [
7777
'o1-mini',
7878
'o1-preview',
79+
'o1',
80+
'o1-2024-12-17',
7981
]
8082

8183

@@ -217,9 +219,8 @@ def wrapper(*args, **kwargs):
217219
kwargs['stop'] = STOP_WORDS
218220

219221
mock_fncall_tools = kwargs.pop('tools')
220-
kwargs['tool_choice'] = (
221-
'none' # force no tool calling because we're mocking it - without it, it will cause issue with sglang
222-
)
222+
# tool_choice should not be specified when mocking function calling
223+
kwargs.pop('tool_choice', None)
223224

224225
# if we have no messages, something went very wrong
225226
if not messages:

0 commit comments

Comments
 (0)