Repository navigation
fix(cost-map): add tool calling and reasoning flags, correct max output for nebius DeepSeek-V4.1-Flash - #43588
Conversation
…ut for nebius DeepSeek-V4.1-Flash The row added in BerriAI#42951 was built from the Nebius catalog page, which shows "Tool calling N/A" and only the context size. Verified live against Nebius Token Factory through a LiteLLM proxy: the model returns tool_calls, emits reasoning_content with reasoning_tokens in usage, reads images and accepts max_tokens=384000. - supports_function_calling: true - supports_reasoning: true - max_output_tokens / max_tokens: 1048576 -> 384000
|
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
TLDR
Problem this solves:
nebius/deepseek-ai/DeepSeek-V4.1-Flashrow lacks tool calling and reasoning flags/model/info; clients hide tools and reasoningHow it solves it:
supports_function_callingandsupports_reasoningto truemax_output_tokensandmax_tokensto 384000User Flow
Before: a proxy admin who added the Nebius DeepSeek V4.1 Flash deployment sees no capabilities for it, so their client app disables tools, reasoning and shows a 1M output limit
nebiusand modeldeepseek-ai/DeepSeek-V4.1-Flashsupports_function_calling: null,supports_reasoning: null,max_output_tokens: 1048576After: the same call reports the real capabilities and output limit
supports_function_calling: true,supports_reasoning: true,max_output_tokens: 384000Relevant issues
The row was introduced in #42951 from the Nebius catalog page, which renders "Tool calling N/A" and only the context size, so the flags were left out and the output limit was copied from the context.
Pre-Submission checklist
python ci_cd/cost_map_guard.py --base <merge-base> --head <tip> --head-ref <branch>passesScreenshots / Proof of Fix
Setup: LiteLLM proxy with the Nebius deployment
deepseek-ai/DeepSeek-V4.1-Flash(custom_llm_provider: nebius,api_base: https://api.tokenfactory.nebius.com/v1/). Live calls below went through that proxy to Nebius Token Factory on 2026-09-28 (real spend, no mocks).Before (6f5ad78)
Row in the cost map
python -c "import json; e=json.load(open('model_prices_and_context_window.json'))['nebius/deepseek-ai/DeepSeek-V4.1-Flash']; print({k: e.get(k) for k in ('max_output_tokens','supports_function_calling','supports_reasoning','supports_vision')})"{'max_output_tokens': 1048576, 'supports_function_calling': None, 'supports_reasoning': None, 'supports_vision': True}Tool call through the proxy
/v1/chat/completionswithtools: [get_weather(city)],tool_choice: auto, user message "Wie ist das Wetter in Berlin? Nutze das Werkzeug."finish_reason: "tool_calls",tool_calls: [{"name": "get_weather", "arguments": "{\"city\": \"Berlin\"}"}]— the provider supports tools, the map says nothingReasoning through the proxy
/v1/chat/completionswithreasoning_effort: "medium", user message "Was ist 17 * 23? Denke Schritt für Schritt und antworte dann nur mit der Zahl."message.reasoning_contentwith 211 characters,usage.completion_tokens_details.reasoning_tokens: 57,content: "391"— the provider emits reasoning, the map says nothingOutput limit through the proxy
/v1/chat/completionswithmax_tokens: 384000, user message "Antworte nur mit: ok"max_tokens: ≥ 256K, DeepSeek's own API and OpenRouter list 384K for the same modelAfter (f6c33a0)
Row in the cost map
{'max_output_tokens': 384000, 'supports_function_calling': True, 'supports_reasoning': True, 'supports_vision': True}Tool call through the proxy
finish_reason: "tool_calls",get_weatherwith{"city": "Berlin"}); the map now matchesReasoning through the proxy
reasoning_contentpresent,reasoning_tokens: 57); the map now matchesOutput limit through the proxy
Vision was also checked (a 64×64 blue PNG as
image_url, answer "Blau");supports_vision: truewas already correct and is unchanged.Type
🐛 Bug Fix
Caveats (if any)
Low
max_tokens: ≥ 256K, native image input, controllable reasoning effort), https://openrouter.ai/deepseek/deepseek-v4.1-flash (384000 max output), live calls aboveFinal Attestation