File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { PATHS } from "./paths"
66export interface AppConfig {
77 extraPrompts ?: Record < string , string >
88 smallModel ?: string
9+ modelReasoningEfforts ?: Record < string , "minimal" | "low" | "medium" | "high" >
910}
1011
1112const defaultConfig : AppConfig = {
@@ -29,6 +30,9 @@ When using the TodoWrite tool, follow these rules:
2930` ,
3031 } ,
3132 smallModel : "gpt-5-mini" ,
33+ modelReasoningEfforts : {
34+ "gpt-5-mini" : "low" ,
35+ } ,
3236}
3337
3438let cachedConfig : AppConfig | null = null
@@ -71,7 +75,7 @@ function readConfigFromDisk(): AppConfig {
7175
7276export function getConfig ( ) : AppConfig {
7377 if ( ! cachedConfig ) {
74- cachedConfig = readConfigFromDisk ( )
78+ cachedConfig ?? = readConfigFromDisk ( )
7579 }
7680 return cachedConfig
7781}
@@ -85,3 +89,10 @@ export function getSmallModel(): string {
8589 const config = getConfig ( )
8690 return config . smallModel ?? "gpt-5-mini"
8791}
92+
93+ export function getReasoningEffortForModel (
94+ model : string ,
95+ ) : "minimal" | "low" | "medium" | "high" {
96+ const config = getConfig ( )
97+ return config . modelReasoningEfforts ?. [ model ] ?? "high"
98+ }
Original file line number Diff line number Diff line change 11import consola from "consola"
22
3- import { getExtraPromptForModel } from "~/lib/config"
3+ import {
4+ getExtraPromptForModel ,
5+ getReasoningEffortForModel ,
6+ } from "~/lib/config"
47import {
58 type ResponsesPayload ,
69 type ResponseInputContent ,
@@ -73,7 +76,10 @@ export const translateAnthropicMessagesToResponsesPayload = (
7376 stream : payload . stream ?? null ,
7477 store : false ,
7578 parallel_tool_calls : true ,
76- reasoning : { effort : "high" , summary : "detailed" } ,
79+ reasoning : {
80+ effort : getReasoningEffortForModel ( payload . model ) ,
81+ summary : "detailed" ,
82+ } ,
7783 include : [ "reasoning.encrypted_content" ] ,
7884 }
7985
You can’t perform that action at this time.
0 commit comments