openclaw - 💡(How to fix) Fix [Bug] imageModel=codex/gpt-5.4 fails with "Failed to extract accountId from token"; media-understanding also rejects inbound images with "Model does not support images" [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#70201Fetched 2026-04-23 07:27:51
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

Error Message

  • if imageModel=codex/gpt-5.4 is unsupported on this auth/runtime path, OpenClaw should fail fast with an explicit configuration/runtime error instead of failing later with Failed to extract accountId from token [agent/embedded] ... provider=codex error=Failed to extract accountId from token

Code Example

{
  "primary": "openai-codex/gpt-5.4",
  "imageModel": "codex/gpt-5.4",
  "fallbacks": [
    "gk-chat/gemma-4-26b",
    "gk-chat/gpt-5.4-share",
    "gk-chat/qwen3.5-122b-self"
  ]
}

---

2026-04-22T11:07:44.231+08:00 [media-understanding] image: failed (0/1) reason=Model does not support images
2026-04-22T11:07:54.129+08:00 [tools] image failed: Image model failed (codex/gpt-5.4): Failed to extract accountId from token

2026-04-22T14:46:02.775+08:00 [media-understanding] image: failed (0/1) reason=Model does not support images
2026-04-22T14:46:26.438+08:00 [tools] image failed: Image model failed (codex/gpt-5.4): Failed to extract accountId from token

2026-04-22T18:09:38.705+08:00 [media-understanding] image: failed (0/1) reason=Model does not support images
2026-04-22T18:09:57.031+08:00 [tools] image failed: Image model failed (codex/gpt-5.4): Failed to extract accountId from token

---

[agent/embedded] ... provider=codex error=Failed to extract accountId from token
[model-fallback/decision] ... candidate=codex/gpt-5.4 ... detail=Failed to extract accountId from token
RAW_BUFFERClick to expand / collapse

Bug Description

Inbound image understanding is broken on this setup due to two observable failures on the OpenClaw image path:

  1. media-understanding rejects upstream

    • [media-understanding] image: failed (0/1) reason=Model does not support images
  2. explicit image tool call fails on imageModel

    • Image model failed (codex/gpt-5.4): Failed to extract accountId from token

Net effect:

  • text chat works
  • images visibly arrive in Discord
  • the agent can acknowledge that an image was received
  • but it cannot read screenshot text or describe image contents

Environment

  • OpenClaw: 2026.4.21 (f788c88)
  • macOS: 15.7.4 (24G517)
  • Channel: Discord
  • Session type: direct DM
  • Auth: OAuth

Relevant config:

{
  "primary": "openai-codex/gpt-5.4",
  "imageModel": "codex/gpt-5.4",
  "fallbacks": [
    "gk-chat/gemma-4-26b",
    "gk-chat/gpt-5.4-share",
    "gk-chat/qwen3.5-122b-self"
  ]
}

Important distinction:

  • working text model: openai-codex/gpt-5.4
  • failing image model: codex/gpt-5.4

Steps to Reproduce

  1. Set:
    • primary = openai-codex/gpt-5.4
    • imageModel = codex/gpt-5.4
  2. Start an agent in a Discord DM.
  3. Send an image containing readable text (for example, a screenshot).
  4. Ask the agent to read or describe the image text.

Expected Behavior

Either:

  • OpenClaw should successfully process the image and allow screenshot/image text recognition

or:

  • if imageModel=codex/gpt-5.4 is unsupported on this auth/runtime path, OpenClaw should fail fast with an explicit configuration/runtime error instead of failing later with Failed to extract accountId from token

Actual Behavior

  • inbound image is received
  • auto media-understanding rejects with Model does not support images
  • explicit image tool call fails with Failed to extract accountId from token
  • result: the agent knows an image was sent, but cannot read it

Logs / Evidence

2026-04-22T11:07:44.231+08:00 [media-understanding] image: failed (0/1) reason=Model does not support images
2026-04-22T11:07:54.129+08:00 [tools] image failed: Image model failed (codex/gpt-5.4): Failed to extract accountId from token

2026-04-22T14:46:02.775+08:00 [media-understanding] image: failed (0/1) reason=Model does not support images
2026-04-22T14:46:26.438+08:00 [tools] image failed: Image model failed (codex/gpt-5.4): Failed to extract accountId from token

2026-04-22T18:09:38.705+08:00 [media-understanding] image: failed (0/1) reason=Model does not support images
2026-04-22T18:09:57.031+08:00 [tools] image failed: Image model failed (codex/gpt-5.4): Failed to extract accountId from token

Related supporting pattern:

[agent/embedded] ... provider=codex error=Failed to extract accountId from token
[model-fallback/decision] ... candidate=codex/gpt-5.4 ... detail=Failed to extract accountId from token

Relation to Existing Issues

Related history:

  • #65431 — [Bug] image tool: Model does not support images despite input: ["text", "image"] in config (OPEN)
  • #23452 — [Bug] Vision/Image Recognition Broken Across Multiple Channels (CLOSED)
  • #27793 — [Bug]: image tool fails on 2026.2.24 with openai-codex/gpt-5.3-codex: {"detail":"Instructions are required"} (CLOSED)

This looks like the same image/vision failure family resurfacing on a new route:

  • upstream media-understanding rejection (Model does not support images)
  • plus codex/gpt-5.4 imageModel failure with Failed to extract accountId from token

Prior reports #23452 / #27793 were closed, but the pattern recurs here, and #65431 appears to be the current open tracking issue for the upstream image rejection side.

extent analysis

TL;DR

The most likely fix is to change the imageModel configuration to use a different model that supports image processing, as the current codex/gpt-5.4 model is causing failures.

Guidance

  • Verify that the codex/gpt-5.4 model is indeed not supported for image processing by checking the model's documentation or capabilities.
  • Try changing the imageModel configuration to use a different model, such as one of the fallback models listed in the configuration (e.g. gk-chat/gemma-4-26b).
  • Check the logs and evidence provided to see if there are any other error messages or patterns that could indicate a different root cause.
  • Consider updating the configuration to use a model that is known to support image processing, such as openai-codex/gpt-5.4 which is already working for text processing.

Example

No code snippet is provided as the issue is related to configuration and model selection.

Notes

The issue seems to be related to a known problem with image processing (see related issues #65431, #23452, and #27793). The fact that the openai-codex/gpt-5.4 model is working for text processing but not for image processing suggests that the issue is specific to the codex/gpt-5.4 model.

Recommendation

Apply a workaround by changing the imageModel configuration to use a different model that supports image processing, as the current model is causing failures. This is because the issue is likely due to the codex/gpt-5.4 model not supporting image processing, and changing to a different model may resolve the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug] imageModel=codex/gpt-5.4 fails with "Failed to extract accountId from token"; media-understanding also rejects inbound images with "Model does not support images" [1 participants]