fix(providers): avoid misdetecting provider from URL paths and queries #3080
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.35) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.35 · 166 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · 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.344
Diff Size
diff_size
0.306
Real PR Conversation Timeline
1 comments
"Review active on #3080"
general
weight: 0.35
chrikrah
Summary
get_provider()scans the entire base URL for provider-name tokens after checking known hostnames. On an unknown gateway, provider names mentioned only in paths or query strings can incorrectly select an unrelated provider handler.For example,
https://api.example.invalid/v1?provider=anthropicpreviously returnedProvider.ANTHROPICdespite the unrelated hostname.Changes
Validation
AI assistance
ChatGPT assisted with code investigation, patch drafting and focused regression testing. The contributor is responsible for reviewing and understanding the changes and for completing the repository's full checks before merge.