Token 知识库

额度什么时候重置、怎么省 token?按目录查阅各个主题,Codex 和 Claude 分开说明,附官方原文和链接。

推理强度和模型怎么选最省 token?

日常任务用默认档(Codex 是 Medium,Claude Code 是 high),只给难题往上调;token 紧的时候各降一档、换小一档的模型。档位越高越慢、越费 token,而且不保证结果更好。

Codex

从能出结果的最低档用起,日常停在默认的 Medium;token 紧时把 Fast 模式关掉。

在 CLI 里输入 /model,可以同时换模型和推理档位:Low、Medium(默认)、High、Extra high、Max、Ultra。OpenAI 的原话是「用能出结果的最低档」:更高的档更慢、用更多 token;Ultra 还会自动派 subagent,比单个 agent 更费。Fast 模式只换速度:快约 1.5 倍,当前主力模型按 2.5 倍扣额度。模型同理:官方建议日常任务换小一档的模型,同一份额度能用得更久。

官方原文

Use the lowest reasoning effort that produces the result you need. Increase it for tasks that need more planning, analysis, or checking.
OpenAI docs · Models
Higher reasoning effort can improve results for complex tasks, but it takes longer and uses more tokens.
OpenAI docs · Models
Higher effort can use more of your allowance and does not always produce a better result.
OpenAI Help Center · Managing usage with GPT-6 Astra in Work and Codex
Different models can use different amounts of your allowance for the same task. Larger inputs and outputs, higher reasoning settings, Fast mode and tasks with multiple steps can also increase usage.
OpenAI Help Center · Managing usage with GPT-6 Astra in Work and Codex
Switch to a smaller model for routine tasks. Using GPT-5.6 Terra or GPT-5.6 Luna can extend your local-message usage limits, depending on the model you switch from.
OpenAI Developers · Codex pricing
For GPT-5.6, GPT-5.5, and GPT-5.4, Fast mode increases model speed by 1.5x. GPT-5.6 and GPT-5.5 consume credits at 2.5x the Standard rate; GPT-5.4 consumes credits at 2x the Standard rate.
OpenAI docs · Speed
Speed configurations increase credit consumption for all applicable models, so they also use included limits faster.
OpenAI Developers · Codex pricing

Claude

默认的 high 已经够日常用;要省 token 就 /effort medium,日常用 Sonnet,难题再换 Opus 或 Fable。

Claude Code 的 effort 有 low、medium、high、xhigh、max 五档,默认 high。官方对 medium 的说明是「用一点聪明程度换更少的 token」,对 max 的说明是收益递减、容易想过头。思考 token 按输出 token 计,折叠起来看不到的那部分也算。模型上,官方建议 Sonnet 做日常编码,Opus 留给复杂的架构和多步推理;Fable 模型关不掉思考,用周额度也比其他模型快。

官方原文

The effort level controls how much thinking Claude applies to a response. Higher effort means more thorough responses, but they take longer and use more tokens, so you'll reach your usage limits faster.
Claude Help Center · Change the model, effort, and thinking settings
Reduces token usage for cost-sensitive work that can trade off some intelligence
Claude Code docs · Model configuration
Can improve performance on demanding tasks but may show diminishing returns and is prone to overthinking.
Claude Code docs · Model configuration
Sonnet handles most coding tasks well and costs less than Opus. Reserve Opus for complex architectural decisions or multi-step reasoning.
Claude Code docs · Manage costs effectively
Thinking tokens are billed as output tokens, and the default budget can be tens of thousands of tokens per request depending on the model.
Claude Code docs · Manage costs effectively
You are charged for all thinking tokens generated, even when collapsed or redacted.
Claude Code docs · Model configuration
You can use up to 50% of your weekly usage limits on Fable models at no extra cost. They draw from your plan's regular weekly usage limits and use them faster than other Claude models.
Claude Help Center · Claude Fable models on your plan
For Claude Code users on subscription plans (Pro/Max/Team/Enterprise), fast mode is available via usage credits only and not included in the subscription rate limits.
Claude Code docs · Speed up responses with fast mode

会话中途换模型,缓存从头来

Claude Code 里每个模型有自己的缓存。用 /model 换模型之后,下一条消息会把整段对话重读一遍,一点缓存都用不上,长会话里换一次很贵。多数模型上换 effort 也一样,Claude Code 会先让你确认;订阅下最新的 Fable 模型是例外,换 effort 不丢缓存。

所以模型和 effort 在会话开头定好,或者 /clear 之后再换。opusplan 每次进出 plan mode 都是一次换模型,每换一次缓存就从头来。

Codex 中途换模型会不会影响缓存,OpenAI 没有写。

官方原文

Each model has its own cache. Switching with /model means the next request reads the entire conversation history with no cache hits, even though the content is identical.
Claude Code docs · How Claude Code uses prompt caching
On most models, changing the effort level mid-session means the next request reads the entire conversation history with no cache hits. While the cache is still warm, Claude Code asks you to confirm the change first.
Claude Code docs · How Claude Code uses prompt caching

常见误解

  • 推理开到最高,结果才最好

    不是。OpenAI 的原话是更高的 effort 会用掉更多额度,而且不一定带来更好的结果;Anthropic 对最高档 max 的说明是收益递减、容易想过头。日常任务用默认档,难题才往上调。

  • 思考过程折叠了看不到,就不算 token

    算。Claude 的思考 token 按输出 token 计,折叠或被隐去的部分同样计入;Codex 的推理档位也被 OpenAI 列在会增加用量的因素里。

  • Fast 模式只是更快,不会多花

    不对。Codex 的 Fast 模式快约 1.5 倍,但当前主力模型按 2.5 倍扣额度。Claude Code 的 /fast 在订阅下不走套餐额度,而是直接从 usage credits 扣。

小提示

  • Codex:输入 /model,把档位放在 Medium;只有需要多步规划、反复核对的任务才调到 High 以上。
  • Codex:想固定默认档,在 ~/.codex/config.toml 里写 model_reasoning_effort = "medium"。
  • Codex:输入 /fast status 看 Fast 模式有没有开着,token 紧就输入 /fast off。
  • Claude Code:输入 /effort,选 medium:回车是存成以后的默认,按 s 只对这一场会话生效。直接输入 /effort medium 等同回车。
  • Claude Code:只有某一句需要深想时,在提示里写 ultrathink,不用把整场会话的 effort 调高。
  • Claude Code:日常用 /model sonnet;换模型放在会话开头或 /clear 之后做,别在长会话中途换。
  • 两家都一样:简单的 subagent 单独指定小一档的模型。

Codex 重置公告与记录 · Claude 重置公告与记录