feat: native SAP AI Core support (eliminate proxy dependency) #49

Closed
opened 2026-05-09 00:00:30 +00:00 by rodin · 0 comments
Owner

Problem

review-bot currently requires an external proxy (hai-aicore or hai) to access SAP AI Core models. This adds:

  • Deployment complexity (proxy must run on CI runner or be network-accessible)
  • Additional failure point
  • Network latency

Proposed Solution

Add native AI Core authentication and request handling directly in review-bot:

  1. New llm-provider: aicore option
  2. Accept AI Core credentials via inputs:
    • aicore-client-id
    • aicore-client-secret
    • aicore-auth-url
    • aicore-api-url
    • aicore-resource-group
  3. Handle OAuth token fetch internally
  4. Route to appropriate deployment endpoint based on model name

Reference Implementation

hai-aicore shows the pattern:

  • Token fetch via XSUAA OAuth
  • Deployment lookup via /v2/lm/deployments
  • Anthropic models: {deploymentUrl}/invoke with Bedrock format
  • OpenAI models: {deploymentUrl}/chat/completions?api-version=2024-12-01-preview

Benefits

  • Self-contained action, no external dependencies
  • Simpler CI setup (just secrets, no proxy service)
  • Reduced latency
  • Easier to maintain and debug
## Problem review-bot currently requires an external proxy (hai-aicore or hai) to access SAP AI Core models. This adds: - Deployment complexity (proxy must run on CI runner or be network-accessible) - Additional failure point - Network latency ## Proposed Solution Add native AI Core authentication and request handling directly in review-bot: 1. New `llm-provider: aicore` option 2. Accept AI Core credentials via inputs: - `aicore-client-id` - `aicore-client-secret` - `aicore-auth-url` - `aicore-api-url` - `aicore-resource-group` 3. Handle OAuth token fetch internally 4. Route to appropriate deployment endpoint based on model name ## Reference Implementation [hai-aicore](https://github.tools.sap/I819451/hai-aicore) shows the pattern: - Token fetch via XSUAA OAuth - Deployment lookup via `/v2/lm/deployments` - Anthropic models: `{deploymentUrl}/invoke` with Bedrock format - OpenAI models: `{deploymentUrl}/chat/completions?api-version=2024-12-01-preview` ## Benefits - Self-contained action, no external dependencies - Simpler CI setup (just secrets, no proxy service) - Reduced latency - Easier to maintain and debug
rodin closed this issue 2026-05-10 20:03:32 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rodin/review-bot#49