Repository navigation
Description
Client or integration
Codex App
Area
Provider adapter
Summary
Codex Desktop 透過 OpenCodex 使用 xai/grok-4.7(SuperGrok 訂閱、Grok OAuth 登入)時,預設的 Responses 路徑回傳 HTTP 400:
Argument not supported: "output.encrypted_content" in "include" field
預期 OpenCodex 能適配用戶端與 xAI 的 Responses 欄位差異,讓已登入的 Grok 4.7 正常回應。
同一帳號、同一模型改用既有 modelAdapters["grok-4.7"] = "openai-chat" 後,帶著相同 include 選項的直接代理測試成功,包括串流回答、function call,以及回傳工具結果後的續答。這支持問題在 Responses 路徑的欄位相容性;沒有證據顯示此次失敗由訂閱或登入失效造成。
Reproduction
- 在 OpenCodex 綁定 Grok OAuth 帳號並啟用
xai/grok-4.7。 - 保留 Grok 4.7 的預設 Responses 路徑,沒有設定該模型的
openai-chatoverride。 - 在 Codex Desktop 選取
xai/grok-4.7,送出一般文字問題。 - 請求失敗,錯誤明確指出
include中的output.encrypted_content不受支援。
本機共觀察到六次 HTTP 400,推理強度包含 high 與 medium。這些請求走 Responses → Responses,adapter 為 openai-responses,credential source 為 grok-oauth。
原始完整請求本文未保留/未公開;上述步驟與欄位是根據聊天錯誤及代理日誌整理,並非宣稱已捕獲完整 wire payload。
Version
OpenCodex 2.93.0
Codex Desktop session-reported CLI/runtime version: 0.165.0-alpha.1.2(不是另行確認的 Desktop app build number)。
Operating system
macOS 27.0.1
Provider and model
xai / grok-4.7, Grok OAuth / SuperGrok subscription
Logs or error output
{
"code": "400",
"error": "Argument not supported: \"output.encrypted_content\" in \"include\" field"
}相關代理日誌摘錄(已移除帳號、對話與請求識別碼):
{
"model": "grok-4.7",
"provider": "xai",
"requestedEffort": "medium",
"configuredServiceTier": "default",
"status": 400,
"errorCode": "invalid_request_error",
"attempts": [{
"provider": "xai",
"model": "grok-4.7",
"adapter": "openai-responses",
"status": 400,
"credentialSource": "grok-oauth",
"failureStage": "headers-only",
"failureCause": "payload-rejected"
}]
}Redacted configuration
原本 xAI provider 中的模型協定設定如下;4.7 使用預設路徑:
{
"authMode": "oauth",
"modelAdapters": {
"grok-4.5": "openai-chat",
"grok-4.6": "openai-chat"
}
}暫時替代方案是在同一個 map 加上:
{
"grok-4.7": "openai-chat"
}Workaround verification and limits
透過管理 API 儲存 override,讀回確認已生效,沒有修改套件原始碼。接著直接呼叫本機代理的 /v1/responses,仍帶著 include: ["output.encrypted_content"],使用 medium effort:
- 一般文字回應:HTTP 200 / completed。固定字串測試收到模型拒答,因此另做一般問題測試,不把 HTTP 200 當成指令遵循成功。
- 一般問題的 SSE 串流:HTTP 200,收到答案與
response.completed,沒有 error event。 - 指定的無副作用測試 function:收到正確 function name 和 arguments。
- 回傳該 function 的結果後:收到正常續答。
四次測試日誌均確認 provider=xai、model=grok-4.7、adapter=openai-chat、credentialSource=grok-oauth、status 200,沒有其他模型或供應商備援。
尚未驗證修正後完整 Codex Desktop 任務、長對話、影像或 X/web search;Chat Completions 是目前的 workaround,並未修復原本的 Responses 路徑。
Related evidence
- [Bug] Codex 桌面端 + Grok 4.7(SuperGrok)必现 400:Argument not supported: "output.encrypted_content" in "include" field yetone/magpie#3871 回報相同的 Codex Desktop + Grok 4.7 + SuperGrok 錯誤。該回報者的對照測試中,
reasoning.encrypted_content或省略include可成功;這是外部回報,尚未在本機 Grok Responses 路徑驗證。 - feat(providers): grok-4.7 parity with grok-4.6 across xAI, Devin, OpenCode Go, Command Code and Cursor #5599 說明 4.7 的 OAuth 預設 Responses 路徑,以及
modelAdapters可選 Chat。 - [Bug]: xAI Grok unusable on native Responses in 2.28.0 #2240 是同類型的 xAI Responses 相容性歷史問題,但不是相同欄位。
可能需要在 xAI Responses 邊界處理不受支援的 include 值。應過濾或映射、以及加密推理的保留方式,仍需維護者確認;不建議不分供應商直接移除整個 include。
Checks
- I searched existing issues and documentation.
- I removed secrets, tokens, account details, request credentials, and personal data.
Activity
Ingwannu commentedon Oct 29, 2026
Closing as completed on
dev: #7911 merged as392b786bcfee4078caa575e3fd0dee5b68eaf290, which I verified is an ancestor of current trusteddev9b78a16f4fe0c300527e6b183052407269bb941d.The xAI Responses projection removes exactly output.encrypted_content from include, for the exact global/US HTTPS xAI destinations, preserving other entries/providers and the configured transport.
I checked the implementation and the successful exact-head required CI for
0dff0cdfe5c188db67a4c834cb8336e4e7295315. Existing author regression receipts remain author-run evidence; I did not rerun unchanged passing suites or reproduce this on a live account/native client. This closure records the landed scope, not validation of the reporter's installed version or a release claim. If the same failure occurs on a build containing this commit, provide a new bounded, redacted reproduction against that build.ZarifS commentedon Oct 30, 2026
Additional Windows reproduction and verified workaround: OpenCodex 2.94.0, npm installation, Windows 11,
xai/grok-4.7, Grok OAuth.I understand #7911 landed on
dev; this confirms an affected installed release, not a regression of that commit. The installed source did not contain theoutput.encrypted_contentnormalization. OAuth reportedloggedIn: true,status: complete.Minimal POST to the running local proxy's
/v1/responses:{"model":"xai/grok-4.7","input":[{"role":"user","content":"What is 2 + 2? Answer briefly."}],"include":["reasoning.encrypted_content","output.encrypted_content"],"reasoning":{"effort":"medium"},"max_output_tokens":1024,"stream":false,"store":false}Reproduced HTTP 400:
{"code":"400","error":"Argument not supported: \"output.encrypted_content\" in \"include\" field"}The request log showed one
xai/grok-4.7attempt,adapter=openai-responses,credentialSource=grok-oauth, status 400.Applied the supported
modelAdapters["grok-4.7"] = "openai-chat"workaround through the management API, preserving existing overrides and the account. No package source or Codex catalog was manually patched, and no proxy restart was needed.Verified with tiny direct proxy requests, still including
output.encrypted_content:4..4, oneresponse.completed, no error event.{"value":4}.All four success logs confirmed a single
xai/grok-4.7attempt,adapter=openai-chat,credentialSource=grok-oauth, status 200, with no other provider/model fallback. OAuth remained logged in.Limitations: not yet verified in a full restarted Codex Desktop task, long conversations, images, native Responses encrypted-state replay, or web/X search. This changes the upstream wire rather than fixing native Responses. Please include #7911 in the next stable release. No credentials, account identifiers, private prompts, or user paths included.