Future-proofing

This commit is contained in:
Cohee 2025-01-31 22:48:04 +02:00
parent 2b98e96784
commit 6180210170

View File

@ -1107,7 +1107,7 @@ router.post('/generate', jsonParser, function (request, response) {
...bodyParams,
};
if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.OPENAI && String(requestBody.model).startsWith('o3-')) {
if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.OPENAI && String(requestBody.model).startsWith('o3')) {
delete requestBody.max_tokens;
}