refactor: Expose agent scorecard weight variables to custom configurations#2799
Conversation
…tions Implements an AgentScorecard that allows weight parameters inside compute_performance_score to be customized via environment variables or explicitly passed dict arrays. Supports runtime weight updates. Closes ritesh-1918#2635
|
Someone is attempting to deploy a commit to the ritesh Team on Vercel. A member of the Team first needs to authorize it. |
|
Warning Review limit reached
More reviews will be available in 25 minutes and 28 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Enables weight parameters inside compute_performance_score to be customized via environment variables or explicitly passed dict arrays to adjust resolution metrics.
Changes
backend/services/agent_scorecard.pywithAgentScorecardclassSCORECARD_RESOLUTION_WEIGHT,SCORECARD_SPEED_WEIGHT,SCORECARD_QUALITY_WEIGHT,SCORECARD_VOLUME_WEIGHT,SCORECARD_SLA_WEIGHT,SCORECARD_MAX_SCOREenv varscompute_performance_score()accepts optional per-call weight overrides viaweightsdictcompare_weights()lets you compare multiple weight configurationsupdate_weights()for dynamic adjustmentsload()/get_instance()patternCloses #2635