fix: Allow port 443 to be used with https (ollama provider) (#1052)

This commit is contained in:
Jeremy Collins
2025-02-03 20:43:45 -05:00
committed by GitHub
parent a515d928ab
commit c9c03222d1
+2 -1
View File
@@ -65,7 +65,8 @@ impl OllamaProvider {
.map_err(|e| ProviderError::RequestFailed(format!("Invalid base URL: {e}")))?;
// Set the default port if missing
if base_url.port().is_none() {
let explicit_default_port = self.host.ends_with(":80") || self.host.ends_with(":443");
if base_url.port().is_none() && !explicit_default_port {
base_url.set_port(Some(OLLAMA_DEFAULT_PORT)).map_err(|_| {
ProviderError::RequestFailed("Failed to set default port".to_string())
})?;