Pre-submission Checklist / 提交前检查
FAQ Check / FAQ 检查
Bug Description / Bug 描述
Summary
Codex channel created with imported auth.json works after manually entering models, but Fetch Models fails during channel creation.
Version
AxonHub: v0.9.38
Deployment: Docker
Steps to reproduce
- Add Channel
- Select Codex
- Choose
auth.json auth mode
- Paste a valid Codex
auth.json
- Click
Apply To Credentials
- Click
Fetch Models
Actual behavior
Fetch Models returns:
{
"models": [],
"error": "failed to fetch models: GET - https://chatgpt.com/backend-api/codex/models with status 400 Bad Request"
}
Browser GraphQL request shows apiKey is sent as an access token JWT, not the full OAuth credentials JSON.
Expected behavior
For Codex official/auth.json credentials, FetchModels should return the built-in codex.DefaultModels() list instead of requesting:
https://chatgpt.com/backend-api/codex/models
Additional context
If I manually fill the model IDs, the channel works correctly. So the auth.json and actual Codex request path are valid; only the Fetch Models helper fails.
可能的修复方向
后端修会更稳。比如:
if channelType == channel.TypeCodex {
if auth-json mode / official mode / default codex baseURL {
return codex.DefaultModels()
}
}
或者前端在 auth.json 模式下调用 FetchModels 时,不要把 access_token 单独传给 apiKey,而是传完整 OAuth credentials JSON,让后端的 isOAuthJSON(apiKey) 能命中默认模型分支。
发 issue 后,再次确认了一下
在第一次新增 auth.json 时会有上面的问题
但是现在又可以成功 fetch models 了
需要您确认一下是否会存在这种情况
Pre-submission Checklist / 提交前检查
FAQ Check / FAQ 检查
Bug Description / Bug 描述
Summary
Codex channel created with imported
auth.jsonworks after manually entering models, butFetch Modelsfails during channel creation.Version
AxonHub: v0.9.38
Deployment: Docker
Steps to reproduce
auth.jsonauth modeauth.jsonApply To CredentialsFetch ModelsActual behavior
Fetch Modelsreturns:{ "models": [], "error": "failed to fetch models: GET - https://chatgpt.com/backend-api/codex/models with status 400 Bad Request" }Browser GraphQL request shows
apiKeyis sent as an access token JWT, not the full OAuth credentials JSON.Expected behavior
For Codex official/auth.json credentials,
FetchModelsshould return the built-incodex.DefaultModels()list instead of requesting:Additional context
If I manually fill the model IDs, the channel works correctly. So the auth.json and actual Codex request path are valid; only the Fetch Models helper fails.
可能的修复方向
后端修会更稳。比如:
或者前端在 auth.json 模式下调用
FetchModels时,不要把access_token单独传给apiKey,而是传完整 OAuth credentials JSON,让后端的isOAuthJSON(apiKey)能命中默认模型分支。发 issue 后,再次确认了一下
在第一次新增 auth.json 时会有上面的问题
但是现在又可以成功 fetch models 了
需要您确认一下是否会存在这种情况