Skip to content

feat(ai): risk-based model routing and fallback #43

Description

@devops-thiago

Problem Statement

Every review uses a single configured model. For cost efficiency, low-risk diffs (small, docs-only, generated) could be reviewed by a cheaper model, escalating to a stronger model only for larger or higher-risk changes.

Proposed Solution

Add optional risk-based model routing: classify the diff (size, paths, signals) and select among configured models, with fallback to a secondary model on provider error or rate limit. Make routing rules configurable; default to single-model behavior. Pairs with multi-provider support and per-PR spend caps.

Alternatives Considered

  • Single model always — simplest, but leaves cost savings on the table.

Priority

Nice to have

Code of Conduct

  • I have searched for existing issues and this is not a duplicate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is neededjavaPull requests that update java code

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions