Repository navigation
feat(deepseek): V4 Pro stays on its own card, and WebSearch via DeepSeek's Search API - #976
Merged
Conversation
…eek's Search API DeepSeek has shipped three changes since #925. V4 Pro is not retiring. The 2026-09-10 release notes said every deepseek-v4-pro request would run V4.1 Flash at the Flash price from 2026-09-14, and pricing switched V4 Pro to the Flash card at that instant. DeepSeek reversed it before it took effect ("we have decided to continue providing API services for DeepSeek V4 Pro after September 14, 2026, with the billing method remaining unchanged"). Probed live: a deepseek-v4-pro request answers as deepseek-v4-pro under its own system fingerprint. So /cost has shown every V4 Pro request since 09-14 at about a fifth of what DeepSeek bills. The cutover axis is removed: V4 Pro prices at its published card at every instant, peak and off-peak. Docs and the model list stop calling it retiring. Subagent tiers stay on deepseek-flash, which DeepSeek ranks above V4 Pro. deepseek-flash now serves the V4.1-Flash-1017 snapshot (2026-10-17), with the same id and price; docs and comments name it. DeepSeek opened its search engine as an API on 2026-10-17, using the same key as its chat models. WebSearch now falls back to it when TAVILY_API_KEY is unset, instead of failing with "not configured"; Tavily stays first whenever its key is set. The key is used only when the deepseek provider's base_url is unset or on api.deepseek.com, so a gateway's key is never sent to DeepSeek. The Fetch API is not adopted: WebFetch already works without a key. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Test Results 5 files 1 028 suites 14m 8s ⏱️ For more details on these failures, see this check. Results for commit a05b457. |
agentforce314
deleted the
feat/deepseek-v4-pro-continues-and-search-api
branch
November 3, 2026 07:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DeepSeek has shipped three changes since #925 (2026-09-10), per its changelog, pricing page and live API (checked 2026-11-02/03). This PR applies them.
deepseek-v4-prowould run V4.1 Flash at the Flash price from 2026-09-14. DeepSeek then reversed it: "In response to user demand, we have decided to continue providing API services for DeepSeek V4 Pro after September 14, 2026, with the billing method remaining unchanged."services/pricing.pyswitcheddeepseek-v4-proto the Flash card at 2026-09-14 04:00 UTC. Every V4 Pro request since then shows at about a fifth of what DeepSeek bills (the card is 4.4x low on input, 3.3x on output, 7.3x on cache read).SETUP_GUIDE.mdno longer describe it as retiring.deepseek-flashnow serves the 1017 snapshot, with the same id and price.POST /v1/tools/search, using the same API key, billed at $0.75 per 1,000 searches from 2026-11-01.TAVILY_API_KEY, every search failed with "not configured".TAVILY_API_KEYis unset. Tavily stays first whenever its key is set.Live evidence (2026-11-02/03)
GET /modelslists exactly two models:deepseek-flash(DeepSeek-V4.1-Flash, image input) anddeepseek-v4-pro(DeepSeek-V4-Pro, text only). Both have a 1,048,576-token context, 393,216 max output, and effortslow/high/max.deepseek-v4-prochat request answers asmodel: deepseek-v4-prounder its ownsystem_fingerprint.deepseek-v4-flash,deepseek-v4-flash-vision-exp,deepseek-chatanddeepseek-reasonerall answer asdeepseek-flashunder one shared fingerprint. So Pro is really not routed to Flash.Design notes
deepseek_v4_pro_is_routed_to_flashhad no callers outsidepricing.pyand its tests, so it is removed.deepseek-flash. With Pro live again I considered pointing theopustier back at it. I didn't, because DeepSeek's own claim is that V4.1 Flash "has comprehensively surpassed V4 Pro in performance, cost, speed, and total time", and 1017 improved on V4.1. An opus-tier escalation would pay 4.4x for the model DeepSeek ranks second. The DeepSeek Harness catalog still describes Pro as "stronger … at higher cost", but that text dates from 2026-08-24, when the comparison was V4 Flash. No built-in agent pinsopus. Pro stays selectable for anyone who pins it.providers.deepseek.api_key, thenDEEPSEEK_API_KEY), and only whenproviders.deepseek.base_urlis unset or onapi.deepseek.com. A base URL on another host means the key belongs to a gateway, so it is never sent to DeepSeek and that gateway isn't assumed to serve/v1/tools.countis clamped to the API's 1–50 range. A query over the API's 128-character limit fails locally with a precise message instead of a wasted request. The model sees each result's shortsnippet(the same as the DeepSeek Harness), not the 1–2K-charsummary. HTTP 401/402/408/429/5xx errors carry DeepSeek's own message plus its documented remedy./cost; Tavily's never were.ui-desktopdescribed the DeepSeek key as "V3.x, R1", which is now "V4.1 Flash, V4 Pro".Testing
-p … --model deepseek-v4-pro: the persisted session reportstotal_cost_usd: 0.02837736for 21,489 input + 3 output tokens at 07:10 UTC Tuesday (peak). That is exactly the published peak Pro card.origin/main's pricing module re-prices the same usage at0.0064503, the Flash card.-p "Use the WebSearch tool …" --model deepseek-flash: the model called WebSearch, results came back from DeepSeek's Search API, and it answered correctly about the 10-17 update with sources.DeepSeek search error 401: Authentication Fails, Your api key: ****0000 is invalid (request_id: …). DeepSeek rejected the API key.tests/test_deepseek_peak_pricing.pyreplaces the cutover tests with ones pinning the Pro card across the cancelled instant, against the published numbers, for the agent-mix dollar figure, and on the live (clock-reading) path.tests/test_web_search_deepseek.py(25 tests): backend selection, gateway-key protection, request shape, limits, result mapping, domain filters, error mapping.DEEPSEEK_API_KEY.origin/mainworktree with the same venv (retry lane, stop hooks, teammate runner, memory recall; several are aquery.querypatch-target error). None of them touch pricing, providers or WebSearch. Every DeepSeek, pricing and web-search test passes.🤖 Generated with Claude Code