Revert "Support OpenAI o3 and o4-mini"

This commit is contained in:
twfz7
2025-04-25 09:01:12 +08:00
committed by GitHub
parent 3809375694
commit 0c91604765
2 changed files with 2 additions and 7 deletions

View File

@@ -198,8 +198,7 @@ export class ChatGPTApi implements LLMApi {
const isDalle3 = _isDalle3(options.config.model);
const isO1OrO3 =
options.config.model.startsWith("o1") ||
options.config.model.startsWith("o3") ||
options.config.model.startsWith("o4-mini");
options.config.model.startsWith("o3");
if (isDalle3) {
const prompt = getMessageTextContent(
options.messages.slice(-1)?.pop() as any,
@@ -244,7 +243,7 @@ export class ChatGPTApi implements LLMApi {
}
// add max_tokens to vision model
if (visionModel && !isO1OrO3) {
if (visionModel) {
requestPayload["max_tokens"] = Math.max(modelConfig.max_tokens, 4000);
}
}