openai / openai/codex

Chrome browser control fails with "unsupported Codex auth method: apikey" while custom provider works normally

Open
#45,341 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

app auth browser bug custom-model
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What version of the Codex App are you using (From “About Codex” dialog)?

26.909.11814

What subscription do you have?

api key & ChatGPT Plus

What platform is your computer?

macOS

What issue are you seeing?

Codex Chrome browser control fails when Codex is using API-key authentication with a custom model provider.

Normal Codex model requests through the custom provider work correctly. However, Chrome browser-control APIs fail with:

unsupported Codex auth method: apikey

The affected calls include:

cua.createBrowserTab("chrome", , ...)
browser.nameSession()
browser.user.openTabs()

This appears to be specific to the Codex Chrome Extension / browser-control channel. It is not an error from the target website or its API.

As a comparison, the native macOS accessibility path:

cua.getApp("com.google.Chrome")

works correctly and can access Chrome window/page accessibility information.

Normal Codex execution using the same custom provider and API-key authentication also works correctly.

Therefore, the issue appears to be specific to the authentication handling of the Chrome browser-control channel when auth_mode is "apikey".

What steps can reproduce the bug?
  1. Configure Codex to use a custom OpenAI-compatible model provider with API-key authentication.

Relevant configuration:

model_provider = "custom"

[model_providers.custom]
wire_api = "responses"
requires_openai_auth = true

  1. Confirm that auth.json reports:

auth_mode = "apikey"

  1. Confirm that normal Codex model execution works through the custom provider. For example:

codex exec --skip-git-repo-check "Reply OK"

This successfully returns "OK".

  1. Invoke Chrome browser control using:

cua.createBrowserTab("chrome", , ...)

Alternatively, call:

browser.nameSession()

or:

browser.user.openTabs()

  1. The Chrome browser-control calls fail with:

unsupported Codex auth method: apikey

  1. As a control test, use:

cua.getApp("com.google.Chrome")

This works correctly through the native macOS accessibility/Computer Use path.

Expected behavior:
Chrome browser control should support API-key-authenticated Codex sessions, including sessions using a custom provider. Alternatively, browser-control authentication should be independent of model-provider authentication so that a custom/API-key model provider can coexist with the Chrome extension backend.

Actual behavior:
The custom provider and normal Codex model execution work, but the Chrome browser-control channel rejects the session solely because the Codex auth method is "apikey".

What is the expected behavior?

No response

Additional information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the documented custom provider and API-key configuration, then compare cua.createBrowserTab("chrome"), browser.nameSession(), and browser.user.openTabs() with the working cua.getApp("com.google.Chrome") path. Trace where the Chrome browser-control calls reject auth_mode "apikey". Done means browser control works with the custom/API-key session while normal execution and native accessibility behavior remain intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, rust
Domain
authentication, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.