Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

NodeBB

  1. Home
  2. Blogs
  3. 如何在 Codex 中为 GPT-5.6 Sol 启用 100 万 Token 上下文窗口

如何在 Codex 中为 GPT-5.6 Sol 启用 100 万 Token 上下文窗口

Scheduled Pinned Locked Moved Blogs
上下文窗口gpt-5.6
1 Posts 1 Posters 131 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Online
    A Online
    admin
    wrote on last edited by
    #1

    <p>以下介绍如何在 Codex 中为 GPT-5.6 Sol 启用 100 万 Token 上下文窗口。</p><p>尽管我们已对 Codex 的上下文限制进行了调优,以在性能和成本之间取得最佳平衡,但这是一个常见需求,因此在此记录配置方法。</p><p>更大的上下文窗口可让 Codex 在汇总较早内容之前保留更多代码、工具输出和对话历史。你需要使用支持该功能的模型。例如,GPT-5.6 Sol 的文档中标注了 1,050,000 Token 的上下文窗口。</p><p>打开 ~/.codex/config.toml,并在顶层添加或更新以下设置,放在任何 </p><p></p><p>[section] 标头之前:</p><p></p><p>model = "gpt-5.6-sol"</p><p>model_context_window = 1000000</p><p>model_auto_compact_token_limit = 900000</p><p></p><p></p><p>第一项设置用于选择模型。第二项告知 Codex 使用 100 万 Token 的上下文预算。第三项会在约 900,000 Token 时开始自动压缩历史记录,从而预留一些余量。保存后,重启 Codex 客户端并开启一个新会话。</p><p>若要在不更改默认设置的情况下,仅为单个 CLI 会话尝试此配置:</p><p></p><p></p><p>codex -m gpt-5.6-sol \</p><p> -c model_context_window=1000000 \</p><p> -c model_auto_compact_token_limit=900000</p><p></p><p></p><p>尽情使用,不过也请注意:我们已经认真调优了默认设置!</p><p></p><p>来自 Tibo:<a target="_blank" rel="noopener noreferrer nofollow" href="https://x.com/thsottiaux/status/2089082893804896524">https://x.com/thsottiaux/status/2089082893804896524</a></p><p></p>

    1 Reply Last reply
    0

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    Powered by NodeBB Contributors
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups