v1.4.0
This release aligns the SDK with the latest DeepSeek V4 API, adds Anthropic-compatible API support, and resolves security vulnerabilities.
New Features
- Anthropic-compatible API: New
AnthropicClientwithCreateAnthropicMessage,CreateAnthropicMessageStream, Claude model auto-mapping, content blocks (text, thinking, tool_use, tool_result), and SSE streaming - V4 model constants:
DeepSeekV4FlashandDeepSeekV4Prowith runtime deprecation warnings for the oldDeepSeekChat/DeepSeekReasoner/DeepSeekCodermodels (sunset 2026/07/24) reasoning_effortparameter on all request structs for controlling reasoning depth ("high"/"max")user_idparameter on all request structs for multi-tenant isolation (content safety, KVCache, scheduling)- Strict function calling:
Strictfield onFunctionwith automatic/betaendpoint routing - Structured output support:
json_schematype added toResponseFormat CompletionTokensDetails: Now included in both streaming and non-streamingUsagestructs
Fixes
- Security: Updated
github.com/ollama/ollamafromv0.6.5tov0.24.0, resolving 4 Dependabot alerts tool_choice: Added toStreamChatCompletionRequest(previously only on non-streaming)- Float precision: FIM request types normalized to
float32for consistency with chat types - CI: Go version bumped from 1.24 to 1.26
New Examples
14_reasoning_effort— reasoning_effort usage with "high" and "max"15_user_id— multi-tenant user isolation16_strict_tools— strict function calling with/betarouting
Breaking Changes
- Go version: Now requires Go >= 1.26.0 (Ollama dependency requirement)
- Deprecated model names: Using
DeepSeekChat,DeepSeekReasoner, orDeepSeekCodernow emits a deprecation warning to stderr. Switch toDeepSeekV4FlashorDeepSeekV4Pro.
Migration Guide
Replace deepseek.DeepSeekChat with deepseek.DeepSeekV4Flash and deepseek.DeepSeekReasoner with deepseek.DeepSeekV4Pro. See PR #82 for the full diff.