alibaba / alibaba/open-code-review
Support using Claude Code's existing login session (Team/Pro plan) instead of requiring a separate Anthropic API key
- Dominant language
- Go
- Stars
- 24.4k
- Forks
- 1.8k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 105
Description
### Problem Statement
Currently, ocr requires a standalone LLM credential to be configured via ocr config set llm.auth_token ... (or OCR_LLM_TOKEN). This works for users who have a pay-as-you-go Anthropic API key, but it doesn't work for users like myself who access Claude only through a Claude Code Team/Pro plan subscription.
Claude Code itself authenticates via an OAuth/session login (not a raw API key), and that login is tied to the subscription's included usage rather than metered API billing. Since open-code-review supports being invoked as a Claude Code plugin/skill (/open-code-review), I expected it could reuse Claude Code's existing authenticated session to make model calls — but based on the docs, the ocr CLI still makes its own independent request using llm.auth_token, completely separate from Claude Code's login state. This means Team/Pro plan users can't use this tool without also purchasing separate API credits.
### Proposed Solution
When open-code-review is run inside a Claude Code session (e.g. via the plugin/slash-command integration), allow it to delegate the actual review generation to Claude Code's own agent/model-call mechanism instead of requiring ocr to independently authenticate to api.anthropic.com with its own key. For example:
A mode where the Skill/Plugin instructs Claude Code itself to perform the diff analysis and produce review comments (using Claude Code's own tool-use loop), rather than ocr shelling out to a separately-configured LLM endpoint.
Or, at minimum, documentation clarifying whether/how Team or Pro plan users (without a separate API key) can use this tool.
### Alternatives Considered
Purchasing a separate Anthropic API key just for this tool — works, but means paying twice for the same underlying model access.
Writing my own custom Claude Code Skill that performs the review logic natively so it runs entirely on the Team plan's included usage — functional, but duplicates work that open-code-review already does well.
### Affected Area
Review Agent / LLM interaction
### Additional Context
It would be great if the README could explicitly state which integration modes (if any) work purely on a Claude Code subscription login vs. which strictly require a standalone API key with llm.auth_token. Right now this isn't obvious from the docs and could be a source of confusion for other Team/Pro plan users.
Contributor guide
Research direction
Start by reading the README sections covering llm.auth_token, OCR_LLM_TOKEN, and the Claude Code plugin or slash-command integration. Trace how `ocr config set llm.auth_token` and the Review Agent/LLM interaction are documented, then determine whether subscription-only use can be supported or whether the README should clearly state the required authentication modes. Done means the integration behavior and credential requirements are explicit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- ai, documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100