modify name from deepseek chat/reasoner -> v3.1/v3.1(think)

This commit is contained in:
shenjack 2025-08-25 20:07:47 +08:00
parent d3762ef285
commit 5d433cbaa1
3 changed files with 14 additions and 14 deletions

View file

@ -48,10 +48,10 @@ impl From<Role> for String {
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
#[derive(Clone, Debug, Default, Serialize, Deserialize, PartialEq)]
pub enum Model {
#[serde(rename = "deepseek-chat")]
#[serde(rename = "deepseek-v3.1")]
#[default]
Chat,
#[serde(rename = "deepseek-reasoner")]
#[serde(rename = "deepseek-v3.1(think)")]
Reasoner,
#[serde(rename = "custom")]
Custom {
@ -70,24 +70,24 @@ impl Model {
pub fn from_id(id: &str) -> Result<Self> {
match id {
"deepseek-chat" => Ok(Self::Chat),
"deepseek-reasoner" => Ok(Self::Reasoner),
"deepseek-v3.1" => Ok(Self::Chat),
"deepseek-v3.1(think)" => Ok(Self::Reasoner),
_ => anyhow::bail!("invalid model id {id}"),
}
}
pub fn id(&self) -> &str {
match self {
Self::Chat => "deepseek-chat",
Self::Reasoner => "deepseek-reasoner",
Self::Chat => "deepseek-v3.1",
Self::Reasoner => "deepseek-v3.1(think)",
Self::Custom { name, .. } => name,
}
}
pub fn display_name(&self) -> &str {
match self {
Self::Chat => "DeepSeek Chat",
Self::Reasoner => "DeepSeek Reasoner",
Self::Chat => "DeepSeek V3.1",
Self::Reasoner => "DeepSeek V3.1 (think)",
Self::Custom {
name, display_name, ..
} => display_name.as_ref().unwrap_or(name).as_str(),

View file

@ -196,8 +196,8 @@ impl LanguageModelProvider for DeepSeekLanguageModelProvider {
fn provided_models(&self, cx: &App) -> Vec<Arc<dyn LanguageModel>> {
let mut models = BTreeMap::default();
models.insert("deepseek-chat", deepseek::Model::Chat);
models.insert("deepseek-reasoner", deepseek::Model::Reasoner);
models.insert("deepseek-v3.1", deepseek::Model::Chat);
models.insert("deepseek-v3.1(think)", deepseek::Model::Reasoner);
for available_model in AllLanguageModelSettings::get_global(cx)
.deepseek

View file

@ -183,13 +183,13 @@ If you wish to use alternate models or customize the API endpoint, you can do so
"api_url": "https://api.deepseek.com",
"available_models": [
{
"name": "deepseek-chat",
"display_name": "DeepSeek Chat",
"name": "deepseek-v3.1",
"display_name": "DeepSeek V3.1",
"max_tokens": 64000
},
{
"name": "deepseek-reasoner",
"display_name": "DeepSeek Reasoner",
"name": "deepseek-v3.1(think)",
"display_name": "DeepSeek V3.1(think)",
"max_tokens": 64000,
"max_output_tokens": 4096
}