Thalamus · Configuration & integration

Administer the relay and inspect headers

Protect the listener, especially admin routes, with a trusted network or an authenticated reverse proxy. The router has no built-in authentication middleware. Public exposure requires a separate security decision.

This applies to inference, model listing, health, status, mutations and metrics alike: no API-key validation or per-route authorization exists. The CLI exposes no auth-token/header option; arrange access through your network/proxy policy rather than looking for a nonexistent THALAMUS_API_KEY setting.

Policy updates are mutations, not settings reads. POST /admin/v1/policy, /lb/policy and /lb/reset all reset statistics and pins, even with an empty body. Account for that reset before changing admission or selection settings.

Routed upstream responses include x-thalamus-node, x-thalamus-plane, x-thalamus-policy, x-thalamus-sticky-hit, x-thalamus-work-stolen, x-thalamus-queue-wait-ms. Intelligence selections also include x-thalamus-session-id and x-thalamus-session-source. Do not expect routing headers on preselection error responses. Policy headers use legacy values (sticky_least_loaded_3node, round_robin_3node, single_node); prefer policy_canonical in status for canonical names.

An optional legacy_header_prefix emits <prefix>-backend (same value as node), -policy, -sticky-hit, -session-id, -session-source. It does not duplicate plane, stolen or queue-wait headers. Prefixes must be nonempty lowercase ASCII letters/digits with single internal hyphens, no leading/trailing hyphen, and not x-thalamus. Unset emits only the canonical family. Historical policy names and /lb/* aliases are compatibility surfaces, not topology guarantees.

Successful register, drain and remove return 200 JSON {"status":"registered|draining|removed","member":{...}} (one corresponding status string, not the literal alternatives). Policy mutations return the full status object. Omitted policy fields leave settings unchanged but still reset counters, inflight accounting, recent in-memory requests and pins; durable telemetry is not cleared. active_nodes: [] removes the intelligence filter; an omitted filter preserves it. Blank single_node does not clear the preferred name. These updates are in-memory, not config-file edits; avoid resetting while requests are active if you rely on current inflight counts.