deepseek-recipe is a collection of Rust libraries and Python bindings that convert API requests into formats compatible with DeepSeek models.
The tool solves the problem of bridging multiple API request formats to DeepSeek model inference. It accepts requests in Messages, Chat Completions, and Responses formats, converts them into prompts encoded for DeepSeek V4 and V4.1 models, and transforms model output back into the corresponding response format. The approach treats request conversion, prompt encoding, and response parsing as separate composable components that can be integrated with external inference backends and HTTP transport layers.
Developers should choose this tool when building API services that need to support multiple request formats while using DeepSeek models as the inference backend. It suits projects that require flexibility in API compatibility without reimplementing format conversion logic. The tool handles text and image inputs, thinking mode, tool calling, and streaming responses. Notable limitations include lack of support for token probabilities, document or audio input, server-side tool execution like web search, JSON Schema output constraints, and conversation storage through the Responses API.
The project maintains active development with regular updates to support new model versions and API features. Rust serves as the primary implementation language with Python bindings provided for broader accessibility. The codebase includes comprehensive documentation covering streaming responses, tokenizer integration, and development setup including image preprocessing dependencies. Example code and an interactive demo are available to help developers understand the conversion pipeline.