Skip to content

Commit

Permalink
Add Workaround for backend_details change (#60)
Browse files Browse the repository at this point in the history
* Add Workaround for backend_details change

* Update core/src/main/java/com/sap/ai/sdk/core/Core.java

Co-authored-by: Charles Dubois <[email protected]>

* Update core/src/main/java/com/sap/ai/sdk/core/Core.java

* remove link

* Remove todo

---------

Co-authored-by: Charles Dubois <[email protected]>
  • Loading branch information
MatKuhr and CharlesDuboisSAP authored Sep 19, 2024
1 parent 19d0f0b commit 5ea851a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions core/src/main/java/com/sap/ai/sdk/core/Core.java
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,14 @@ private static boolean isDeploymentOfModel(
if (resources == null) {
return false;
}
if (!resources.getCustomFieldNames().contains("backend_details")) {
return false;
Object detailsObject = resources.getBackendDetails();
// workaround for AIWDF-2124
if (detailsObject == null) {
if (!resources.getCustomFieldNames().contains("backend_details")) {
return false;
}
detailsObject = resources.getCustomField("backend_details");
}
final var detailsObject = resources.getCustomField("backend_details");

if (detailsObject instanceof Map<?, ?> details
&& details.get("model") instanceof Map<?, ?> model
Expand Down

0 comments on commit 5ea851a

Please sign in to comment.