fix(chat-params): guard non-positive max output tokens
This commit is contained in:
@@ -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 &&
|
||||
|
||||
Reference in New Issue
Block a user