[ENH] Add LLM provider interface, Ollama provider and retries #48
All Vouch review confidence checks passed
Residual risk 0.27 = Change Risk (0.36) × (1 − Review Confidence (0.26)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 115 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 13% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.289
Diff Size
diff_size
0.284
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #48"
general
weight: 0.35
aashoday
Related
Closes #14
Summary
Add
src/crosstrace/autoannotate/provider.py.Provideris a small interface: system prompt and user message in, text out.classify()parses the text into aVerdictand retries. Transient errors(429, 5xx, timeout) wait 2 s, 4 s, and so on, up to 60 s. Invalid output is
also retried. After all attempts it returns None, and the pair goes to
review as
invalid_output.clear message.
OllamaProvideruses a local model. It needs no API key. The host comesfrom
OLLAMA_HOST. Temperature 0, seed 42, context 8192 tokens.Verdictis sent to Ollama. Pydantic checks the answeragain.
How I tested it