Repository navigation
feat: integrate direct vLLM inference with the shared executor - #382
Merged
franciscojavierarceo merged 8 commits intoNov 27, 2026
Merged
franciscojavierarceo merged 8 commits into
franciscojavierarceo merged 8 commits into
Conversation
franciscojavierarceo
force-pushed
the
codex/shared-vllm-inference
branch
from
September 25, 2026 16:08
314864a to
28278ca
Compare
This was referenced Sep 25, 2026
This was referenced Oct 27, 2026
Co-authored-by: Codex <[email protected]> Signed-off-by: maral <[email protected]>
Split HTTP transport and injected direct inference beneath shared request preparation, orchestration, sessions, compaction, and persistence. Reuse the existing event types, response accumulator, tool translation, and usage handling. Add an unpublished agentic-vllm adapter for model preparation and direct EngineCore calls, with cancellation, limits, and focused integration coverage. Document the supported profile and pending live-engine qualification. Refs vllm-project#359, vllm-project#360. Signed-off-by: maral <[email protected]>
Preserve the shared relay, steering, file resolution, and request normalization while retaining the HTTP/direct inference split. Adapt native responses and usage to current core types and cover steering at a completed native item. Signed-off-by: maral <[email protected]>
Signed-off-by: maral <[email protected]>
Preserve gateway reasoning-summary capabilities in the Codex catalog so direct requests omit unsupported reasoning controls. Keep the native process group after its launcher exits and stop surviving workers during cleanup. Classify native admission failures using vLLM validation and availability checks while retaining error sources. Signed-off-by: maral <[email protected]>
maralbahari
force-pushed
the
codex/shared-vllm-inference
branch
from
November 24, 2026 10:17
b8dd6f8 to
17f2202
Compare
maralbahari
marked this pull request as ready for review
November 24, 2026 11:24
maralbahari
requested review from
bbrowning,
haoshan98,
jiahuei,
leseb,
maralbahari,
noobHappylife,
qandrew and
tjtanaa
as code owners
November 24, 2026 11:24
Signed-off-by: Francisco Javier Arceo <[email protected]>
Signed-off-by: Francisco Javier Arceo <[email protected]>
Preserve the remote native streaming lifecycle fixes while integrating the request-path ownership refactor from main. Share typed round preparation across HTTP and direct inference, keep upstream headers on the pipeline, and remove superseded accumulator convenience APIs. Signed-off-by: maral <[email protected]>
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 direct Responses inference against a managed headless vLLM engine, implementing the shared executor boundary in #360 and initial native integration from #359.
agentic serve,agentic run codex, and the source Python CLI'sagentic-api runselect HTTP with--upstream; otherwise they use$AGENTIC_API_HOME/model.config.Changes by API
/v1/responses, continuation, compaction)--upstream.Model recipe
model.configis TOML under the Agentic API home (default~/.agentic-api):Parser settings accept
auto(default),none, or a supported name. Direct mode configures vLLM's Rust frontend and forwards the resolved reasoning parser to the engine; HTTP mode uses the upstream server's parsers. Tokenizer/revisions, template, generation defaults, served name, and Python executable are also configurable.--modeloverrides the recipe's model. An inheritedLLM_API_BASEor saved upstream URL does not change the launcher's mode selection. Engine-specific flags go inengine_args; frontend/transport overrides there are rejected.Flow
flowchart TD CLI[Launcher] -->|upstream URL| HTTP[HTTP gateway] CLI -->|no upstream| Recipe[model.config] Recipe --> Native[Native composition: managed headless engine] HTTP --> Request[Shared request preparation and model projection] Native --> Request Request --> H[inference/http] Request --> D[inference/direct and agentic-vllm] H --> E[Existing EventFrame normalization and ingestion] D --> E E --> Loop[Shared delivery, tool loop, compaction and persistence]Model preparation loads tokenizer/template resources and configures parsers once; shared request preparation handles history and tools. Native events reuse SSE types and existing accumulators. vLLM classifies request errors as 400 and unavailable engines as 503; internal diagnostics remain private. Supervision covers startup, cancellation, health failures, and cleanup;
/readyfollows pause/resume and storage health.New modules
executor/inference/http/anddirect/: existing HTTP transport and injected native boundary with cancellation and event limits.agentic-vllm: unpublished model recipe, runtime, request conversion, and native event conversion; uses vLLM's existing frontend and managed-engine libraries.agentic-server-native: unpublished composition binary supervising the engine process group, including workers surviving launcher exit, and injecting its backend into the shared gateway.startup/,server/direct.rs, and launcheragentic_process/server.rs: shared configuration, native gateway startup, and graceful child supervision. Published core/server crates remain independent of vLLM.Type relationships
classDiagram ModelConfig --> ManagedEngineConfig ModelConfig --> VllmBackend Engine --> ManagedEngineConfig VllmBackend --> EngineCoreClient ExecutionContext o-- DirectInferenceBackend DirectInferenceBackend <|.. VllmBackend VllmBackend o-- ChatLlm ChatLlm --> EngineCoreClient DirectInferenceBackend --> EventFrame AgentPipeline *-- RoundIngestion RoundIngestion *-- ResponseAccumulator AgentPipeline *-- StreamRelay StreamRelay *-- GatewayStreamAccumulatorTest Plan
cargo test --workspace --no-fail-fast --locked --offline -- --test-threads=4: 3,283 passed, 25 ignored, no failures; all eight server lifecycle tests passed.agentic-server-native/agentic-vllmtests: 12 passed. Regression coverage checks Codex capability preservation, surviving worker cleanup, and native validation/unavailability error responses.cargo clippy --workspace --all-targets --locked --offline -- -D warnings, formatting, pre-commit hooks, andmkdocs build --strict: passed.No provider recordings were changed: HTTP contracts are unchanged. Native startup tests use a local tokenizer and fake engine process; they do not establish GPU/model conformance.
Current limits
Direct mode supports one replica, text/plain reasoning, and function tools including core-lowered custom/shell tools; unsupported options fail before submission. Native binaries require a source build and matching pinned Python vLLM engine. Live GPU/model qualification remains outstanding. The engine client's internal unbounded queue prevents an end-to-end memory-bound claim.