你的codex是不是用着用着就404了?

你的codex是不是用着用着就404了?
你的codex是不是用着用着就404了?

部分佬友在使用codex时,有些公益站、中转站没有开放远端压缩模型,上下文一大就:

Error running remote compact task: unexpected status 404 Not Found: Invalid URL (POST /v1/responses/compact), url:

这时候很多人可能会重新开一个窗口,确实能解决,但是老是重开窗口也不是个办法,分享一个避免此问题的方法:

把 ~/.codex/config.toml 里的:

  [model_providers.custom]
  name = "OpenAI"
  base_url = "https://你的-cc-switch/v1"
  wire_api = "responses"
  requires_openai_auth = true

改成:

  [model_providers.custom]
  name = "cc-switch"
  base_url = "https://你的-cc-switch/v1"
  wire_api = "responses"
  requires_openai_auth = true

另外你可以保留或设置较高的自动压缩阈值,减少自动 compact 触发:

  model_auto_compact_token_limit = 900000

  [features]
  enable_request_compression = false
  remote_compaction_v2 = false

如何佬友们有更好的方法,也欢迎交流

1 个帖子 - 1 位参与者

阅读完整话题

来源: LinuxDo 最新话题查看原文