Skip to content

fix: show inferred scores for sticky session logs - #2598

Merged
steebchen merged 1 commit into
mainfrom
routing-info-sticky-scores
Jun 8, 2026
Merged

steebchen merged 1 commit into
mainfrom
routing-info-sticky-scores

Conversation

@steebchen

@steebchen steebchen commented Jun 8, 2026 •

Copy link
Copy Markdown
Member

Problem

The activity-log "Routing Info" panel hides the per-provider scores for
sticky-session requests. As of #2596, sticky-session routing scores
providers with the normal weighted algorithm and only pins the result
for the session — so the log already carries the real inferred scores
under selectionReason: "session-sticky". The dashboard still listed
session-sticky in SCORE_BYPASSED_SELECTION_REASONS, a leftover from
when sticky picks used rendezvous hashing and emitted hardcoded 0
placeholders, so those real scores were never displayed.

Fix

Remove session-sticky from SCORE_BYPASSED_SELECTION_REASONS so the
inferred weighted scores that informed the sticky routing decision show
up in the log. The existing all-zero fallback still hides them in the
degenerate case where scoring couldn't run (e.g. no metrics available).

Testing

  • pnpm format
  • pnpm --filter ui build + tsc --noEmit (clean)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Updated the visibility logic for Provider Scores to display them in additional scenarios where they are applicable.

Sticky-session routing now scores providers with the weighted algorithm
and pins the result, so the logged provider scores are real values.
Stop hiding them in the activity log by removing "session-sticky" from
the score-bypassed selection reasons.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 8, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 91601fa5-6215-403e-bc89-851c68effb55

📥 Commits

Reviewing files that changed from the base of the PR and between 9da19a9 and 4c1a1bf.

📒 Files selected for processing (1)
  • apps/ui/src/app/dashboard/[orgId]/[projectId]/activity/[logId]/log-detail-client.tsx

Walkthrough

The PR updates the activity log detail view to display provider scores for session-sticky selection reasons. The bypass condition set is narrowed to exclude that reason, keeping only random-exploration and price-only-no-metrics as cases where scores are suppressed. Comments clarify when scores indicate meaningful provider differentiation versus uninformative all-zero fallbacks.

Changes

Provider Score Visibility

Layer / File(s) Summary
Score bypass selection reasons
apps/ui/src/app/dashboard/[orgId]/[projectId]/activity/[logId]/log-detail-client.tsx
SCORE_BYPASSED_SELECTION_REASONS constant is updated to exclude "session-sticky", allowing provider scores to display for that selection reason. Comments are revised to explain when provider scores are considered meaningful versus when they reflect uninformative all-zero scoring fallback.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • theopenco/llmgateway#2500: Both PRs modify log-detail-client.tsx to control "Provider Scores" visibility based on selectionReason bypass logic—main PR specifically removes session-sticky from the bypass list while the retrieved PR adds gating (including session-sticky) and hides score values when scoring is bypassed.
  • theopenco/llmgateway#2596: The main PR updates the UI's "Provider Scores" rendering rules to stop bypassing selectionReason: "session-sticky" (making its scores shown again), which aligns with the retrieved PR's refactor that makes sticky session routing cost-aware by re-running the weighted scoring before pinning.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: show inferred scores for sticky session logs' directly and accurately summarizes the main change: removing session-sticky from the bypass list to display inferred scores for sticky session routing decisions.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch routing-info-sticky-scores

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@steebchen
steebchen enabled auto-merge June 8, 2026 22:41
@steebchen
steebchen added this pull request to the merge queue Jun 8, 2026
Merged via the queue into main with commit 664e7eb Jun 8, 2026
12 checks passed
@steebchen
steebchen deleted the routing-info-sticky-scores branch June 8, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant