Repository navigation
feat(global-router): add the Global Frontend forwarding engine - #17272
Merged
sachalmalick merged 2 commits intoOct 25, 2026
Merged
Conversation
Add dynamo-global-ingress, the Global Frontend. It runs the existing HttpService and registers one PoolForwardingEngine under every model in the pool catalog. The engine forwards each chat or completions request to the pool frontend a PoolSelector picks and streams the pool's SSE back. The Responses and Anthropic APIs translate to chat before the engine, so they forward too. The Global Frontend does not tokenize. Add dynamo-global-router with the PoolCatalog and PoolSelector traits, a static catalog for --pool flags and tests, and a first-pool selector that stands in until round robin. Claim the global-router crates, including the discovery service and the shared types, for the global-router codeowners. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Sachal Malick <s@chal.ai>
sachalmalick
changed the base branch from
sachalmalick/global-router-v2-base
to
global-router-v2
October 25, 2026 07:53
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.
Summary
Adds the Global Frontend for the Kiro Global Router: an OpenAI-compatible HTTP service that forwards each request to a pool frontend picked by the Global Router. It reuses Dynamo's
HttpServiceunchanged and needs no changes todynamo-llm.dynamo-global-ingress(lib/global-ingress, binaryglobal-ingress)PoolForwardingEngineimplements the chat and completions engines. It asks aPoolSelectorfor a pool, sends the request to that pool frontend's/v1/...route, and decodes the pool's SSE with the existingSseLineCodec. One instance serves every model, because it reads the model from each request. The Responses and Anthropic APIs translate to chat before the engine, so they forward too.ModelSyncregisters the engine throughModelManager's in-process path for each model in the pool catalog. It removes models no pool serves and turns endpoints on or off.main.rstakes pools as--pool <site>/<namespace>/<DGD name>=<model>@<frontend URL>[,...].dynamo-global-router(lib/global-router, no HTTP code)PoolCatalogpublishes pool snapshots through awatchchannel.StaticPoolCatalogbacks it for now; a catalog backed by the Global Discovery Service and Pool Relay state can implement the same trait.PoolSelectorwithFirstPoolSelector, a stand-in until round-robin.Forwarding behaviour
stream_options.include_usagefor non-streaming clients so the folded response keeps its usage.x-dynamo-session-idinto the request context, so the engine puts the header back on the forwarded request.HttpError, so the client gets the pool's status (404 stays 404). An unreachable pool returns 503. An{"error": ...}frame mid-stream ends the client's stream with an error.SseLineCodecconsumes[DONE]without emitting it, so a pool that closes its body cleanly before[DONE]looks finished. Connection resets still surface as errors.Ownership: claims
lib/global-ingress,lib/global-router,lib/global-discovery-serviceandlib/global-router-sharedfor@ai-dynamo/dynamo-global-router-codeowners. The last two were unclaimed, which failed the strict coverage check.Base branch: this PR targets
sachalmalick/global-router-v2-base, a push of the localglobal-router-v2stack (Global Discovery Service and client, GlobalViewReceiver,global-router-shared). That stack isn't onorigin/global-router-v2yet. Once it is, switch this PR's base toglobal-router-v2.Not in this PR: the catalog backed by the Global Discovery Service (needs
GlobalDiscoveryClient::list_pools), round-robin selection, retrying the next pool before the first byte (TODO inforward.rs), per-model metric series,x-request-id/trace propagation, and the non-chat APIs.Validation
cargo test -p dynamo-global-ingress -p dynamo-global-router: 15 passed (6 unit, 9 end-to-end). The end-to-end tests run a Global Frontend in front of a real Dynamo pool frontend serving the echo engine, and in front of a scripted axum pool. They cover:/v1/responses;cargo clippy -p dynamo-global-ingress -p dynamo-global-router --all-targets: no warnings in these crates.cargo fmtapplied.--poolwith a model name containing/parses;/v1/modelslists the model;build_codeowners.py --strict: 100% coverage.CODEOWNERSregenerated withemit_codeowners.py.dynamo-llmdefault-features = false(no block manager).🤖 Generated with Claude Code