Repository navigation
Conversation
r266-tech
force-pushed
the
codex/gemini-audio-input-pricing
branch
from
November 20, 2026 09:02
4d65a6d to
37caa62
Compare
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.
关联 #8970 的原生 Gemini 音频输入计费。
Gemini 的提示总量包含缓存。根据
promptTokensDetails和cacheTokensDetails核对 AUDIO token 后,分别按未缓存音频和缓存读取音频的目录价计费。明细无法与总量对齐时使用合计费率,分组、渠道及本地价表的显式费率优先。 Gemini 用量字段 · Google 定价 · 项目价表Gemini 3 Flash Preview 的本地模拟响应包含 300 个未缓存音频 token 和 100 个缓存音频 token。原生 JSON、流式 SSE 和聚合 SSE 的实际扣费均从
$0.001034校正为$0.001375,其中已应用2.2x分组倍率。纯文本、缓存模态未知、优先级费率和自定义价均有对照。New API 的现场账单仍待同笔响应核对。Go 1.27.4 下通过 60 个单元测试包和 54 个集成测试包。golangci-lint 2.14.0 报告 0 个问题。
代码与本地验证由 Codex 完成。
CI 复核
旧提交
4d65a6d的 Linux CI 在TestFilterThinkingBlocksSignedHistorySkipsDecode测得 31 次分配,随后跳过了集成步骤。Go 1.27.4 Linux/amd64 本地对照中,旧提交和基线16b53b6各连续通过该用例 20 次;在服务包运行时也都通过了该用例。把同一补丁重放到
62cebadf后,37caa625上 60 个后端单元测试包通过。上面的 54 个本地集成测试包和 lint 结果对应旧提交。新提交的 CI 已开始运行。