Skip to content

v1.4.0: DeepSeek V4 API alignment, Anthropic SDK support, and security fixes

Latest

Choose a tag to compare

@Vein05 Vein05 released this 30 May 23:00

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 AnthropicClient with CreateAnthropicMessage, CreateAnthropicMessageStream, Claude model auto-mapping, content blocks (text, thinking, tool_use, tool_result), and SSE streaming
  • V4 model constants: DeepSeekV4Flash and DeepSeekV4Pro with runtime deprecation warnings for the old DeepSeekChat / DeepSeekReasoner / DeepSeekCoder models (sunset 2026/07/24)
  • reasoning_effort parameter on all request structs for controlling reasoning depth ("high" / "max")
  • user_id parameter on all request structs for multi-tenant isolation (content safety, KVCache, scheduling)
  • Strict function calling: Strict field on Function with automatic /beta endpoint routing
  • Structured output support: json_schema type added to ResponseFormat
  • CompletionTokensDetails: Now included in both streaming and non-streaming Usage structs

Fixes

  • Security: Updated github.com/ollama/ollama from v0.6.5 to v0.24.0, resolving 4 Dependabot alerts
  • tool_choice: Added to StreamChatCompletionRequest (previously only on non-streaming)
  • Float precision: FIM request types normalized to float32 for 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 isolation
  • 16_strict_tools — strict function calling with /beta routing

Breaking Changes

  • Go version: Now requires Go >= 1.26.0 (Ollama dependency requirement)
  • Deprecated model names: Using DeepSeekChat, DeepSeekReasoner, or DeepSeekCoder now emits a deprecation warning to stderr. Switch to DeepSeekV4Flash or DeepSeekV4Pro.

Migration Guide

Replace deepseek.DeepSeekChat with deepseek.DeepSeekV4Flash and deepseek.DeepSeekReasoner with deepseek.DeepSeekV4Pro. See PR #82 for the full diff.