Skip to content

feat(generate): add format-owned migration hooks for native generate - #17802

Draft
Aphoh wants to merge 1 commit into
mainfrom
warnold/generate-migration-hooks
Draft

Aphoh wants to merge 1 commit into
mainfrom
warnold/generate-migration-hooks

Conversation

@Aphoh

@Aphoh Aphoh commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Overview:

Adds the backend-neutral migration hooks for native /generate formats, split out of #16977 so SGLang and vLLM migration can each land on top independently. No format turns migration on in this PR: SGLang and vLLM both bind with migration: Err(..), so runtime behavior is unchanged.

Details:

  • GenerateExchange::migrate(delivered_tokens, &mut PreprocessedRequest): the format rebases its request for a retry, or returns a terminal LLMEngineOutput without calling another worker.
  • Bound.migration: Result<(), String>: the format's admission decision; Err keeps the request on one worker.
  • RequestContinuation on PreprocessedRequest (frontend-only, not serialized) lets the generic Migration operator call back into the format.
  • Migration::for_generate and build_generate_pipeline wire the operator into the format pipeline.
  • Worker.engine_info + ENGINE_INFO_KEY: worker-advertised engine metadata (e.g. sampling defaults) available at bind time.
  • SGLang and vLLM formats get "does not migrate yet" stubs.

Where should the reviewer start?

lib/llm/src/generate_format.rs, then lib/llm/src/migration.rs and lib/llm/src/http/service/format_generate.rs.

Stack: SGLang migration #16977 and vLLM migration #17766 are rebased on this PR.

Related Issues

Signed-off-by: William Arnold <warnold@nvidia.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@copy-pr-bot

copy-pr-bot Bot commented Nov 2, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added frontend `python -m dynamo.frontend` and `dynamo-run in=http|text|grpc` feat labels Nov 2, 2026
@Aphoh

Aphoh commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test e5f56de

@devin-ai-integration

Copy link
Copy Markdown
Contributor

✅ Dynamo PR CI passed — run 41409733214 (attempt 1) on e5f56dee4a

Gate checks: ✅ backend-status-check · ✅ deploy-status-check · ✅ dynamo-status-check

Posted automatically by Devin for run 41409733214. Updated on every full-CI run of this PR.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat frontend `python -m dynamo.frontend` and `dynamo-run in=http|text|grpc` size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant