/v1 API and exposes
SGLang-native endpoints through provider passthrough. Hugging Face model IDs
with slashes work because GoModel splits provider-qualified selectors on the
first slash only.
Start SGLang first:
Configure
These examples assume GoModel runs in Docker and SGLang runs on the host. If
both run in the same Docker or Kubernetes network, use the SGLang service
name. If GoModel runs directly on the host, use
http://localhost:30000/v1.Run GoModel
Verify
GET /v1/models returns SGLang model IDs prefixed by provider name, for
example sglang/Qwen/Qwen2.5-0.5B-Instruct.
Multiple SGLang instances
Use suffixed environment variables to register more than one instance without YAML:sglang and sglang-test. The suffix is lowercased and
underscores become hyphens.
Native passthrough
Passthrough is enabled by default. Root-relative SGLang endpoints such as/generate are sent without the configured /v1 prefix:
v1/ segment for SGLang endpoints that include it, such as
/v1/rerank or /v1/tokenize:
SGLANG_API_KEY when configured.
Capability notes
- Chat completions, streaming, model listing, Responses, and embeddings use SGLang’s OpenAI-compatible API.
- Embeddings and model-specific features depend on the model loaded by SGLang.
- Native batch, file, and stored-response lifecycle interfaces are not yet exposed as typed GoModel provider capabilities; use passthrough where the installed SGLang version supports them.