Expand description
Every path ferrox-server serves, named once.
Only routes that actually exist belong here. A constant for a not-yet-implemented endpoint is worse than no constant at all: it reads as a promise, and a client that imports it gets a 404 with the contract crate’s blessing.
Constants§
- ADMIN_
DOWNLOAD - Fetch a
.gguffrom the Hugging Face Hub into the model directory. Answers202with a task id. - ADMIN_
MODELS - Model inventory: what is on disk, what is loaded, what failed.
- ADMIN_
MODELS_ LOAD - Start loading a discovered model by its
id. Answers202with a task id; the load itself runs off the request. - ADMIN_
MODELS_ UNLOAD - Drop the active model. Synchronous: unloading is releasing one
Arc, and requests already decoding keep theirs. - ADMIN_
STATS - Counters, uptime, and the recent-request ring buffer.
- ADMIN_
TASKS - Every long-running job this server knows about, newest first.
- ADMIN_
TASK_ CANCEL - Request cancellation of one task. A template, not a literal: the
{task_id}placeholder is written in the OpenAPI style rather than any one web framework’s, because this crate is imported by clients that have never heard of the server’s router. Build a concrete path withadmin_task_cancel. - ALL
- Every fixed route above, for clients that want to enumerate the surface (and for the round-trip test below).
- CACHE_
STATS - Response- and prefix-cache counters.
- HEALTH
- Liveness + readiness + capability handshake. Never behind auth, so a
probe works regardless of
FERROX_API_KEY. - METRICS
- Prometheus text-exposition metrics.
- V1_
CANCEL - Explicit cancellation of one in-flight generation, by the
request_idthe server states on the first streamed chunk. - V1_
CHAT_ COMPLETIONS - V1_
COMPLETIONS - V1_
DETOKENIZE - V1_
EMBEDDINGS - V1_
MESSAGES - Anthropic-compatible messages endpoint.
- V1_
MODELS - V1_
STREAM - Reconnect into a stream started with
stream_resumable: true, resuming after theLast-Event-IDthe client last saw. - V1_
STREAM_ POLL - The same replay buffer over plain JSON, for the case SSE cannot
survive: a reverse proxy that buffers
text/event-streamturns a stream into one long silence, and cannot do that to a short response that has already ended. Build a concrete path withv1_stream_poll. - V1_
TOKENIZE
Functions§
- admin_
task_ cancel - The concrete cancel path for one task id.
- v1_
stream - The concrete resume path for one request id.
- v1_
stream_ poll - The concrete polling-fallback path for one request id.