{"slug":"deepseek-v3.1-terminus","name":"DeepSeek V3.1 Terminus","family":"deepseek","family_name":"DeepSeek","developer":"DeepSeek","color":"#1e3a8a","status":"active","released":"2025-09-22","snapshot_of":null,"open":true,"context":128000,"max_output":147456,"knowledge_cutoff":"2025-03","modalities":["text"],"output_modalities":["text"],"reasoning":true,"tools":true,"structured_output":true,"huggingface":"deepseek-ai/DeepSeek-V3.1-Terminus","speed":19,"latency":2.47,"short":"An open-weights text model from DeepSeek, released September 2025, priced well below the registry median. Both of its benchmark results sit below the median.","strengths":["Blended price of $0.44 per million tokens, well below the $1.01 median","Input costs $0.27 per million tokens and output $0.95 per million","Supports tool calling, structured output and reasoning mode","Open weights with a 128k context window and 147k largest response"],"weaknesses":["SciCode score of 38.0%, 87th of 96 and below the 50.2% median","LMArena text rating of 1419.5, 76th of 114 and below the 1437.6 median","Text-only input, and popularity ranks 152nd of 194"],"best_for":"Cost-sensitive agents that need tool calling and structured output rather than top scientific or chat quality.","long":"DeepSeek V3.1 Terminus is an open-weights text model released in September 2025. It has a 128k context window, tool calling, structured output and a reasoning mode. Its main appeal is price: $0.27 per million input tokens and $0.95 per million output tokens, a blended $0.44 against a registry median of about $1.01, which ranks it 54th of 194 for price.\n\nBenchmark coverage is thin, with only two results. On SciCode it scores 38.0%, 87th of 96 and well below the median of 50.2%. On LMArena text it rates 1419.5, 76th of 114 and below the median of 1437.6. Its popularity rank is 152nd of 194.\n\nThe model accepts text only, with a knowledge cutoff of March 2025, and is available through DeepSeek and OpenRouter. Its quality results do not point to demanding scientific or chat work, but it fits workloads where low cost and function calling matter more.","described":true,"gateway":false,"byok":true,"string":"deepseek:deepseek-v3.1-terminus","input":0.27,"output":0.95,"cache_read":0.13,"blended":0.44,"efficiency":null,"bench":{"scicode":38,"lmarena":1419.5},"offers":[{"provider":"deepseek","name":"DeepSeek","model_id":"deepseek-v3.1-terminus","api":["openai"],"input":0.27,"output":0.95,"cache_read":0.13,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":128000,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":"deepseek:deepseek-v3.1-terminus","gateway_string":null},{"provider":"openrouter","name":"OpenRouter","model_id":"deepseek/deepseek-v3.1-terminus","api":["openai"],"input":0.27,"output":1,"cache_read":null,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":163840,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":"openrouter:deepseek/deepseek-v3.1-terminus","gateway_string":null}],"ranks":{"intelligence":null,"popularity":152,"efficiency":null,"speed":178,"price":54},"top_score":0.0905,"about":["An open-weights text model from DeepSeek, released September 2025, priced well below the registry median. Both of its benchmark results sit below the median.","DeepSeek V3.1 Terminus is an open-weights text model released in September 2025. It has a 128k context window, tool calling, structured output and a reasoning mode. Its main appeal is price: $0.27 per million input tokens and $0.95 per million output tokens, a blended $0.44 against a registry median of about $1.01, which ranks it 54th of 194 for price.","Benchmark coverage is thin, with only two results. On SciCode it scores 38.0%, 87th of 96 and well below the median of 50.2%. On LMArena text it rates 1419.5, 76th of 114 and below the median of 1437.6. Its popularity rank is 152nd of 194.","The model accepts text only, with a knowledge cutoff of March 2025, and is available through DeepSeek and OpenRouter. Its quality results do not point to demanding scientific or chat work, but it fits workloads where low cost and function calling matter more."],"examples":[{"file":"hello.py","lang":"python","code":"# /// script\n# dependencies = [\"pydantic-ai\"]\n# ///\nimport os\n\nfrom pydantic_ai import Agent\n\nos.environ['DEEPSEEK_API_KEY'] = '...'\n\nagent = Agent('deepseek:deepseek-v3.1-terminus', instructions='Be concise, reply with one sentence.')\n\nresult = agent.run_sync('Where does \"hello world\" come from?')\nprint(result.output)","soon":false},{"file":"structured_output.py","lang":"python","code":"# /// script\n# dependencies = [\"pydantic-ai\"]\n# ///\nimport os\n\nfrom pydantic import BaseModel\nfrom pydantic_ai import Agent\n\nos.environ['DEEPSEEK_API_KEY'] = '...'\n\n\nclass CityLocation(BaseModel):\n    city: str\n    country: str\n\n\nagent = Agent('deepseek:deepseek-v3.1-terminus', output_type=CityLocation)\n\nresult = agent.run_sync('Where were the olympics held in 2012?')\nprint(result.output)\n#> city='London' country='United Kingdom'","soon":false},{"file":"tools.py","lang":"python","code":"# /// script\n# dependencies = [\"pydantic-ai\"]\n# ///\nimport os\nimport random\n\nfrom pydantic_ai import Agent, RunContext\n\nos.environ['DEEPSEEK_API_KEY'] = '...'\n\nagent = Agent(\n    'deepseek:deepseek-v3.1-terminus',\n    deps_type=str,\n    instructions=\"You're a dice game, roll the die and see if it matches the user's guess.\",\n)\n\n\n@agent.tool_plain\ndef roll_dice() -> str:\n    \"\"\"Roll a six-sided die and return the result.\"\"\"\n    return str(random.randint(1, 6))\n\n\n@agent.tool\ndef get_player_name(ctx: RunContext[str]) -> str:\n    \"\"\"Get the player's name.\"\"\"\n    return ctx.deps\n\n\nresult = agent.run_sync('My guess is 4', deps='Anne')\nprint(result.output)","soon":false},{"file":"streaming.py","lang":"python","code":"# /// script\n# dependencies = [\"pydantic-ai\"]\n# ///\nimport asyncio\nimport os\n\nfrom pydantic_ai import Agent\n\nos.environ['DEEPSEEK_API_KEY'] = '...'\n\nagent = Agent('deepseek:deepseek-v3.1-terminus')\n\n\nasync def main():\n    async with agent.run_stream('Explain prompt caching in three bullet points.') as response:\n        async for text in response.stream_text(delta=True):\n            print(text, end='', flush=True)\n\n\nasyncio.run(main())","soon":false},{"file":"pax.sh","lang":"sh","code":"export DEEPSEEK_API_KEY='...'\n\nuvx pax --model 'deepseek:deepseek-v3.1-terminus'","soon":true},{"file":"pi.sh","lang":"sh","code":"# npm install -g @earendil-works/pi-coding-agent\nexport DEEPSEEK_API_KEY='...'\n\npi --model 'deepseek/deepseek-v3.1-terminus'","soon":false},{"file":"codex.sh","lang":"sh","code":"# npm install -g @openai/codex\nexport DEEPSEEK_API_KEY='...'\n\ncodex --model 'deepseek-v3.1-terminus' \\\n  -c model_provider='deepseek' \\\n  -c model_providers.deepseek.name='DeepSeek' \\\n  -c model_providers.deepseek.base_url='https://api.deepseek.example/v1' \\\n  -c model_providers.deepseek.env_key='DEEPSEEK_API_KEY'","soon":false},{"file":"ai_sdk.ts","lang":"ts","code":"// npm install ai @ai-sdk/deepseek\nimport { createDeepSeek } from '@ai-sdk/deepseek'\nimport { generateText } from 'ai'\n\nprocess.env.DEEPSEEK_API_KEY = '...'\n\nconst deepseek = createDeepSeek({ apiKey: process.env.DEEPSEEK_API_KEY })\n\nconst { text } = await generateText({\n  model: deepseek('deepseek-v3.1-terminus'),\n  system: 'Be concise, reply with one sentence.',\n  prompt: 'Where does \"hello world\" come from?',\n})\nconsole.log(text)","soon":false}],"benchmarks":[{"id":"scicode","name":"SciCode","unit":"%","desc":"Scientific programming problems written by researchers","category":"coding","floor":0,"ceiling":100,"url":"https://scicode-bench.github.io/","credit":"SciCode, via Epoch AI (CC BY 4.0)"},{"id":"lmarena","name":"LMArena text","unit":"","desc":"Rating from blind human votes between pairs of chat responses","category":"preference","floor":1100,"ceiling":1600,"url":"https://lmarena.ai/leaderboard/text","credit":"LMArena (CC BY 4.0)"}],"generated":"2026-11-25","gaps":{"speed":3,"index":80,"description":0}}