Compare commits

..

4 Commits

Author SHA1 Message Date
Rodin 4931481a63 docs: update README with AI Core configuration
CI / test (pull_request) Successful in 15s
CI / review (anthropic--claude-4.6-sonnet, sonnet, SONNET_REVIEW_TOKEN) (pull_request) Successful in 34s
CI / review (gpt-5, security, SECURITY_REVIEW.md, SECURITY_REVIEW_TOKEN) (pull_request) Successful in 1m40s
CI / review (gpt-5, gpt, GPT_REVIEW_TOKEN) (pull_request) Successful in 1m45s
2026-05-10 01:03:04 -07:00
Rodin 00c363a244 ci: switch to native AI Core provider
- Remove HAI proxy dependency
- Use aicore provider with secrets
- Update model names to AI Core format (anthropic--claude-4.6-sonnet)
2026-05-10 01:02:59 -07:00
Rodin b1fdc35f70 feat: integrate AI Core client with review-bot
Adds aicore provider option that uses native SAP AI Core instead of
OpenAI-compatible proxy. Configurable via:
- AICORE_CLIENT_ID
- AICORE_CLIENT_SECRET
- AICORE_AUTH_URL
- AICORE_API_URL
- AICORE_RESOURCE_GROUP
2026-05-10 01:02:54 -07:00
Rodin b62b52aab1 feat: add SAP AI Core client for Anthropic models
Implements native AI Core support with:
- OAuth2 token refresh
- Deployment discovery via /v2/lm/deployments
- Anthropic Messages API via /invoke endpoint
- Uses bedrock-2023-05-31 API version (AI Core uses Bedrock format)
- Model field omitted from body (deployment URL specifies model)
- Retry logic with exponential backoff

Tested via integration tests against live AI Core endpoint.
2026-05-10 01:02:48 -07:00
-19
View File
@@ -1,19 +0,0 @@
## Self-Review: feat/aicore-provider — 2026-05-09
### Verdict: PASS
No blocking issues found — ready for human review.
#### Notes (informational, not blocking)
**[fit]** `staticcheck` reports:
- `llm/aicore.go:237` and `llm/client.go:231`: struct literal conversion style (S1016) — minor style nit, existing in both old and new code
- `gitea/diff.go:78`: HasPrefix return ignored (SA4017) — pre-existing, not introduced by this PR
- `cmd/review-bot/main_test.go:347`: nil Context (SA1012) — pre-existing, not introduced by this PR
**[fit]** Body length validation: `aicore.go` does not include the Content-Length vs body length validation that `doRequest` has in `client.go`. This is acceptable because:
1. AI Core uses OAuth tokens which are short-lived, so truncation is less likely
2. The retry logic still applies via "read response" error pattern
3. Adding complexity to aicore.go for an edge case that hasn't manifested is premature
**[completeness]** Tests pass (go test ./...), go vet clean, no uncommitted changes.