Repository navigation
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e8e6cc2dda
ℹ️ 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".
PixelFlat
marked this pull request as draft
October 23, 2026 11:34
PixelFlat
marked this pull request as ready for review
October 23, 2026 14:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
SESSION_AWARErouting using the client-providedX-Session-ID. The first request uses RR or CAR placement; subsequent requests reuse the bound DEFAULT instance or P/D targets while those targets remain eligible.The policy coordinates concurrent initial requests, confirms bindings after dispatch or successful engine output, protects active requests from expiry and eviction, and starts the idle TTL when the last active request finishes. Instance identity checks and versioned leases prevent stale completions from changing a newer binding. Idle entries use bounded LRU eviction; a full table of active sessions rejects new session placement. Soft affinity is outside this change.
Fallback placement, including CAR prefix lookup, runs outside the session-table lock and reconciles concurrent provisional bindings afterward. Store selected P/D names and incarnation IDs together in
Routing, reused directly by requests and session bindings. Session placement requires nonempty incarnation IDs on every selected engine; missing IDs reject the placement instead of using registration timestamps. Ordinary routing without a session header remains available to engines without IDs. Validate identities at binding, admission, metric release, instance cancellation and Channel acquisition; validate and acquire the Channel under the same instance lock. Streaming HTTP errors retain the upstream response body while invalidating affinity independently.Encapsulate provisional bindings, version guards, idle TTL, LRU and request holds in
SessionTable.SessionAwarePolicyonly coordinates reuse and fallback placement;SessionLeasedelegates lifecycle transitions and skips repeated completion notifications. Session bindings store onlyRoutingmetadata rather than load snapshots; no separate identity or session-route wrapper is needed.Read the header on completions, chat completions and Anthropic messages, and connect lease completion to native xLLM results and HTTP backend responses. Preserve the original chat JSON for HTTP forwarding during normalization. Document the routing flags and process-local scope.
Validation completed in a Linux ARM64 development environment:
git diff --checkpassed.Validation includes CPU mocks and real same-host NPU P/D inference. Failover, admission, cancellation and stale Channel checks were exercised in regression tests. Performance benchmarks were not run. Bindings are local to a service process and select instances rather than internal engine DP ranks.