Archived
[FIX] restore the prompt vocabulary check, the empty --api-key refusal and scored steps' issue-ahead rule
33108e48(the preempted-prefill gate's wait bound) was cut from an older main and, landing, took back three changes that had merged before it: -a28221eb: a prompt id outside the vocabulary is refused at admission (Scheduler::add_locked), never staged into a pass where the embedding gather faults the device and stops the engine; and its test, a_prompt_names_real_vocabulary_rows. -b9c685a9: --api-key "" is a startup error, not a server that looks guarded and answers every keyless request; and the guide's lines on it and on the loopback-only routes. -ed1e5caf: a scored row the step in flight finishes gets no step issued ahead; and its two tests, the non-scored one with a token left after the step in flight so that a step ahead exists (#349). The wait bound itself, the lookup index and the rest of33108e48are unchanged. sched_test 176, config_test 62 and server_test 177 cases pass. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qthwau4zwWgAaD8vZrycp1
This commit is contained in:
1 parent
8df9240d65
commit
d773992abc
4 files changed
+104
-5
No files matched your search
+8
-3
@@ -2129,7 +2129,7 @@ by 0.002-0.003 nats.
|
||||
|---|---|---|
|
||||
| `--host ADDR` | 0.0.0.0 | listen address |
|
||||
| `--port N` | 8000 | listen port |
|
||||
| `--api-key KEY` | none | require `Authorization: Bearer KEY` or `X-Api-Key: KEY` on every request but `/health`, `/v1/health`, `/ping` and the dashboard page (§6.6) |
|
||||
| `--api-key KEY` | none | require `Authorization: Bearer KEY` or `X-Api-Key: KEY` on every request but `/health`, `/v1/health`, `/ping` and the dashboard page (§6.6); the key must be non-empty |
|
||||
| `--served-model-name NAME` | container's name | the model id `/v1/models` lists, the metrics carry and a response names when its request named none. A request may name any model; the loaded one serves it |
|
||||
| `--mm-max-patches N` | auto | patches one vision-encoder pass carries, and so the largest image (a patch is 16x16 pixels, 14x14 on GLM-5.3). `auto` is 16384 when the container carries a vision tower; 0 serves text only and keeps the tower off the card. A pass is not one tower invocation: inside it the tower batches at most 8 tiles per weight read, and the pass size may reduce that (4 tiles at the 64-pixel grid with the default 16384 patches); a picture contributes a separate pass per grid. See the concurrency notes for Unlimited-OCR (§5.17) |
|
||||
| `--override-chat-template PATH` | container's | a Jinja chat template file served in place of the container's. The reply format (reasoning markers, tool calls) is derived from it too, unless the architecture plugin declares one. An unreadable or empty file stops startup |
|
||||
@@ -3685,11 +3685,16 @@ With a key, every request must carry `Authorization: Bearer KEY` (or Anthropic's
|
||||
or it is answered 401, `/tokenize` and `/server_info` included. Exempt are `/health`, `/v1/health` and
|
||||
`/ping`, because load balancers cannot send a bearer token, and the dashboard page (`/`,
|
||||
`/dashboard`), which holds no data: on a 401 it asks for the key, keeps it in the browser's storage
|
||||
and sends it on every data fetch.
|
||||
and sends it on every data fetch. The exemption follows those paths' methods -- reads, plus the
|
||||
`POST /ping` of the health-check convention -- so it cannot follow a method no route answers.
|
||||
An empty `--api-key` value is a startup error: it would guard nothing.
|
||||
|
||||
Without a key, `/diagnostics` answers only loopback clients (others get 403), because it describes
|
||||
the host: kernel, boot parameters, PCI layout, memory limits. Read it on the machine, or start the
|
||||
server with `--api-key`.
|
||||
server with `--api-key`. The same loopback-only rule covers the control-vector default and runtime
|
||||
LoRA loads, and a browser page on another origin does not qualify as a loopback client even when
|
||||
its own machine serves the port: that is how a hostile web page would reach these routes through a
|
||||
victim's browser, and a request that says `Origin: http://evil` is refused the way a remote one is.
|
||||
|
||||
The key is not encrypted in transit. On a network you do not control, bind to localhost behind a
|
||||
TLS-terminating reverse proxy:
|
||||
|
||||
Reference in new issue
Block a user