From 5694934183a12ce62bcfae55bcfff9ca1c522443 Mon Sep 17 00:00:00 2001 From: Will Chen Date: Tue, 17 Jun 2025 10:31:24 -0700 Subject: [PATCH] Lower o3/o4 mini max output tokens to maximize input tokens (#424) --- src/ipc/shared/language_model_helpers.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ipc/shared/language_model_helpers.ts b/src/ipc/shared/language_model_helpers.ts index b9dfe48..1a1097d 100644 --- a/src/ipc/shared/language_model_helpers.ts +++ b/src/ipc/shared/language_model_helpers.ts @@ -44,7 +44,8 @@ export const MODEL_OPTIONS: Record = { name: "o3-mini", displayName: "o3 mini", description: "Reasoning model", - maxOutputTokens: 100_000, + // See o4-mini comment below for why we set this to 32k + maxOutputTokens: 32_000, contextWindow: 200_000, }, // https://platform.openai.com/docs/models/o4-mini @@ -52,7 +53,10 @@ export const MODEL_OPTIONS: Record = { name: "o4-mini", displayName: "o4 mini", description: "Reasoning model", - maxOutputTokens: 100_000, + // Technically the max output tokens is 100k, *however* if the user has a lot of input tokens, + // then setting a high max output token will cause the request to fail because + // the max output tokens is *included* in the context window limit. + maxOutputTokens: 32_000, contextWindow: 200_000, }, ],