Codex配置出现的问题

codex unexpected status 401 Unauthorized: Incorrect API key provided

按照如下配置:

auth.json

复制代码
{"OPENAI_API_KEY": "你的API令牌"}

config.toml

复制代码
model_provider = "codex"
model = "gpt-5.2-codex"
model_reasoning_effort = "high"
disable_response_storage = true
preferred_auth_method = "apikey"

[model_providers.codex]
name = "codex"
base_url = "http://43.226.79.233:3000/v1"
wire_api = "responses"

编辑 auth.json(粘贴同样的 JSON)与 config.toml。要保证上下一致 :model_provider = "xxx" 要和 [http://model_providers.xxx](https://link.zhihu.com/?target=http%3A//model_providers.xxx "http://model_providers.xxx") 的段名一致。

引用链接:https://zhuanlan.zhihu.com/p/2002679138566283974

stream disconnected before completion: stream closed before response.completed

新建的 令牌是codex分组, 需要再公益站后面的 url 添加 /v1

引用链接:codex:报错Stream disconnected before completion: stream closed before response.completed - 开发调优 - LINUX DO

相关推荐
nbtang20261 天前
AI Agent 入门(三):Tool Use 入门 —— Function Calling 原理与实战
人工智能·ai·agent
不爱记笔记1 天前
ClaudeCode接入DeepSeek教程!防封号!
人工智能·ai·deepseek·claudecode
hey202005281 天前
AI生图软件哪个好用?
人工智能·ai·ai作画·aigc
Muscleheng1 天前
Spring Ai SpringBoot集成DeepSeek
ai·spring ai·deepseek
云边云科技_云网融合1 天前
零信任安全:数字化时代的企业防护新范式
人工智能·安全·ai
Z-D-K1 天前
考验AI的“自我“-AI对《红楼梦》后40回的改写(32)
人工智能·ai·aigc·交互·agi
阿洛学长1 天前
Cursor下载安装使用教程(最新详细图文)
人工智能·gpt·深度学习·ai·ai编程
俊哥V1 天前
每日 AI 研究简报 · 2026-07-03
人工智能·ai
林澈在路上1 天前
最新版权清晰 AI音乐写歌工具软件App推荐 商用全场景实测指南
数据库·人工智能·ai·aigc·音频
奇牙coding1 天前
企业大模型 API 真实账单深度测算:deepseek-v4-pro、gpt-5.4、claude-opus-4.8 成本对比与接入方案(2026)
gpt·ai