fix(chat-params): guard non-positive max output tokens

This commit is contained in:
YeonGyu-Kim
2026-05-10 15:03:01 +09:00
parent 50699e3af1
commit 279f0d150f
4 changed files with 56 additions and 3 deletions
@@ -162,6 +162,10 @@ export function resolveCompatibleModelSettings(
}
let maxTokens = input.desired.maxTokens
if (maxTokens !== undefined && maxTokens <= 0) {
maxTokens = undefined
}
if (
maxTokens !== undefined &&
input.capabilities?.maxOutputTokens !== undefined &&