CodeWhale icon indicating copy to clipboard operation
CodeWhale copied to clipboard

token消耗增大了很多

Open YaYII opened this issue 6 months ago • 15 comments

Description

Steps to reproduce

1.半天消耗了4亿token? 2.请检查下,为啥请求那么密集。每次token的交互都是特别多。需要优化交互的对话信息。 3.

Expected behavior

Actual behavior

Environment

  • OS:
  • DeepSeek CLI version:
  • Model:
  • Shell:

Logs or screenshots

YaYII avatar May 05 '26 14:05 YaYII

关联的issue #580 #575 #572

@YaYII 你可以给出DeepSeek CLI version,这样方便定位原因

lloydzhou avatar May 05 '26 14:05 lloydzhou

nice

apeabody007 avatar May 05 '26 15:05 apeabody007

yes, thank you so much. let me know what version you're on as there was a targetted fix in this direction for 0.8.12 and another coming in 0.8.13

Hmbown avatar May 05 '26 17:05 Hmbown

好的,我昨天使用的是0.8.10版本。然后我现在用的是0.8.12版本,然后我发现一个问题,那就是程序执行的时候,好像突然卡住了,没有动静,我开启的自动执行模式,然后不确定,什么情况。我会继续观察这个情况。另外我构思了一个新的国际化能力 i18n,届时会像你提交这个国际化的设计思路,通过AI进行国际化的实验。从而实现糟糕的多国文件配置的思路,。改为AI翻译的思路。可能这个做法有点激进。也可能是我使用AI习惯了,觉得翻译能力是可以的。

设计思路,默认读取i18n文件,然后没有会退en文件。只是需要把所有的硬编码的内容,全部迁移到en文件,这个是一个大工程。然后这个i18n的文件是通过AI去翻译en文件的内容,而用户选择的语言决定了i18n的文件语言是什么,从而利用AI去填充这个国际化文件,从而实现快速国际化的问题,这样就可以动态实现多国语言的兼容。

I was on v0.8.10 yesterday and have now upgraded to v0.8.12. I’ve noticed a critical issue: the program occasionally freezes mid-execution with no further response. Auto-run mode is enabled, but the exact trigger is still undetermined. I will continue monitoring to reproduce and locate this problem.

Additionally, I’ve drafted a new i18n internationalization solution. I’ll share the complete design concept with you soon and run validation experiments with AI. The goal is to replace the traditional, cumbersome multi-language file maintenance model with an AI-powered translation solution. While this approach may seem relatively radical, AI translation capabilities are mature enough for this scenario, given my long-term practical usage.

Core Design Logic

  1. The system loads the corresponding i18n language file by default, with English (en) set as the fallback when the target language file is missing.
  2. All hardcoded text needs to be migrated to the base English file, which will be a comprehensive refactoring task.
  3. All multi-language i18n files will be automatically generated by AI based on the English source file.
  4. The front-end language selection controls which i18n file is loaded.

This AI-driven localization strategy can greatly accelerate internationalization progress and enable flexible, dynamic multi-language support for the project.


需要我再出一版更精简短句版(适合快速发消息)吗?

YaYII avatar May 06 '26 00:05 YaYII

Image 你看页面这样,在mac环境下,完全无法看具体信息

YaYII avatar May 06 '26 00:05 YaYII

图像你这样看页面,在mac环境下,无法完全看具体信息

就是这样,没有动静了,不知道什么情况

YaYII avatar May 06 '26 00:05 YaYII

thank you for posting that - I shipped what was intended to be a fix for the color issues but that actually looks like a new color issue - so must have introduced something new

Hmbown avatar May 06 '26 00:05 Hmbown

0.8.10

---- 回复的原邮件 ---- | 发件人 | Lloyd @.> | | 发送日期 | 2026年05月05日 22:54 | | 收件人 | Hmbown/DeepSeek-TUI @.> | | 抄送人 | 杨英 @.>, Mention @.> | | 主题 | Re: [Hmbown/DeepSeek-TUI] token消耗增大了很多 (Issue #743) | lloydzhou left a comment (Hmbown/DeepSeek-TUI#743)

关联的issue #580#575#572

@YaYII 你可以给出DeepSeek CLI version,这样方便定位原因

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

YaYII avatar May 06 '26 00:05 YaYII

@YaYII 能不能再提供一个信息(如果涉及到一些隐私不方便提供就算了): 当天deepseek api调用的次数以及token数(区分命中缓存和没命中缓存的token) 用这两个数据可以大致估算出单次LLM请求的上下文长度,命中缓存的比例等。 这两个指标在定位问题的时候会有一些帮助

lloydzhou avatar May 06 '26 02:05 lloydzhou

Triage update: removing the stale v0.8.15 milestone because that release has already shipped and the original high token usage report was from older builds.

Recent releases changed cost/token accounting, context replay behavior, and tool-output handling, so this needs a fresh data point before more coding. Please retest on the current version and, if it still looks inflated, add:

  • deepseek --version
  • provider/model
  • approximate API dashboard token count for the session
  • whether the UI showed cache-hit vs cache-miss tokens
  • whether /compact changed the behavior

Keeping this open as a context/cost tracking issue until current-version evidence says it is fixed or still active.

Hmbown avatar May 07 '26 16:05 Hmbown

I also find it quite wasteful of tokens. I barely performed any complex operations—just read through the project—yet it cost 18 yuan in one night. Compared to WorkBuddy, the consumption is significantly higher. I checked, and the main issue is that the token hit rate for repayment is relatively low, possibly around 60%-70%, whereas WorkBuddy can achieve nearly 90%. And I primarily use it for the same tasks.

qinxianyuzou avatar May 07 '26 23:05 qinxianyuzou

image Much better today!

hwu668 avatar May 08 '26 17:05 hwu668

It's just an empirical observation from my end but I seem to have gone through 3-4 times as many tokens for the same tasks.

ps. I went from 0.8.24 to 0.8.28 this weekend.

forkless avatar May 11 '26 13:05 forkless

Closing this old token-cost report as stale for the current release queue. Several cache/context/accounting fixes landed after the originally reported 0.8.10-0.8.12 builds, and we should not keep this open as an ASAP item without current-version evidence. If inflated usage still reproduces, please comment or open a fresh focused issue with codewhale 0.8.66 (68d973ae8502), provider/model, output, approximate session token totals from the provider dashboard, and whether sub-agents/RLM or large file reads were involved.

Hmbown avatar Jun 30 '26 20:06 Hmbown

Correction to the close note: the requested current-version evidence should include the literal /cache output, plus version, provider/model, provider dashboard totals, and task shape.

Hmbown avatar Jun 30 '26 20:06 Hmbown