Open-source inference server and production cluster for all the models your agent needs.
Python bgecolbertdata-pipelinedeep-learningembeddingsinferenceinference-serverinformation-retrievalllmmlmlopsnatural-language-processingnlppythonrerankingretrievalretrieval-augmented-generationsemantic-searchspladevector-search
docs(gateway): state that an overflowing unsupported-models list closes the worker's lane (#426)
Krisztian Gajdarb46f04a93024
diff --git a/packages/sie_gateway/docs/architecture-guide.md b/packages/sie_gateway/docs/architecture-guide.mdindex c8459598c..d278f1349 100644--- a/packages/sie_gateway/docs/architecture-guide.md+++ b/packages/sie_gateway/docs/architecture-guide.md@@ -278,7 +278,7 @@ Computation rules:A model belongs to a bundle's hash when one of its profiles resolves to an adapter module in that bundle's `adapters` list. All three services use `sie-config`'s list for this. `sie-config` sends it as `bundle_adapters` (bundle id to adapter modules) with every export snapshot and live delta, and the worker sidecar forwards the list for its bundle over backend IPC (`ApplyModelConfig` / `ReplaceModelConfigs`). The Python worker then hashes the configs it received with that list, so a worker whose image predates an adapter still reproduces the control-plane hash. A worker that has not yet received a list, or whose `sie-config` does not send one, uses the list in its image's bundle file, as before. When the worker's schema rejects an export entry, the worker hashes the received entry's routable fields, so the hash still identifies what the control plane sent.-Hash equality therefore no longer implies that the worker can serve every model it covers. The worker reports the routable ids it cannot serve as `unsupported_models`: those whose adapter module is in the control-plane list but not in its image's bundle file, and those whose export entry its schema rejected when the config it retains differs in hashed fields (or it has none). The sidecar commits the list together with the hash, publishes it in its heartbeat (omitted when empty), and NAKs work for a listed model before backend IPC. The gateway routes a model to a worker only when the hash matches and the model is not listed (§2). A worker that sends no list serves every model its hash covers: before this field existed, workers hashed with their image's adapter list, so a matching hash already implied that the image contains every covered adapter. The same holds for a hash that reaches a heartbeat without a list today. Backend IPC `Ping` carries no list, so the Python worker's `Ping` hash stays scoped by its image's bundle file, and a sidecar adopts it only while it has committed no config (at startup, including a sidecar restart next to a running worker). The gateway accepts at most 1024 ids per heartbeat. A worker that reports more is routed no model until it reports fewer, because a dropped id would otherwise read as supported. The Candle worker reports no list. It echoes the control-plane hash only after it has parsed and applied every entry of the export or delta, so an echoed hash implies full support. An entry it cannot parse fails the whole apply: the worker keeps its previous hash and the sidecar does not advance, so the bundle is held on that worker as before.+Hash equality therefore no longer implies that the worker can serve every model it covers. The worker reports the routable ids it cannot serve as `unsupported_models`: those whose adapter module is in the control-plane list but not in its image's bundle file, and those whose export entry its schema rejected when the config it retains differs in hashed fields (or it has none). The sidecar commits the list together with the hash, publishes it in its heartbeat (omitted when empty), and NAKs work for a listed model before backend IPC. The gateway routes a model to a worker only when the hash matches and the model is not listed (§2). A worker that sends no list serves every model its hash covers: before this field existed, workers hashed with their image's adapter list, so a matching hash already implied that the image contains every covered adapter. The same holds for a hash that reaches a heartbeat without a list today. Backend IPC `Ping` carries no list, so the Python worker's `Ping` hash stays scoped by its image's bundle file, and a sidecar adopts it only while it has committed no config (at startup, including a sidecar restart next to a running worker). The gateway accepts at most 1024 ids per heartbeat. A worker that reports more counts as unable to serve any model until it reports fewer, because a dropped id would otherwise read as supported. A lane is eligible only when every hash-matching worker in it can serve the model (§2), so the whole lane of an overflowing worker is routed no model while it overflows. The Candle worker reports no list. It echoes the control-plane hash only after it has parsed and applied every entry of the export or delta, so an echoed hash implies full support. An entry it cannot parse fails the whole apply: the worker keeps its previous hash and the sidecar does not advance, so the bundle is held on that worker as before.The hash is a SHA-256 over a JSON-serialized, sort-keys representation of a structured object. The outer shape is an array of models, each with `sie_id`, `revision`, and `profiles: [{name, config: {...4 fields...}}]`. `revision` is the immutable `hf_revision` commit SHA, or null for package-backed/unpinned development models. The inner `config` for each profile is strictly the four routable-profile fields: `adapter_path`, `max_batch_tokens`, `compute_precision`, `adapter_options`. Any field outside that whitelist is excluded from the hash so that non-routable edits (e.g. comments, description-style metadata) cannot unnecessarily invalidate worker acks. Python uses `orjson.dumps(..., OPT_SORT_KEYS)`; Rust mirrors this via `serde_json::to_vec` over `BTreeMap`-backed canonical types.diff --git a/packages/sie_gateway/openapi.json b/packages/sie_gateway/openapi.jsonindex bbd869224..c1693c525 100644--- a/packages/sie_gateway/openapi.json+++ b/packages/sie_gateway/openapi.json@@ -3981,7 +3981,7 @@"type": "array"},"unsupported_models_overflow": {- "description": "The worker reported more unsupported models than the gateway accepts\n(1024), so no model is routed to it. Omitted when false.",+ "description": "The worker reported more unsupported models than the gateway accepts\n(1024), so no model is routed to its lane (pool, machine profile,\nbundle) while it overflows. Omitted when false.","type": "boolean"},"url": {diff --git a/packages/sie_gateway/src/types/worker.rs b/packages/sie_gateway/src/types/worker.rsindex 8c3eda4bd..4cb3d45a6 100644--- a/packages/sie_gateway/src/types/worker.rs+++ b/packages/sie_gateway/src/types/worker.rs@@ -51,7 +51,7 @@ pub struct WorkerState {pub unsupported_models: Arc<[String]>,/// The worker reported more than [`MAX_UNSUPPORTED_MODELS`] ids. It is/// then treated as unable to serve any model, because a dropped id would- /// otherwise read as supported.+ /// otherwise read as supported, so its whole lane is routed no model.pub unsupported_overflow: bool,}@@ -123,7 +123,8 @@ pub struct WorkerInfo {#[serde(default, skip_serializing_if = "Vec::is_empty")]pub unsupported_models: Vec<String>,/// The worker reported more unsupported models than the gateway accepts- /// (1024), so no model is routed to it. Omitted when false.+ /// (1024), so no model is routed to its lane (pool, machine profile,+ /// bundle) while it overflows. Omitted when false.#[serde(default, skip_serializing_if = "std::ops::Not::not")]pub unsupported_models_overflow: bool,}