Skip to content

[Feature] Wire Looper calls to the shared connector - #3508

Open
JiaoliangYu wants to merge 22 commits into
vllm-project:mainfrom
JiaoliangYu:feat/3339-looper-connector-wiring
Open

[Feature] Wire Looper calls to the shared connector#3508
JiaoliangYu wants to merge 22 commits into
vllm-project:mainfrom
JiaoliangYu:feat/3339-looper-connector-wiring

Conversation

@JiaoliangYu

@JiaoliangYu JiaoliangYu commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Related #3339

Purpose

Introduce the new Looper model-call path without removing the legacy transport yet, so the wiring can be reviewed independently from deletion.

  • replace mutable per-client decision and Fusion metadata with typed, request-scoped ModelTarget and CallOptions
  • add request-scoped headers to the shared model-runtime connector while keeping authorization precedence explicit
  • route Looper calls through a non-retryable connector operation with bounded bodies and an explicit HTTP 200 success contract
  • create one connector-backed Looper client per router generation and register it with the generation resource scope
  • migrate Base, Confidence, Ratings, ReMoM, Workflows, Fusion, prompt selection, context recovery, and fusioneval call sites without changing their algorithm or response behavior

The legacy Looper HTTP branch remains in this PR only as a reviewable migration bridge. A focused follow-up removes it after every caller is on the typed path.

Test Plan

  • go test -count=1 -race ./pkg/modelruntime/connector ./pkg/looper ./pkg/extproc
  • go vet ./pkg/modelruntime/connector ./pkg/looper ./pkg/extproc
  • make test-semantic-router PWD=/workspace on the stacked final tree
  • make agent-ci-gate ENV=cpu CHANGED_FILES="..." on the stacked final tree

Test Result

All listed checks pass in rocm/atom-dev:latest on g64. The concurrency contract test overlaps two requests and verifies model, decision, iteration, Fusion depth, and authorization headers do not cross. The endpoint contract test verifies an empty operation path preserves the configured /v1/chat/completions endpoint exactly. The status-policy tests verify that the shared connector still accepts any 2xx by default while Looper rejects a streaming 204 response.


Semantic Router PR Checklist

@netlify

netlify Bot commented Sep 5, 2026

Copy link
Copy Markdown

Deploy Preview for vllm-semantic-router ready!

Name Link
🔨 Latest commit 9a742de
🔍 Latest deploy log https://app.netlify.com/projects/vllm-semantic-router/deploys/6a9f657594654800085ad8ef
😎 Deploy Preview https://deploy-preview-3508--vllm-semantic-router.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@JiaoliangYu

Copy link
Copy Markdown
Contributor Author

The deletion-only follow-up is #3509. This keeps the connector wiring and the removal of the legacy transport independently reviewable.

JiaoliangYu added 14 commits September 5, 2026 14:10
Signed-off-by: JiaoliangYu <jiaolyu@amd.com>
Signed-off-by: JiaoliangYu <jiaolyu@amd.com>
Signed-off-by: JiaoliangYu <jiaolyu@amd.com>
Signed-off-by: JiaoliangYu <jiaolyu@amd.com>
Signed-off-by: JiaoliangYu <jiaolyu@amd.com>
Signed-off-by: JiaoliangYu <jiaolyu@amd.com>
Signed-off-by: JiaoliangYu <jiaolyu@amd.com>
Signed-off-by: JiaoliangYu <jiaolyu@amd.com>
Signed-off-by: JiaoliangYu <jiaolyu@amd.com>
Signed-off-by: JiaoliangYu <jiaolyu@amd.com>
Signed-off-by: JiaoliangYu <jiaolyu@amd.com>
Signed-off-by: JiaoliangYu <jiaolyu@amd.com>
Signed-off-by: JiaoliangYu <jiaolyu@amd.com>
Signed-off-by: JiaoliangYu <jiaolyu@amd.com>
@JiaoliangYu
JiaoliangYu force-pushed the feat/3339-looper-connector-wiring branch from 268b4b5 to 75c02d2 Compare September 5, 2026 06:10
@github-actions github-actions Bot added pr/needs-rebase Needs rebase or conflict resolution. wg/mom-routing Owned by the MoM and Routing Workgroup. labels Sep 5, 2026
@github-actions github-actions Bot removed the pr/needs-rebase Needs rebase or conflict resolution. label Sep 5, 2026
@github-actions github-actions Bot added pr/needs-review Ready for reviewer attention. pr/needs-rebase Needs rebase or conflict resolution. and removed pr/needs-review Ready for reviewer attention. labels Sep 5, 2026

@Xunzhuo Xunzhuo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the careful connector migration. One response-contract regression remains: the shared connector accepts every 2xx response, while Looper’s existing path requires HTTP 200. Because the streaming parser accepts an empty body, a 204 now becomes a successful empty model response instead of an upstream-status error. Please preserve Looper’s 200-only contract and add a 204 regression test before removing the legacy path.

@github-actions github-actions Bot added pr/needs-author Waiting for author changes or response. and removed pr/needs-rebase Needs rebase or conflict resolution. labels Sep 5, 2026
Signed-off-by: JiaoliangYu <jiaolyu@amd.com>
@JiaoliangYu

JiaoliangYu commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for catching this — you are right that 204 could otherwise reach the streaming parser as a successful empty response. Fixed in 6ff1a1f9.

The connector operation now has an optional SuccessStatusCode: zero preserves the shared connector default of accepting any 2xx, while Looper explicitly requires 200 OK. I added both the connector policy contract test and a Looper streaming 204 regression test.

@Xunzhuo Xunzhuo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks—SuccessStatusCode: http.StatusOK now preserves the Looper 200-only contract while the shared connector keeps its default 2xx behavior, and the 204 regression covers the original blocker. This branch is behind current main; please sync it, let the resulting exact-head checks finish, and re-request review.

@JiaoliangYu
JiaoliangYu requested a review from Xunzhuo September 6, 2026 02:05
@github-actions github-actions Bot added pr/blocked Blocked on a named decision, dependency, or required check. and removed pr/needs-author Waiting for author changes or response. labels Sep 7, 2026
@github-actions github-actions Bot added pr/needs-author Waiting for author changes or response. and removed pr/blocked Blocked on a named decision, dependency, or required check. labels Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr/needs-author Waiting for author changes or response. wg/mom-routing Owned by the MoM and Routing Workgroup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants