fix: unblock acp via databricks (#5562)
This commit is contained in:
@@ -152,28 +152,24 @@ 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 models.contains(&DATABRICKS_DEFAULT_FAST_MODEL.to_string()) {
|
||||||
if let Ok(Some(models)) = provider.fetch_supported_models().await {
|
tracing::debug!(
|
||||||
if models.contains(&DATABRICKS_DEFAULT_FAST_MODEL.to_string()) {
|
"Found {} in Databricks workspace, setting as fast model",
|
||||||
tracing::debug!(
|
DATABRICKS_DEFAULT_FAST_MODEL
|
||||||
"Found {} in Databricks workspace, setting as fast model",
|
);
|
||||||
DATABRICKS_DEFAULT_FAST_MODEL
|
model.with_fast(DATABRICKS_DEFAULT_FAST_MODEL.to_string())
|
||||||
);
|
} else {
|
||||||
model.with_fast(DATABRICKS_DEFAULT_FAST_MODEL.to_string())
|
tracing::debug!(
|
||||||
} else {
|
"{} not found in Databricks workspace, not setting fast model",
|
||||||
tracing::debug!(
|
DATABRICKS_DEFAULT_FAST_MODEL
|
||||||
"{} not found in Databricks workspace, not setting fast model",
|
);
|
||||||
DATABRICKS_DEFAULT_FAST_MODEL
|
model
|
||||||
);
|
}
|
||||||
model
|
} else {
|
||||||
}
|
tracing::debug!("Could not fetch Databricks models, not setting fast model");
|
||||||
} else {
|
model
|
||||||
tracing::debug!("Could not fetch Databricks models, not setting fast model");
|
};
|
||||||
model
|
|
||||||
}
|
|
||||||
})
|
|
||||||
});
|
|
||||||
|
|
||||||
provider.model = model_with_fast;
|
provider.model = model_with_fast;
|
||||||
Ok(provider)
|
Ok(provider)
|
||||||
|
|||||||
Reference in New Issue
Block a user