You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
摘要
讨论了OpenSeek项目,这是一个为DeepSeek V4编写的TUI agent harness,提供27个提供商支持,包括成本优化技术(如cache-aware prompt assembly)和MCP/LSP集成,旨在降低使用DeepSeek V4的成本。
原帖内容
截至 2026/05 ,coding agent 这个赛道在 GitHub 上已经分成几条不同的线: 闭源旗舰 : Claude Code ( Anthropic 官方),Cursor 。体验最好,但贵 + 锁定。 开源通用 : OpenCode ( 164k+ Star ,Go 写的)、Aider ( Python ,VSCode 替代)、Cline 。 DeepSeek 原生 : DeepSeek-TUI ( Rust 写的,过去一周从 ~2k 涨到 24k+ Star )。 GUI 切换器 : cc-switch ( 78k+ Star ,Tauri 写的,管理上面这些 agent 的 provider 配置)。 如果诉求是 「我想要 Claude Code 同款的工程( MCP / LSP / Plan-Agent-YOLO 三模式 / 真正的 sub-agent fan-out ),但走 DeepSeek V4 把成本压一个数量级」 ,目前 OpenCode + 手动配 DeepSeek 是一条路,但 OpenCode 的 harness 不是为 DeepSeek 优化的( cache 命中率不显示、reasoning_content 没 replay )。 DeepSeek-TUI 是另一条路,但是 Rust ,需要装 toolchain 。 第三条路是我两周前推上 GitHub 的 openseek —— TS + Bun 写的 TUI agent ,27 providers ,第一公民支持 DeepSeek V4 。目前 150 Star 下面分享一下做这个东西时踩过的几个工程坑,挑了 5 个对 DeepSeek 用户最有用的。 1. cache-aware prompt assembly (最重要) DeepSeek V4 的 prefix cache 把 cached tokens 算 ~10% 价。如果你不主动 claim 这个 discount ,你的成本优势会一夜砍半。 大部分手搓 agent loop 第一次在 turn 之间 format 不一致就把 cache 干掉了。 2. reasoning_content replay V4 thinking mode 会发 internal-monologue tokens ,用户看不到。非显然部分: 下一个 turn 你必须把这些 reasoning tokens 重新喂回模型 ,不然它会失去线索。 3. 5 种 compaction ,不是 1 种 1M context 不等于 1M usable context 。OpenSeek 实现了 5 种: 策略 触发 用途 micro 每个 tool result 后 砍 noise ( grep 结果、文件 head/tail ) auto 累计 token 阈值 自动 summary 老段 reactive 模型主动请求 模型自己说「这段我不需要了」 sessionMemory session 结束 跨 session 持久化 (extractMemories) snip 用户手动 /snip 精确剪掉一段 4. 真的 MCP 客户端 (不是 stub) 支持 Linear / GitHub / Postgres / Browser 任何 MCP server 一行配置接入。 5. LSP 跑对应语言的 language server (tsserver / rust-analyzer / pyright / gopls / clangd),每次 edit 之后把 diagnostics 喂回模型。 整体 spec (v1.0) 27 providers ( OpenAI-compat 19 个 + Anthropic 4 个 + Google 2 个 + ollama + 自定义) 52 个工具 + 108 slash commands ( CCB 反编译参考 + 自写) Plan / Agent / YOLO 三模式 + git worktree 隔离 MCP client (stdio + SSE + websocket) LSP feedback (5 种语言) SessionMemory 跨 session 持久化 HTTP/SSE Runtime API ( headless 跑) SQLite-backed 任务队列(跨重启) Cost meter + wallet 集成 文档: openseek.dev 仓库: github.com/LichAmnesia/openseek 欢迎 star 、提 issue 、聊 DeepSeek V4 用法。如果你跑过其他 TUI agent 觉得这个有问题,DM 我( X @shenhuang / V2EX 都行)。
评论 (3)
chenxiankong: cc 直接用 deepseek baseurl 会有啥问题吗?
lichamnesia: @ chenxiankong 那得要用 cc-switch 了。harness 的做法会有一些不一样。比如 cache ,算价格等等。
RockShake: 官方已经更新文档了,直接直接接入 Claude Code https://api-docs.deepseek.com/zh-cn/guides/agent_integrations/claude_code
由社区爬虫自动生成于 2026-05-24T07:17:51.521Z
Beta Was this translation helpful? Give feedback.
All reactions