You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.coord.md
+3-225Lines changed: 3 additions & 225 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,62 +2,21 @@
2
2
3
3
A Go service that orchestrates multi-phase LLM inference pipelines (Encode/Prefill/Decode) across specialized worker pools. It exposes OpenAI-compatible APIs and routes requests through an Inference Gateway to disaggregated vLLM workers.
4
4
5
+
For the architecture, request lifecycle, EPP integration, and plugin API, see [docs/coordinator_architecture.md](docs/coordinator_architecture.md). For the exact per-stage wire formats, see [docs/communication.md](docs/communication.md).
The coordinator sends every sub-request to the same gateway address. It does not use phase-specific URL prefixes; instead it stamps an `EPP-Phase` header (`encode`, `prefill`, or `decode`) so the Endpoint Picker can route to the correct worker pool. The request path is chosen by the request format:
145
-
146
-
| Phase | Header | Path |
147
-
|-------|--------|------|
148
-
| Encode | `EPP-Phase: encode` | `/v1/completions` for completions requests; otherwise `/inference/v1/generate`, or `/v1/chat/completions` when `use_openai_format` is set |
149
-
| Prefill | `EPP-Phase: prefill` | same as encode |
150
-
| Decode | `EPP-Phase: decode` | original client request path (`/v1/chat/completions` or `/v1/completions`) |
151
-
152
-
The decode step preserves the original client request path so the gateway can route it to the correct OpenAI-compatible endpoint on the decode worker.
153
-
154
-
## Plugin API
155
-
156
-
Custom pipeline steps can be added by implementing the `Step` interface and registering a factory function.
A step that needs the shared gateway HTTP client implements `gateway.ClientAware`. After building each step, the coordinator type-asserts it against this interface and calls `SetGatewayClient` when it matches:
234
-
235
-
```go
236
-
// gateway.ClientAware receives the shared gateway HTTP client.
237
-
type ClientAware interface {
238
-
SetGatewayClient(*Client)
239
-
}
240
-
```
241
-
242
-
Step parameters from the YAML `params` map are the mechanism for everything else. For example, the render step reads its service address from `params.address` in its factory rather than through an injected interface. The render step does expose a `SetServiceAddress` method, but it is used only by tests to point the step at a local server and is not called in production.
243
-
244
-
### RequestContext
245
-
246
-
The `RequestContext` is the shared state passed between steps:
ECTransferParams []map[string]any // Encode results, one entry per encode response (mm_hash -> descriptor)
260
-
KVTransferParams map[string]any // Prefill KV-cache transfer hints, consumed by the KV connector at decode
261
-
ResponseWriter http.ResponseWriter // Client response writer; decode steps stream the final response to it
262
-
}
263
-
```
41
+
Configuration is a YAML file passed via the `--config` flag. See `config/coordinator/coordinator.yaml` for the annotated default, and [Configuring the pipeline](docs/coordinator_architecture.md#configuring-the-pipeline) for the full reference (top-level structure, environment overrides, connector selection, and the built-in steps).
Please see the [llm-d Security Policy](https://github.com/llm-d/llm-d/blob/main/SECURITY.md) in the main repository for vulnerability reporting and disclosure information.
0 commit comments