Skip to content

Identify Codex user agent as ChatGPT desktop app #843

Description

@wojtekmaj

Is your feature request related to a problem? Please describe.

ua-parser-js 2.0.10 and current master identify the ChatGPT desktop app as Electron when it emits a Codex/ product token. The same result is returned when the InApps extension is enabled.

User agent:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Codex/26.513.31313 Chrome/148.0.7778.97 Electron/42.0.1 Safari/537.36

Reproduction:

const { UAParser } = require("ua-parser-js");
const { InApps } = require("ua-parser-js/extensions");

const parser = new UAParser(userAgent, InApps);
console.log(parser.getBrowser());

Current result:

{
  "name": "Electron",
  "version": "42.0.1",
  "major": "42"
}

Describe the solution you would like

Map the Codex/ product token to the ChatGPT desktop app in the InApps extension. OpenAI now brands the desktop application as ChatGPT and describes Codex as a capability within that app: https://learn.chatgpt.com/

Expected result:

{
  "name": "ChatGPT",
  "version": "26.513.31313",
  "major": "26",
  "type": "inapp"
}

Describe alternatives you have considered

Consumers can detect the Codex/ product token before calling ua-parser-js, but that duplicates application detection already provided by the InApps extension.

Additional context

The public demo at https://uaparser.dev/#demo also reports Electron 42 for this user agent.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions