#3

Anthropic Dependency

Opennazrul-kabiropened 8mo ago

The current solution has a hard dependency on Anthropic's API. Any plan to extend the support to other providers as well?

Activity

2
parnexcodes8mo ago

+1 especially open source models, I think it's achievable through AI SDK from vercel.

raye-deng8mo ago

Dependency on a single LLM provider is a real concern for production pipelines. If the provider goes down or changes pricing, your entire review pipeline stops.

Beyond provider flexibility, we also think it's important to have rule-based checks alongside AI analysis — some AI-code defects (hallucinated packages, deprecated API calls, over-engineering) can be detected deterministically without needing an LLM at all. This makes the pipeline faster, cheaper, and more reliable.

Here's the concrete architecture we've found works well:

  • Rule engine (fast path): Runs first on every PR. Checks imports against npm/PyPI registries, detects deprecated APIs, flags complexity anomalies. Takes ~10 seconds, zero LLM cost, zero provider dependency. Catches the majority of AI-specific defects.
  • AI analysis (slow path): Optional second pass for nuanced review. Can use any provider (OpenAI, Anthropic, local models) — the rule engine results are passed as context so the AI doesn't waste tokens re-analyzing things that were already caught deterministically.

The economics are compelling: if 60-70% of AI-code defects can be caught by rules, you can cut LLM costs significantly and still get thorough coverage. Plus the rule engine never goes down — it's just HTTP calls to package registries and AST parsing.

We combine both approaches: deterministic checks for known AI-code patterns plus optional AI analysis for nuanced review. Worth considering as an architectural option.

npx @opencodereview/cli scan . --sla L1