Skip to content

Pluggable AI backend (provider seam: free / BYOK / local) #978

Description

@JSONbored

Part of #975.

Context

The review pipeline currently calls a single hosted AI provider. Self-hosters need to choose an AI backend without touching the pipeline or the decision policy.

Deliverables

  • A single AI-provider interface — one call (system + input → structured result) used everywhere the pipeline invokes a model.
  • Refactor the existing model call sites onto this interface (no change to the consensus / decision logic above it).
  • Built-in providers: hosted/free, BYOK API (OpenAI/Anthropic-compatible), local (Ollama / OpenAI-compatible endpoint).
  • Provider selection via config + a fallback chain; fail-safe to manual review on any provider failure (never a wrong automated action).
  • Per-project model selection.

Acceptance criteria

  • Switching providers is a config change only; the pipeline + decision policy are untouched.
  • A provider outage/timeout/parse-failure degrades down the chain and ultimately to manual — never an incorrect merge/close.

Notes

  • Subscription providers (Claude Code / Codex) plug into this same seam — tracked separately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions