Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/api/providers/openai-native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ export class OpenAiNativeHandler extends BaseProvider implements SingleCompletio
strict?: boolean
}>
tool_choice?: any
parallel_tool_calls?: boolean
}

// Validate requested tier against model support; if not supported, omit.
Expand Down Expand Up @@ -302,6 +303,12 @@ export class OpenAiNativeHandler extends BaseProvider implements SingleCompletio
...(metadata?.tool_choice && { tool_choice: metadata.tool_choice }),
}

// For native tool protocol, explicitly disable parallel tool calls.
// For XML or when protocol is unset, omit the field entirely so the API default applies.
if (metadata?.toolProtocol === "native") {
body.parallel_tool_calls = false
}

// Include text.verbosity only when the model explicitly supports it
if (model.info.supportsVerbosity === true) {
body.text = { verbosity: (verbosity || "medium") as VerbosityLevel }
Expand Down
Loading