diff --git a/src/agent/modify.ts b/src/agent/modify.ts index e89283e..ad47c39 100644 --- a/src/agent/modify.ts +++ b/src/agent/modify.ts @@ -64,6 +64,9 @@ function buildModelSettings( // client type may lag this field, so set it via a narrow record cast. (openaiSettings as Record).verbosity = verbosity; } + if (typeof updateArgs?.strict === "boolean") { + openaiSettings.strict = updateArgs.strict; + } settings = openaiSettings; } else if (isAnthropic) { const anthropicSettings: AnthropicModelSettings = { @@ -90,6 +93,9 @@ function buildModelSettings( }), }; } + if (typeof updateArgs?.strict === "boolean") { + (anthropicSettings as Record).strict = updateArgs.strict; + } settings = anthropicSettings; } else if (isZai) { // Zai uses the same model_settings structure as other providers. @@ -162,6 +168,9 @@ function buildModelSettings( ? updateArgs.parallel_tool_calls : true, }; + if (typeof updateArgs?.strict === "boolean") { + (settings as Record).strict = updateArgs.strict; + } } // Apply max_output_tokens only when provider_type is present and the value