Merge pull request #3914 from code-yeongyu/fix/max-output-tokens
fix: prevent non-positive maxOutputTokens from leaking to SDK
This commit is contained in:
@@ -175,6 +175,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