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
SetDEEPSEEK_API_KEY, then use the deepseek:<model> id:
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 throughModelCreationContext when resolving the model:
ThinkingBlockDeltaEvent separately from TextBlockDeltaEvent.
Compatibility notes
The DeepSeek formatter preserves DeepSeek-compatible message fields, includingsystem 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.