File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -244,6 +244,7 @@ export class OpenAiNativeHandler extends BaseProvider implements SingleCompletio
244244 strict ?: boolean
245245 } >
246246 tool_choice ?: any
247+ parallel_tool_calls ?: boolean
247248 }
248249
249250 // Validate requested tier against model support; if not supported, omit.
@@ -302,6 +303,12 @@ export class OpenAiNativeHandler extends BaseProvider implements SingleCompletio
302303 ...( metadata ?. tool_choice && { tool_choice : metadata . tool_choice } ) ,
303304 }
304305
306+ // For native tool protocol, explicitly disable parallel tool calls.
307+ // For XML or when protocol is unset, omit the field entirely so the API default applies.
308+ if ( metadata ?. toolProtocol === "native" ) {
309+ body . parallel_tool_calls = false
310+ }
311+
305312 // Include text.verbosity only when the model explicitly supports it
306313 if ( model . info . supportsVerbosity === true ) {
307314 body . text = { verbosity : ( verbosity || "medium" ) as VerbosityLevel }
You can’t perform that action at this time.
0 commit comments