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, }, ],