summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2025-02-14 17:44:59 +0800
committerGitHub <noreply@github.com>2025-02-14 17:44:59 +0800
commitebcf99f1d7ded70823ee8144f70e93f67b25129e (patch)
tree60ddbe3b4039c40e6cb7b1dfa20825633c38c9e4 /src
parent5eebd47bc309d98bf4781b2df4532e63bf8d9c70 (diff)
downloadaichat-ebcf99f1d7ded70823ee8144f70e93f67b25129e.tar.gz
feat: abandon model field `supports_reasoning` (revert #1145) (#1173)
Diffstat (limited to 'src')
-rw-r--r--src/client/model.rs10
-rw-r--r--src/client/openai.rs3
2 files changed, 0 insertions, 13 deletions
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();
}