adding support for moonshot and z-ai (#578)

* adding support for moonshot and z-ai

* Revert unwanted changes to arch_config.yaml

---------

Co-authored-by: Salman Paracha <salmanparacha@MacBook-Pro-288.local>
This commit is contained in:
Salman Paracha 2025-09-30 12:24:06 -07:00 committed by GitHub
parent 7df1b8cdb0
commit 045a5e9751
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 186 additions and 22 deletions

View file

@ -175,6 +175,10 @@ pub enum LlmProviderType {
AzureOpenAI,
#[serde(rename = "ollama")]
Ollama,
#[serde(rename = "moonshotai")]
Moonshotai,
#[serde(rename = "zhipu")]
Zhipu,
}
impl Display for LlmProviderType {
@ -191,6 +195,8 @@ impl Display for LlmProviderType {
LlmProviderType::TogetherAI => write!(f, "together_ai"),
LlmProviderType::AzureOpenAI => write!(f, "azure_openai"),
LlmProviderType::Ollama => write!(f, "ollama"),
LlmProviderType::Moonshotai => write!(f, "moonshotai"),
LlmProviderType::Zhipu => write!(f, "zhipu"),
}
}
}
@ -242,7 +248,7 @@ impl IntoModels for Vec<LlmProvider> {
.iter()
.map(|provider| ModelDetail {
id: provider.name.clone(),
object: "model".to_string(),
object: Some("model".to_string()),
created: 0,
owned_by: "system".to_string(),
})