Inference Auth Posture
Overview
Sección titulada «Overview»GET /v1/models and the inference endpoints are gated by different
settings. The most natural probe an operator runs to answer “is my API
protected?” can therefore return the wrong answer.
| Endpoint | Gated by |
|---|---|
GET /v1/models |
The dashboard login posture — isAuthRequired(), overridable per-instance with requireAuthForModels (src/app/api/v1/models/catalogRequest.ts) |
POST /v1/chat/completions, POST /v1/responses, and the other client API routes |
REQUIRE_API_KEY (src/server/authz/policies/clientApi.ts) |
On an instance that has an admin password set and REQUIRE_API_KEY=false,
/v1/models answers 401 while inference is open to anyone who can reach the
port.
Probing caveat: a
401from/v1/modelsdoes not verify that inference is protected. It only tells you the dashboard requires login.
This is not hypothetical. In discussion #13310 a self-hosted instance behind
Traefik had its Codex quota spent by anonymous POST /v1/responses traffic
while /v1/models returned 401 — which, in the reporter’s words, “initially
created the impression that the entire API was protected” and sent them
investigating the wrong component.
How to actually check
Sección titulada «How to actually check»Probe an inference route, not the catalog:
curl -s -o /dev/null -w '%{http_code}\n' \ -X POST http://<host>:<api-port>/v1/chat/completions \ -H 'content-type: application/json' \ -d '{"model":"<any-model>","messages":[{"role":"user","content":"ping"}]}'A 401 means REQUIRE_API_KEY is enforcing. Anything that reaches routing
(including a model-not-found error) means anonymous traffic is accepted.
Note that with REQUIRE_API_KEY=false an invalid bearer degrades to
anonymous rather than rejecting (#2257), so sending a junk key is not a valid
probe either.
Startup warning
Sección titulada «Startup warning»When REQUIRE_API_KEY is disabled and a server binds a non-loopback interface,
OmniRoute logs a warning at boot (src/lib/startup/nonLoopbackApiKeyGuard.ts).
This covers three surfaces:
- the Dashboard/API server that serves
/v1inference —HOST, default0.0.0.0 - the API bridge —
API_HOST, default127.0.0.1 - the live dashboard WebSocket — its own host
The warning never blocks boot: a reverse proxy in front of OmniRoute may already be enforcing its own authentication.
Related
Sección titulada «Related»REQUIRE_API_KEYin ENVIRONMENT.mdAPP_BIND_HOSTand the compose loopback defaults (#12568)- #2257 — invalid bearer degrades to anonymous when
REQUIRE_API_KEYis off - #13695 — this document
HagiCode
HagiCode es un espacio de programación con agentes. Las interacciones de interfaz, ricas y cómodas, hacen que planificar, ejecutar agentes y trabajar en proyectos sea accesible y fácil de seguir, para una experiencia de desarrollo atractiva.
Una experiencia de desarrollo atractiva gracias a interacciones de interfaz ricas y cómodas.
- InteligenteLos flujos de trabajo de OpenSpec convierten la intención en un itinerario ejecutable, de la propuesta al diseño, las tareas y la entrega.
- EficienteLa ejecución multiagente avanza en paralelo con la investigación, la implementación y la revisión, en varios repositorios y con los Agent CLI que ya usas.
- InteresanteLas interacciones de interfaz, ricas y cómodas, hacen que planificar, ejecutar agentes y trabajar en proyectos sea accesible y fácil de seguir.
Descargar para Windows
Compartir HagiCode
Convierte ideas en software entregado.
HagiCode es un espacio de trabajo de programación con agentes: los flujos de trabajo de OpenSpec planifican el cambio, la ejecución multiagente lo lleva a cabo y Hero Scenario hace visible el largo recorrido, para convertir ideas en software entregado.
- Inteligente
- Los flujos de OpenSpec convierten la intención en un camino de la propuesta a la entrega.
- Eficiente
- La ejecución multiagente avanza en paralelo con investigación, implementación y revisión.
- Divertido
- Las interacciones de interfaz facilitan la planificación, los agentes y el trabajo en proyectos.
© 2026 HagiCode | Powered By hagilight-starlight@0.21.0 | Branch: main | Commit: de60bcd | Built:

