Repository navigation
fix: 缓存账单收敛为仅按 DeepSeek-V4.1-Flash 计价与显示 - #7
Merged
Merged
Conversation
低谷价缓存命中 0.02、未命中输入 1、输出 4,高峰翻倍,删除 pro 与 vision-exp。 模型名支持后缀与包含匹配,deepseek-v4.1-flash-expires-on-0910 这类带后缀的实际 id 能命中;兜底不再固定峰价,改按当前时段取唯一模型价。 stateVersion 升到 6,旧持久化金额作废重放。
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.
本 PR 把缓存账单的计价与显示收敛到 DeepSeek-V4.1-Flash 一个模型:价目表只留 Flash 一份,模型名识别覆盖官方现名与历史旧名,界面统一显示
DeepSeek-V4.1-Flash;未命中白名单的模型仍按 Flash 价估算,并标注实际运行模型。背景
官方最新价格表里现行模型名为
deepseek-flash,对应 DeepSeek-V4.1-Flash;旧名deepseek-v4-flash、deepseek-v4-flash-vision-exp仍可调用,同样由 V4.1-Flash 提供服务。此前插件只认deepseek-v4.1-flash一个键,实际运行名带expires-on后缀时靠兜底匹配,切到官方新名后会走估算路径,显示也不统一。具体改动
host 端
src/index.tsPEAK_RATES/OFFPEAK_RATES两张表加FALLBACK_MODEL收敛为单个MODEL常量,含规范名、显示名DeepSeek-V4.1-Flash、别名白名单与峰谷两档费率。rateOf返回显示名与命中标记matched。modelMatched布尔;matchedModel语义改为显示名。client 端
src/client.ts文档
价格
价格未变,沿用官方最新表:低谷缓存命中 0.02 / 未命中输入 1 / 输出 4 元每百万 token,高峰翻倍。峰谷时段政策不变。
验证
pnpm run typecheck通过,pnpm run build通过。影响面