fix: unblock acp via databricks (#5562)

This commit is contained in:
Alex Hancock
2025-11-04 11:40:05 -05:00
committed by GitHub
parent d4a7bd39be
commit b5eaa6a3e4
+2 -6
View File
@@ -152,9 +152,7 @@ impl DatabricksProvider {
}; };
// Check if the default fast model exists in the workspace // Check if the default fast model exists in the workspace
let model_with_fast = tokio::task::block_in_place(|| { let model_with_fast = if let Ok(Some(models)) = provider.fetch_supported_models().await {
tokio::runtime::Handle::current().block_on(async {
if let Ok(Some(models)) = provider.fetch_supported_models().await {
if models.contains(&DATABRICKS_DEFAULT_FAST_MODEL.to_string()) { if models.contains(&DATABRICKS_DEFAULT_FAST_MODEL.to_string()) {
tracing::debug!( tracing::debug!(
"Found {} in Databricks workspace, setting as fast model", "Found {} in Databricks workspace, setting as fast model",
@@ -171,9 +169,7 @@ impl DatabricksProvider {
} else { } else {
tracing::debug!("Could not fetch Databricks models, not setting fast model"); tracing::debug!("Could not fetch Databricks models, not setting fast model");
model model
} };
})
});
provider.model = model_with_fast; provider.model = model_with_fast;
Ok(provider) Ok(provider)