Skip to content

SGLang

SGL (SGLang) is an OpenAI-compatible local/remote inference engine used for serving models with high throughput. Use it through DeepIntShield with the standard OpenAI-compatible request format. Key features:

  • OpenAI API compatibility - Identical request/response format
  • Full streaming support - Server-Sent Events with usage tracking
  • Tool calling - Complete function definition and execution
  • Text embeddings - Support for embedding models
  • Parameter filtering - Removes unsupported fields for compatibility
OperationNon-StreamingStreamingEndpoint
Chat Completions/v1/chat/completions
Responses API/v1/chat/completions
Text Completions/v1/completions
Embeddings-/v1/embeddings
List Models-/v1/models
Image Generation-
Speech (TTS)-
Transcriptions (STT)-
Files-
Batch-

SGL supports all standard OpenAI chat completion parameters. For full parameter reference and behavior, see OpenAI Chat Completions.

The following parameters are not supported by SGL and are ignored: prompt_cache_key, verbosity, store, service_tier.

SGL supports all standard OpenAI message types, tools, responses, and streaming formats. For details on message handling, tools, responses, and streaming, refer to OpenAI Chat Completions.


SGL supports the Responses API with the same parameter support as Chat Completions.


SGL supports legacy text completion format:

ParameterMapping
promptDirect pass-through
max_tokensmax_tokens
temperature, top_pDirect pass-through
frequency_penalty, presence_penaltySupported

SGL supports text embeddings for vector generation:

ParameterNotes
inputText or array of texts
modelEmbedding model name
encoding_format”float” or “base64”
dimensionsModel-specific dimension count

Response returns embedding vectors with usage information.


Lists available models from SGL server with capabilities.


FeatureReason
Speech/TTSNot offered by SGL API
Transcription/STTNot offered by SGL API
Batch OperationsNot offered by SGL API
File ManagementNot offered by SGL API

BaseURL Configuration Required

Severity: High Behavior: BaseURL must be explicitly configured Impact: Requests fail without proper configuration

Cache Control Stripped

Severity: Medium Behavior: Cache control directives are removed from messages Impact: Prompt caching features don’t work

Parameter Filtering

Severity: Low Behavior: OpenAI-specific fields filtered out Impact: prompt_cache_key, verbosity, store removed

User Field Size Limit

Severity: Low Behavior: User field > 64 characters silently dropped Impact: Longer user identifiers are lost