use provider_name as model_id /v1/models api (#490)

This commit is contained in:
Adil Hafeez 2025-05-29 11:23:18 -07:00 committed by GitHub
parent 9c4733590f
commit 470cdf9843
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -448,9 +448,9 @@ impl From<Vec<LlmProvider>> for Models {
let data = llm_providers
.iter()
.map(|provider| ModelDetail {
id: provider.model.as_ref().unwrap().clone(),
id: provider.name.clone(),
object: "model".to_string(),
created: 1721172741,
created: 0,
owned_by: "system".to_string(),
})
.collect();