Skip to main content
agentscope-extensions-model-openai provides first-class DeepSeek support through the OpenAI-compatible model stack. Add the OpenAI model extension module, then use deepseek:<model> with ModelRegistry.

Add the dependency

ModelRegistry

Set DEEPSEEK_API_KEY, then use the deepseek:<model> id:
The provider defaults to https://api.deepseek.com, strips the deepseek: prefix before sending the model name, and uses the DeepSeek formatter from io.agentscope.extensions.model.openai.compat.deepseek.

Thinking mode

Enable DeepSeek thinking mode through ModelCreationContext when resolving the model:
Streaming callers can render ThinkingBlockDeltaEvent separately from TextBlockDeltaEvent.

Compatibility notes

The DeepSeek formatter preserves DeepSeek-compatible message fields, including system roles and supported name fields. It also removes stale reasoning content from previous turns while preserving reasoning content needed by current tool-call context. DeepSeek’s stable endpoint does not use the tool schema strict field by default, so the default formatter omits strict even when a tool is registered with strict schema validation. Structured output uses the normal AgentScope fallback behavior unless you explicitly configure native structured output for a compatible endpoint. For beta or compatible endpoints, pass baseUrl, endpointPath, generation options, or formatter overrides through ModelCreationContext.