Request flow
This is how a chat completion request flows through the native backend.
- Client sends
POST /v1/chat/completionswith{"model": "zai-org/GLM-5.3"}to the API endpoint (api.thalamus.../v1). - The request reaches the API listener of the shared inference gateway.
- An
AgentgatewayPolicyextracts the model name from the JSON body and sets it as theX-Gateway-Base-Model-Nameheader. - The per-model
HTTPRoutematches that header and the path, and points to theAgentgatewayBackend. - The
AgentgatewayBackendhandles authentication and authorization and references the model'sInferencePool. - The gateway uses the
InferencePoolto discover candidate engine pods and to find the corresponding Endpoint-Picker (EPP). - The EPP scores model replicas using real-time signals (e.g. KV-cache utilization, queue depth, ...) and returns the chosen engine deployment.
- vLLM generates the response and streams it back through the same path.
Requests to /v1/models get answered directly via a model-list AgentgatewayPolicy that the operator keeps in sync with the Ready models in the namespace. Only model replicas that are ready to respond to requests are exposed to users.
Authentication is optional and enforced at the gateway by an AgentgatewayPolicy, for example API-key authentication backed by Kubernetes secrets.