feat: add Anthropic Messages API support #18
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
review-bot only speaks OpenAI-compatible chat/completions API. The HAI proxy serves Claude models exclusively via the native Anthropic Messages API (
/anthropic/v1/messages), not the OpenAI-compatible endpoint.This means we cannot use Claude (Sonnet, Opus) for reviews — only GPT models work.
Proposed Solution
Add an
--llm-providerflag (or auto-detect from base URL) that switches between:openai(default):POST /chat/completionswith OpenAI request formatanthropic:POST /messageswith Anthropic request format (x-api-keyheader,anthropic-versionheader, different payload structure)Acceptance Criteria
llm-providerinput (defaults toopenai)Context
Discovered while integrating review-bot into gargoyle CI (PR grgl/gargoyle#507). Currently using GPT-4.1 + GPT-5 as the two reviewers, but we want Claude + GPT for model diversity.