Local inference
Connect Ollama, vLLM, Unsloth, or another OpenAI-compatible model server to BitRouter.
Local inference servers share one BitRouter integration: expose an OpenAI-compatible endpoint, add it under providers, and declare the model ids that endpoint serves.
Common servers
| Server | Typical API base | Authentication | Model id source |
|---|---|---|---|
| Ollama | http://127.0.0.1:11434/v1 | None on loopback | ollama list |
| vLLM | http://127.0.0.1:8000/v1 | Optional --api-key | Served model name |
| Unsloth | http://127.0.0.1:8888/v1 | Server-issued key | GET /v1/models |
Ports and authentication can be changed by the server. Treat the table as a starting point and confirm the endpoint locally.
Configure BitRouter
providers:
local:
api_base: http://127.0.0.1:11434/v1
api_protocol:
- "*": chat_completions
models:
- id: llama3.1For an authenticated server, add an environment-backed key:
providers:
local:
api_base: http://127.0.0.1:8000/v1
api_key: ${LOCAL_INFERENCE_API_KEY}
api_protocol:
- "*": chat_completions
models:
- id: my-served-modelThe model id must match what the server accepts. For vLLM, that may be the full model repository id or the value supplied with --served-model-name. For Ollama, it is the pulled model tag. For Unsloth, use the id returned by its models endpoint.
Verify and route
bro config validate
bro models --provider local
bro route local:llama3.1
bro startThe provider-qualified id pins the local server. A bare model id lets BitRouter use another configured source serving the same model, which is useful for local-first fallback.
Keep an unauthenticated inference server on loopback or a trusted private network. Binding it publicly without its own authentication exposes model capacity outside BitRouter's policy boundary.
Server-specific references
How is this guide?