Tools
deepseek-recipe converts Messages, Chat Completions and Responses requests into DeepSeek V4/V4.1 prompts for self-hosted inference
deepseek-ai/deepseek-recipe (created 2026-09-10, 283 stars) is a set of Rust libraries with Python bindings. They normalize Anthropic-style Messages, Chat Completions and Responses requests into one Conversation format, encode them into V4/V4.1 prompts or token IDs, and parse thinking, tool calls, JSON output and stop sequences back into each format, including streaming. It does not yet support logprobs, server-side tools like web_search, or JSON Schema constraints. If you self-host V4.1, this is the official way to expose it behind any of the three common API shapes.
Source
↳ Follow the thread