Repository navigation
perf(models): skip unused source projection for known route overrides - #183871
Merged
steipete merged 1 commit intoOct 25, 2026
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
steipete
marked this pull request as ready for review
October 25, 2026 21:45
Contributor
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. |
steipete
deleted the
steipete/perf-micro-deep-equal-comparisons-20260919
branch
October 25, 2026 21:55
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 26, 2026
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.
What Problem This Solves
Provider route preparation projects the full runtime config back onto authored values even when the request has already established that transport overrides are present. The selected branch discards that projection, including its deep comparisons and clone.
User Impact
No routing or authorization behavior changes. Requests with an established transport override do less preparation work; unresolved override facts still inspect authored configuration.
Why This Change Was Made
Move authored-source projection into the existing branch that consumes it. No new cache, identity contract, or invalidation mechanism. Production code shrinks.
Evidence
The regression counts authored-source projections across repeated model resolutions and checks that
present,none, and omitted request facts all preserve configured overrides. It fails on the unmodified base for the unnecessary projection.Owner measurements used Node 26.12.1 on macOS arm64, baseline
49dacaa1ca264815a52533adafd506fd836cb61eand the reviewed candidate (nowd81c1487123e2c14935318872c06ad41f13b1759). The rebase preserved the measured route and projection owner code.Owner benchmark:
node --expose-gc --import ./scripts/tsx.mjs scripts/perf/provider-route-overrides.ts --output .local/provider-route-overrides.json. Synthetic config has 40 plugins, 100 agents, and 8 providers with 25 models each. Each arm uses five warm timing passes of 2,000 preparations and a separate sampled-allocation pass; cloned runtime inputs exercise projection and captured config inputs are the control. Acceptance: delete the unused projection, retain routing results, reduce cloned-input CPU/allocation, and check the captured-input control for adverse movement. Sequential base/candidate/base/candidate runs expose host drift.Across the two paired medians, cloned-input CPU falls 98.5% and sampled allocation falls 95.6%. The second baseline allocation profile attributes 112.3 MB to Node deep-comparison frames; candidate comparison allocation is zero. The captured-config control has mixed-sign CPU deltas (+7.3%, −14.7%) and essentially stable allocation; no stable adverse effect is established. These small CPU totals are context, not a claimed captured-config speedup. Main-thread or whole-Gateway metrics were not collected.
Production delta: 4 added / 6 removed lines (net −2). The benchmark and regression are proof tooling. Independent subagent review (autoreview route unavailable) found no actionable P0–P2 findings; autoreview preflight refused the requested provider/config mismatch. Baseline: the intended regression fails (one projection instead of zero); 30 other tests pass. Candidate: 44 tests pass across
src/plugins/provider-model-routes.test.ts,src/plugins/provider-model-routes.installed.test.ts, andsrc/agents/openai-model-routes.test.ts, usingOPENCLAW_VITEST_RUNTIME=node node scripts/run-vitest.mjs src/plugins/provider-model-routes.test.ts src/plugins/provider-model-routes.installed.test.ts src/agents/openai-model-routes.test.ts --maxWorkers=1(390.31 s wall including cold worker compilation/verification; plugin tests 72.67 s wall and about 6 s test execution). Changed-file oxfmt, scoped type-aware lint, andgit diff --checkpass. An initial default-runtime run was interrupted during artifact verification before a verdict; the complete Node rerun supplies the proof. An initial lint attempt selected the overly broad root config and timed out preparing SDK declarations; matching core/test/scripts lint configs then passed. PR CI supplies broad validation. This is a narrow discarded-work deletion; it makes no whole-Gateway CPU, latency, or throughput claim. The requested fast-path proof exemption applies, so no 10-minute Gateway stress campaign was run.