SGLang serves open-weight models via an OpenAI-compatible HTTP API. OpenClaw connects to SGLang using theDocumentation Index
Fetch the complete documentation index at: https://docs.openclaw.ai/llms.txt
Use this file to discover all available pages before exploring further.
openai-completions provider family with auto-discovery of available models.
| Property | Value |
|---|---|
| Provider id | sglang |
| Plugin | bundled, enabledByDefault: true |
| Auth env var | SGLANG_API_KEY (any non-empty value if server has no auth) |
| Onboarding flag | --auth-choice sglang |
| API | OpenAI-compatible (openai-completions) |
| Default base URL | http://127.0.0.1:30000/v1 |
| Default model placeholder | sglang/Qwen/Qwen3-8B |
| Streaming usage | Yes (supportsStreamingUsage: true) |
| Pricing | Marked external-free (modelPricing.external: false) |
SGLANG_API_KEY. Use sglang/* in agents.defaults.models to keep discovery dynamic when you also configure a custom SGLang base URL. See Model discovery (implicit provider) below.
Getting started
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
Model discovery (implicit provider)
WhenSGLANG_API_KEY is set (or an auth profile exists) and you do not
define models.providers.sglang, OpenClaw will query:
GET http://127.0.0.1:30000/v1/models
If you set
models.providers.sglang explicitly, OpenClaw uses your declared
models by default. Add "sglang/*": {} to agents.defaults.models when you
want OpenClaw to query that configured provider’s /models endpoint and include
all advertised SGLang models.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.| Behavior | SGLang |
|---|---|
| OpenAI-only request shaping | Not applied |
service_tier, Responses store, prompt-cache hints | Not sent |
| Reasoning-compat payload shaping | Not applied |
Hidden attribution headers (originator, version, User-Agent) | Not injected on custom SGLang base URLs |
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.