Skip to content

Conversation

@rpanackal
Copy link
Member

Context

AI/ai-sdk-java-backlog#350.

PoC for supporting the latest SAP RPT (Tabular AI) service

Feature scope:

  • New foundationmodels module sap-rpt introduced
  • Using spec obtained from sap-rpt-1-public-content
  • Unit tests and e2e test in place
  • Introduce new RptClient and RptModel class

Definition of Done

  • Functionality scope stated & covered
  • Tests cover the scope above
  • Error handling created / updated & covered by the tests above
  • Aligned changes with the JavaScript SDK
  • Documentation updated
  • Release notes updated

@rpanackal
Copy link
Member Author

rpanackal commented Jan 23, 2026

PoC RPT

Important Mentions:

  • The PoC do not support operation on path /predict_parquet for now. I have explicitly disabled this in pom.xml

    1. There is no documentation about endpoint.

    2. The related spec is poorly defined for generation strategy. The prediction_config field in request payload is defined as type string but it should be a JSON of schema PredictionConfig. So, currently, we can't offer any type safety without adding convenience layer on top.

      Note: The exclusion of path /predict_parquet does not exclude generation of model classes used by the path eg: BodyPredictParquet.

  • The provided spec file defines components with dynamic properties which vary based on input column names. Example below.

    Column in Request Payload
    {
      "columns": {
        "anyOf": [
          {
            "additionalProperties": {
              "items": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": "array"
            },
            "type": "object"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "Alternative to rows: columns of data where each key is a column name and the value is a list of all column values. Either \"rows\" or \"columns\" must be provided.",
        "title": "Columns"
      }
    }
  • Some confusing bits in the latest spec (its still beta anyway)

    • Incorrect use of anyOf, for example "columns" field in request, "prediction" field in response. Should have been a oneOf
    • Description states that either rows or columns must be provided on request which sounds like another oneOf usecase, but current schema allow both to be null.
    • Fields that can be omitted are given a default value of null to indicate optionality.

@rpanackal rpanackal added please-review Request to review a pull-request dont-merge labels Jan 23, 2026
@rpanackal rpanackal self-assigned this Jan 23, 2026
import lombok.AccessLevel;
import lombok.RequiredArgsConstructor;
import lombok.val;
import org.springframework.http.client.BufferingClientHttpRequestFactory;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Question)

Can we use the new generator without spring dependencies?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I am working on the related cloud sdk item to fix spring optionality first. Then, later make use of the same in the new module client

<module>core-services/document-grounding</module>
<module>core-services/prompt-registry</module>
<module>foundation-models/openai</module>
<module>foundation-models/sap-rpt</module>
Copy link
Contributor

@newtork newtork Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Major)

The PR title says "PoC", therefore the module shouldn't be released at this level of confidence.

E.g.

    <profile>
      <id>non-release</id>
      <activation>
        <property>
          <name>!release</name>
        </property>
      </activation>
      <modules>
        <module>sample-code/spring-app</module>
+       <module>foundation-models/sap-rpt</module>
      </modules>
    </profile>

*
* <p>A REST API for in-context learning with the SAP-RPT-1 model.
*/
public class DefaultApi extends AbstractOpenApiService {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the spec is currently missing a tag, so the generated api class gets a default name DefaultApi.

Copy link
Member

@Jonas-Isr Jonas-Isr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly minor issues. Looks pretty good :)

*
* <p>A REST API for in-context learning with the SAP-RPT-1 model.
*/
public class DefaultApi extends AbstractOpenApiService {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Minor/Question)

This is a very non-descriptive class name (which does not come from the spec itself as far as I can see). Does it make sense to rename that when generating?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dont-merge please-review Request to review a pull-request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants