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(remote): correct the remote backend guides (#565)
Krisztian Gajdarff803863bef2
diff --git a/deploy/helm/sie-cluster/README.md b/deploy/helm/sie-cluster/README.mdindex d57133579..6b1875d51 100644--- a/deploy/helm/sie-cluster/README.md+++ b/deploy/helm/sie-cluster/README.md@@ -765,7 +765,7 @@ Enable the remote pool and define the upstreams:upstreams:team-sie:kind: sie- base_url: https://sie.example.internal+ base_url: https://team-sie.example.comapi_key_secret:name: team-sie-upstreamkey: api-key@@ -783,7 +783,9 @@ Below, `<fullname>` is the chart's full name: `<release>-sie-cluster`, or- Each `upstreams` entry has the fields of the server's upstreams file:`kind` (`sie` or `openai`), `base_url` (https outside loopback, with no- credentials, query or fragment), `rate_cap` (required) and an optional+ credentials, query or fragment, and a certificate from a public CA, because+ the worker verifies it against its built-in CA bundle and accepts no private+ CA bundle), `rate_cap` (required) and an optional`proxy_url`. An upstream of kind `openai` also declares the `endpoints` itoffers (`completions`, `chat`, `embeddings`, `rerank`) and may name requestfields to add to every call (`set_params`) or remove from itdiff --git a/deploy/helm/sie-cluster/values.yaml b/deploy/helm/sie-cluster/values.yamlindex 8031e977f..05c2a64ef 100644--- a/deploy/helm/sie-cluster/values.yaml+++ b/deploy/helm/sie-cluster/values.yaml@@ -451,7 +451,7 @@ machineProfiles:# Example:# team-sie:# kind: sie-# base_url: https://sie.example.internal+# base_url: https://team-sie.example.com# api_key_secret:# name: team-sie-upstream# key: api-keydiff --git a/packages/sie_server/MIGRATING_TO_SELF_HOSTED.md b/packages/sie_server/MIGRATING_TO_SELF_HOSTED.mdindex 6432a7d62..e5746fbe0 100644--- a/packages/sie_server/MIGRATING_TO_SELF_HOSTED.md+++ b/packages/sie_server/MIGRATING_TO_SELF_HOSTED.md@@ -18,7 +18,10 @@ returned vector dimensions and usage.Run representative application requests through SIE, including long inputs,instructions, refusals and your normal concurrency. Confirm remote serving-in SDK request metadata and record the outputs and usage. This is your own+in SDK request metadata and record the outputs and usage. When the upstream+reports no usage, SIE's native `encode`, `score` and `extract` responses omit+it rather than estimate it (an OpenAI-compatible upstream serves no `extract`),+so take those figures from the upstream's own records. This is your ownmigration baseline; it does not establish equivalence between backends.## 2. Prepare the local model separately@@ -40,7 +43,9 @@ Single-node hybrid embedding and score routing has narrowly scoped admission:revision-pinned native BGE-M3 profiles can use a fresh SIE identity comparisonor a measured OpenAI equivalence record bound to the same worker process.Follow the [admission instructions](REMOTE_BACKENDS.md#admitting-sie-identity-fallback)-before enabling fallback. Other local engines, including the MiniLM example+before enabling fallback. With an SIE upstream the comparison also runs at+startup, so that single node does not start while the upstream is unreachable+or reports a different identity. Other local engines, including the MiniLM exampleabove, remain outside that admission; compare their outputs for a deliberateremote-only to local-only cutover. Numerical cluster bridges remain gated under[issue #415](https://github.com/superlinked/sie/issues/415).@@ -86,8 +91,9 @@ A bridged request starts local warm-up. Cluster generation and extractionfallback use the normal queue path and require workers that support theversioned execution fence. Saturation and unhealthy-worker spill requireexplicit triggers. [Experimental cluster threshold routing](REMOTE_BACKENDS.md#experimental-cluster-threshold-routing)-requires a separate deployment opt-in; single-node threshold routing remains-refused. None of these modes makes unmeasured embedding outputs interchangeable.+requires a separate deployment opt-in and is available only in a cluster; a+single node uses `fallback`. None of these modes makes unmeasured embedding+outputs interchangeable.Record performance only from actual runs, including refusals and failures.No latency or cost improvement is assumed by this guide.diff --git a/packages/sie_server/REMOTE_BACKENDS.md b/packages/sie_server/REMOTE_BACKENDS.mdindex 07bc3bbfc..e8f764fd2 100644--- a/packages/sie_server/REMOTE_BACKENDS.md+++ b/packages/sie_server/REMOTE_BACKENDS.md@@ -51,9 +51,9 @@ operator-owned equivalence admission described below. SIE hybrid encode andscore require the fresh identity admission described below. Cluster remoteprofiles use the queue. Cluster generation and extraction fallback are describedbelow. Cluster saturation and unhealthy-worker spill require explicit triggers.-Numeric fleet bridges remain separately gated. Experimental cluster threshold-routing is opt-in as described below; single-node threshold routing remains-refused.+Numeric fleet bridges remain separately gated. Experimental `threshold` routing+is cluster-only and opt-in, as described below. A single node refuses a+`threshold` routing block at configuration load; use `fallback` there.## Single-node embedding example@@ -64,7 +64,7 @@ Start with another SIE deployment that already servesupstreams:team-sie:kind: sie- base_url: https://sie.example.internal+ base_url: https://team-sie.example.comapi_key_secret: TEAM_SIE_KEYrate_cap:requests_per_minute: 600@@ -121,9 +121,19 @@ with SIEClient(base_url="http://localhost:8080") as client:print(result["request"].get("upstream")) # team-sie```-SIE encode can succeed when upstream usage is absent. In that case the adapter-omits `input_token_counts` instead of estimating them. Malformed usage fails-the request. Native generation requires terminal usage for successful output.+Usage counts come from the upstream. When an upstream reports no usage, a+native `encode`, `score` or `extract` request still succeeds, and the response+omits `usage` instead of estimating it. This holds for every operation an+upstream kind supports, on a single node and in a cluster. Two+OpenAI-compatible routes differ. `/v1/embeddings` always returns a `usage`+object, so it reports a character-based estimate instead, which the gateway+marks with `sie_token_source: character_estimate`. `/v1/rerank` requires usage+and answers `500` when the score carries none. For an OpenAI-compatible+upstream, a `usage` object with no count in it counts as no usage. Malformed+usage fails the request: a value of the wrong type, an invalid count, or an SIE+upstream's `usage` without `input_tokens`. Generation fails closed: a+generation, chat or completion response without exact final usage is an+error, never a success.## OpenAI-compatible embeddings and rerank@@ -135,8 +145,10 @@ set `upstream_model` to the provider's model id.OpenAI-compatible embedding profiles support dense text only. Sparse,multivector, image input and extraction are rejected before dispatch. A rerank-upstream must accept the Cohere-shaped request and report usage. SIE restores-scores to document order rather than exposing the provider's ranked order.+upstream must accept the Cohere-shaped request. Without upstream usage,+`/v1/score` omits `usage` and `/v1/rerank` answers `500`, as described above.+SIE restores scores to document order rather than exposing the provider's+ranked order.The operator may add `set_params` and `strip_params` on the upstream. Reservedinput and response-shaping fields, including `model`, cannot be overridden or@@ -187,6 +199,12 @@ fragment are rejected. Redirects are refused, ambient proxy variables areignored, and inbound authorization is not forwarded. An explicit `proxy_url`is the supported egress proxy setting.+An upstream's certificate is verified against the public CA bundle that the+server's HTTP client ships with (certifi). `SSL_CERT_FILE`, `SSL_CERT_DIR` and+other environment settings are ignored, and no setting adds a private CA+bundle. An upstream whose certificate is issued by a private CA is therefore+refused; give it a certificate from a public CA.+## Cluster deploymentUse the Helm chart's [remote worker pool instructions](../../deploy/helm/sie-cluster/README.md#remote-backends).@@ -299,6 +317,15 @@ A successful observation lasts at most 30 seconds; a failed observation lastsrefuses another bridge instead of waiting or starting a second metadata request.Changes to the installed upstream discard the previous observation.+Because configuration load runs this comparison, a single-node server whose+models directory holds a hybrid SIE-identity `encode` or `score` model depends+on the upstream at startup. When the upstream cannot be reached, or reports a+different weights revision or identity, the server refuses the model and does+not start. A hot reload of that model runs the same comparison, reusing a+matching observation up to 30 seconds old, and a refused reload is logged. A+refused reload of a loaded model leaves it unloaded. To start while the upstream is down, remove the model's `routing` block, then+add it back by hot reload once the upstream answers.+Metadata is uncompressed and limited to 64 KiB. Its pool/socket operations sharea 5-second deadline, including partial headers and chunk framing; OS hostnameresolution follows the platform resolver's timeout. Synchronous primitive@@ -337,9 +364,11 @@ come only from startup upstream configuration; model API requests cannot supplyor install records. SIE upstreams refuse this policy and require their ownimmutable identity comparison instead.-Boot with `routing: {policy: always_local}` and both profiles configured. Run the-probe against that direct worker, writing to the declared evidence path, then-change the model YAML to `routing: {policy: fallback, fallback_profile: remote}`.+Boot with both profiles configured and no `routing` block, so the bare model+name is served locally. The valid policies are `remote_only`, `fallback` and+`threshold`; an absent block means local only. Run the probe against that+direct worker, writing to the declared evidence path, then add+`routing: {policy: fallback, fallback_profile: remote}` to the model YAML.Model-config hot reload admits the change in the same process. All profilesettings must stay unchanged between measurement and activation. An immutablenative BGE-M3 local profile is currently required; unidentified engines remain closed.@@ -500,6 +529,14 @@ for bounded-label and replica semantics.## Experimental cluster threshold routing+Threshold routing is available only in a cluster: the gateways count the+demand and make the decision. A server admits a `threshold` block only as a+queue worker behind a threshold-enabled gateway, which requires+`SIE_THRESHOLD_ROUTING_ENABLED=true` and the `SIE_IPC_SOCKET_PATH` that the+chart sets for queue workers. A single node runs without that socket path, so+it refuses the block at configuration load, and its own request path never+applies `threshold`. Use `fallback` on a single node.+Set `gateway.thresholdRouting.enabled: true` in the `sie-cluster` chart onlywhen opting into shared demand routing for generation or extraction. It is offby default. The chart requires authenticated inference NATS, sie-config and