From ebcf99f1d7ded70823ee8144f70e93f67b25129e Mon Sep 17 00:00:00 2001 From: sigoden Date: Fri, 14 Feb 2025 17:44:59 +0800 Subject: feat: abandon model field `supports_reasoning` (revert #1145) (#1173) --- src/client/model.rs | 10 ---------- src/client/openai.rs | 3 --- 2 files changed, 13 deletions(-) (limited to 'src/client') diff --git a/src/client/model.rs b/src/client/model.rs index 82e2252..20996b8 100644 --- a/src/client/model.rs +++ b/src/client/model.rs @@ -136,7 +136,6 @@ impl Model { output_price, supports_vision, supports_function_calling, - supports_reasoning, .. } = &self.data; let max_input_tokens = stringify_option_value(max_input_tokens); @@ -150,9 +149,6 @@ impl Model { if *supports_function_calling { capabilities.push('⚒'); }; - if *supports_reasoning { - capabilities.push('💭'); - } let capabilities: String = capabilities .into_iter() .map(|v| format!("{v} ")) @@ -191,10 +187,6 @@ impl Model { self.data.max_output_tokens } - pub fn supports_reasoning(&self) -> bool { - self.data.supports_reasoning - } - pub fn no_stream(&self) -> bool { self.data.no_stream } @@ -327,8 +319,6 @@ pub struct ModelData { #[serde(default, skip_serializing_if = "std::ops::Not::not")] pub supports_function_calling: bool, #[serde(default, skip_serializing_if = "std::ops::Not::not")] - supports_reasoning: bool, - #[serde(default, skip_serializing_if = "std::ops::Not::not")] no_stream: bool, #[serde(default, skip_serializing_if = "std::ops::Not::not")] no_system_message: bool, diff --git a/src/client/openai.rs b/src/client/openai.rs index 975afd7..6d57d42 100644 --- a/src/client/openai.rs +++ b/src/client/openai.rs @@ -301,9 +301,6 @@ pub fn openai_build_chat_completions_body(data: ChatCompletionsData, model: &Mod if let Some(v) = model.max_tokens_param() { body["max_tokens"] = v.into(); } - if model.client_name().starts_with("openrouter") && model.supports_reasoning() { - body["include_reasoning"] = true.into(); - } if let Some(v) = temperature { body["temperature"] = v.into(); } -- cgit v1.2.3