Don't send max_tokens to o3
| @@ -1107,6 +1107,10 @@ router.post('/generate', jsonParser, function (request, response) { | ||
| 1107 | 1107 | ...bodyParams, |
| 1108 | 1108 | }; |
| 1109 | 1109 | |
| 1110 | + if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.OPENAI && String(requestBody.model).startsWith('o3-')) { | |
| 1111 | + delete requestBody.max_tokens; | |
| 1112 | + } | |
| 1113 | + | |
| 1110 | 1114 | if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.CUSTOM) { |
| 1111 | 1115 | excludeKeysByYaml(requestBody, request.body.custom_exclude_body); |
| 1112 | 1116 | } |