Was ist Open Code Review?
Open Code Review (Alibaba’s ocr CLI) ist ein quelloffener KI-Code-Reviewer. Er durchläuft einen Diff, ruft ein Modell mit Tools auf, um Kontext zu sammeln, und gibt diff-verankerte Befunde als JSON aus — ideal für CI-Gating.
ocr steuert eine Tool-Calling-Schleife. Tool-Call-Passthrough läuft über Tokonomix’s Anthropic-kompatiblen Endpunkt (/api/anthropic/v1); der OpenAI-kompatible /api/v1-Pfad ist consensus-orientiert und entfernt clientseitige Tool-Calls. Weise ocr auf die Anthropic-Basis.
Warum Open Code Review über Tokonomix routen?
- Steuere den Reviewer mit einem beliebigen tool-fähigen Modell auf einem Schlüssel (z. B.
anthropic/claude-sonnet-4-6). - Behalte die diff-verankerte JSON-Ausgabe für das CI-Gating unverändert.
- Per-Call-Ausgabenlimits begrenzen die Review-Kosten bei großen Diffs.
- Region- / Origin-Routing hält einen Code-lesenden Reviewer compliant.
ocr für Tokonomix konfigurieren
Setze die LLM-URL von ocr auf den Anthropic-kompatiblen Endpunkt, dein Token, ein tool-fähiges Modell, und aktiviere das Anthropic-Drahtformat.
ocr config set llm.url https://tokonomix.ai/api/anthropic/v1/messages
ocr config set llm.auth_token tok_live_your-key
ocr config set llm.model anthropic/claude-sonnet-4-6
ocr config set llm.use_anthropic true
ocr review --from origin/main --to HEAD --format jsonEin nativer tokonomix-consensus-review-Slug (in Arbeit) liefert diff-verankerte Befunde als JSON direkt über die Consensus-Pipeline — kein clientseitiges Tool-Calling erforderlich.
# Alternative — consensus-only review via the OpenAI-compatible path.
# No client-side tool-calling: ocr sends the diff and tokonomix-consensus
# returns a cross-family verdict. Use this for a multi-model review instead
# of ocr's local tool-driven loop.
ocr config set llm.url https://tokonomix.ai/api/v1/chat/completions
ocr config set llm.auth_token tok_live_your-key
ocr config set llm.model tokonomix-consensus
ocr config set llm.use_anthropic falseFunktioniert es?
- Führe
ocr reviewauf einem kleinen Diff aus und bestätige, dass JSON-Befunde zurückkommen. - Prüfe den Aufruf und den Token-Verbrauch in deinem Tokonomix-Dashboard.
- Binde die JSON-Ausgabe in deinen CI-Gate ein.

