feat(providers/ollama): add variant support, retryable tag fetching with CLI fallback, and configurable provider name for robust model listing and health checks

This commit is contained in:
2025-10-18 05:59:50 +02:00
parent 4ce4ac0b0e
commit 3308b483f7
4 changed files with 682 additions and 88 deletions

View File

@@ -127,12 +127,13 @@ fn provider_from_config() -> Result<Arc<dyn Provider>, RpcError> {
match provider_cfg.provider_type.as_str() {
"ollama" | "ollama_cloud" => {
let provider = OllamaProvider::from_config(&provider_cfg, Some(&config.general))
.map_err(|e| {
RpcError::internal_error(format!(
"Failed to init Ollama provider from config: {e}"
))
})?;
let provider =
OllamaProvider::from_config(&provider_key, &provider_cfg, Some(&config.general))
.map_err(|e| {
RpcError::internal_error(format!(
"Failed to init Ollama provider from config: {e}"
))
})?;
Ok(Arc::new(provider) as Arc<dyn Provider>)
}
other => Err(RpcError::internal_error(format!(