feat: add strict to update args (#1358)

This commit is contained in:
cthomas
2026-03-11 16:46:18 -07:00
committed by GitHub
parent 2cf6de9813
commit d9eaa74ad6

View File

@@ -64,6 +64,9 @@ function buildModelSettings(
// client type may lag this field, so set it via a narrow record cast.
(openaiSettings as Record<string, unknown>).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<string, unknown>).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<string, unknown>).strict = updateArgs.strict;
}
}
// Apply max_output_tokens only when provider_type is present and the value