SGLang
SGLang can serve open-source models via an OpenAI-compatible HTTP API. Velaclaw can connect to SGLang using theopenai-completions API.
Velaclaw can also auto-discover available models from SGLang when you opt
in with SGLANG_API_KEY (any value works if your server does not enforce auth)
and you do not define an explicit models.providers.sglang entry.
Getting started
1
Start SGLang
Launch SGLang with an OpenAI-compatible server. Your base URL should expose
/v1 endpoints (for example /v1/models, /v1/chat/completions). SGLang
commonly runs on:http://127.0.0.1:30000/v1
2
Set an API key
Any value works if no auth is configured on your server:
3
Run onboarding or set a model directly
Model discovery (implicit provider)
WhenSGLANG_API_KEY is set (or an auth profile exists) and you do not
define models.providers.sglang, Velaclaw will query:
GET http://127.0.0.1:30000/v1/models
If you set
models.providers.sglang explicitly, auto-discovery is skipped and
you must define models manually.Explicit configuration (manual models)
Use explicit config when:- SGLang runs on a different host/port.
- You want to pin
contextWindow/maxTokensvalues. - Your server requires a real API key (or you want to control headers).
Advanced configuration
Proxy-style behavior
Proxy-style behavior
SGLang is treated as a proxy-style OpenAI-compatible
/v1 backend, not a
native OpenAI endpoint.Troubleshooting
Troubleshooting
Server not reachableVerify the server is running and responding:Auth errorsIf requests fail with auth errors, set a real
SGLANG_API_KEY that matches
your server configuration, or configure the provider explicitly under
models.providers.sglang.Related
Model selection
Choosing providers, model refs, and failover behavior.
Configuration reference
Full config schema including provider entries.