
这一小时零发版:sub2api 的流式缓存创建明细只报第一轮,差额几千 token 不计费;渠道监控对只开 /v1/responses 的 grok 上游必然报红,而业务一直是通的。
/v1/messages 流式请求里,上游会在一趟请求内跑多轮采样,典型的是 web_search、web_fetch、code_execution 这些服务端工具。5message_delta 里的用量是累计值。6 累计量往上涨是正常的。cache_creation 对象时才动。7
message_delta 分支:第 1249 行按 v > 0 覆盖聚合值,第 1257 行起只有 cache_creation 是对象时才动 5m/1h。合成的两帧事件里,第二帧没有这个对象,明细因此留在第一轮。7
computeCacheCreationCost 先做归一化再只加明细(第 1784 行与第 1789–1790 行)。normalizeCacheCreationBreakdown 的早退条件在第 1807 行:明细小于聚合时直接返回原值,不补差。8message_delta 那段读法一模一样。11 所以两种接入方式都中。/v1/messages,客户端在用服务端工具。SELECT count(*) AS rows_hit,
sum(cache_creation_tokens - cache_creation_5m_tokens - cache_creation_1h_tokens) AS gap_tokens
FROM usage_logs
WHERE created_at >= now() - interval '24 hours'
AND cache_creation_tokens > cache_creation_5m_tokens + cache_creation_1h_tokens;message_delta 在显式上报 input_tokens=0 时沿用 message_start 的值,输入与缓存读重复计费,那是多收。15 它的补丁 PR #8408 还在评审。16/v1/chat/completions,由它自己转给上游。/v1/chat/completions。18
providerGrokChatAdapter,第 219 行它由 newOpenAICompatibleChatAdapter(providerGrokPath) 生成,路径在编译期就定死。19ok 照样为真。20api_mode=responses 只允许 provider 为空或 openai。21
validateAPIMode:responses 分支只在 provider 为空或 openai 时返回 nil,grok 走到第 100 行就是 ErrChannelMonitorInvalidAPIMode。21api_mode 那段只在 provider 是 OpenAI 时渲染,选 grok 根本看不到这个开关。23api_mode 选 responses,endpoint 与 key 填同一家,模型填同一个别名。v-if。还要改掉那条钉住行为的测试。不是一行能改的事。mergeable_state 为 clean,未合并。改动是 Home 模式下不注册 /v1/ws 那条 AI Studio 的 websocket 路由,同时把 Home 运行时的 websocket 鉴权从关改成开。27 跑 Home 模式又依赖本地 websocket 的,升级前先看这一条。easypay.go 没有变化,回退 0.2.16 恢复入账。Xs2XTHzAVC9YnafnPyzj,最后一条进展停在 10-27 23:13(北京)。293031github.com
github.com
github.com
github.com
github.com
platform.claude.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
status.openai.com
status.anthropic.com
status.cloud.google.com
codex-reset.com
community.openai.com
reddit.com
reddit.com
This story was produced automatically by a channel. One sentence is all it takes for Neodrop to keep producing for you.