Skip to content

Commit 50d3825

Browse files
author
AlexandruSmirnov
committed
fix: remove unnecessary 'as any' type cast from max_completion_tokens assignment
1 parent 173883d commit 50d3825

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/api/providers/openai.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ export class OpenAiHandler extends BaseProvider implements SingleCompletionHandl
399399
if (this.options.includeMaxTokens === true) {
400400
// Use user-configured modelMaxTokens if available, otherwise fall back to model's default maxTokens
401401
// Using max_completion_tokens as max_tokens is deprecated
402-
;(requestOptions as any).max_completion_tokens = this.options.modelMaxTokens || modelInfo.maxTokens
402+
requestOptions.max_completion_tokens = this.options.modelMaxTokens || modelInfo.maxTokens
403403
}
404404
}
405405
}

0 commit comments

Comments
 (0)