Skip to content

Commit 2c310cb

Browse files
committed
fix: remove extraneous reasoning
1 parent 7896b10 commit 2c310cb

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

codex-rs/core/src/client.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,21 @@ impl ModelClient {
9898

9999
let full_instructions = prompt.get_full_instructions();
100100
let tools_json = create_tools_json_for_responses_api(prompt, &self.model)?;
101+
let mut reasoning: Option<Reasoning> = None;
102+
if self.model.starts_with("o") || self.model.starts_with("codex") {
103+
reasoning = Some(Reasoning {
104+
effort: "high",
105+
summary: Some(Summary::Auto),
106+
});
107+
}
101108
let payload = Payload {
102109
model: &self.model,
103110
instructions: &full_instructions,
104111
input: &prompt.input,
105112
tools: &tools_json,
106113
tool_choice: "auto",
107114
parallel_tool_calls: false,
108-
reasoning: Some(Reasoning {
109-
effort: "high",
110-
summary: Some(Summary::Auto),
111-
}),
115+
reasoning,
112116
previous_response_id: prompt.prev_id.clone(),
113117
store: prompt.store,
114118
stream: true,

0 commit comments

Comments
 (0)