Repository navigation
Explain uninspected models on rate-limited requests - #36
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe request pipeline now records ChangesModel observation status
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant RateLimiter
participant RequestLog
participant WebUI
Client->>RateLimiter: submit request
RateLimiter->>RequestLog: record terminal rejection without body inspection
RequestLog->>WebUI: serialize model_observation_status
WebUI->>Client: render not-inspected message
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces a new model_observation_status field to identify and explain requests that were rate-limited before their body could be inspected. This status is derived when the upstream URL is 'rate-limiter' and no models are present, and is displayed across various dashboard templates. The review feedback points out that the CSS class .cell-secondary used in client_dashboard.html is undefined in that file, which will lead to inconsistent styling, and suggests using inline styles as a workaround.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| if (observationStatus === 'not_inspected_rate_limit') { | ||
| return '<span class="cell-secondary">Not inspected (rate limited before body)</span>'; | ||
| } |
There was a problem hiding this comment.
The CSS class .cell-secondary is used here to style the fallback message for uninspected models, but this class is not defined in the <style> block of client_dashboard.html (unlike index.html which defines it locally). This will cause the text to render without the intended gray, smaller font styling on the client dashboard.
Since modifying the <style> block is outside the modified diff hunks, we can apply inline styles directly to the <span> to ensure consistent rendering.
if (observationStatus === 'not_inspected_rate_limit') {
return '<span style="font-size: 0.75rem; color: #666;">Not inspected (rate limited before body)</span>';
}
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #36 +/- ##
==========================================
+ Coverage 75.43% 75.67% +0.23%
==========================================
Files 37 37
Lines 10275 10280 +5
Branches 1599 1600 +1
==========================================
+ Hits 7751 7779 +28
+ Misses 1939 1913 -26
- Partials 585 588 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|



Summary
Root cause
Rate limiting intentionally runs before JSON body parsing. A rejected request therefore has no observed model, and the dashboard previously rendered the unexplained fallback
N/A.Validation
git diff --checkpassedSummary by CodeRabbit
New Features
Bug Fixes