Repository navigation
refactor(policies): rename least_load to kv_pressure_weight - #1632
Conversation
The least_load score is `in_flight + lambda * k/(1-k)`, where k is the backend KV-cache utilization from the load monitor. `lambda` is opaque to operators and mathematically misleading: in the M/M/1 model the utilization k already encodes the arrival/service ratio, so this coefficient is not the M/M/1 arrival rate — it is simply the weight that converts the KV-congestion term into request-equivalents so it is commensurable with the in-flight count. Rename to `kv_pressure_weight` (the policy's own doc already calls it the "KV-pressure weight") across the config variant, validation, factory, CLI/binding construction, and the policy's internal field, constant, and constructor. Pure rename — no behavior change; default stays 1.5. Signed-off-by: Simo Lin <25425177+slin1237@users.noreply.github.com>
📝 WalkthroughWalkthroughThe PR renames the ChangesLeastLoad Configuration Parameter Rename
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Code Review
This pull request renames the lambda parameter to kv_pressure_weight across the codebase, including configuration, validation, and policy implementations, to improve clarity. However, renaming this configuration field directly breaks backward compatibility for existing deployments. It is recommended to add a Serde alias to ensure a smooth upgrade path.
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.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c5b35134bb
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Clean, well-executed rename. All references updated consistently across config types, validation, factory, CLI args, Python bindings, and tests. No behavior change, default preserved at 1.5. One minor nit posted about adding a serde alias for the old field name — low risk since the feature only landed today.
Summary: 0 🔴 Important · 1 🟡 Nit · 0 🟣 Pre-existing
No description provided.