Skip to content

fix(browser): target renamed ChatGPT Pro model#190

Merged
steipete merged 4 commits into
steipete:mainfrom
jungdaesuh:fix-chatgpt-pro-model-selector
May 12, 2026
Merged

fix(browser): target renamed ChatGPT Pro model#190
steipete merged 4 commits into
steipete:mainfrom
jungdaesuh:fix-chatgpt-pro-model-selector

Conversation

@jungdaesuh
Copy link
Copy Markdown
Contributor

Summary

  • Target ChatGPT's renamed bare Pro picker label for GPT-5.5 Pro browser runs.
  • Keep older Pro aliases normalized to the current browser Pro target while preserving API model ids.
  • Reject stale versioned Pro labels such as GPT-5.4 Pro when current Pro is required.

Tests

  • pnpm exec vitest run tests/browser/modelSelection.test.ts tests/cli/browserConfig.test.ts tests/runOptions.test.ts tests/mcp/consult.test.ts tests/browser/pageActions.test.ts tests/browser/modelSelection.label.test.ts
  • pnpm exec oxfmt --check src/browser/actions/modelSelection.ts tests/browser/modelSelection.test.ts tests/mcp/consult.test.ts tests/runOptions.test.ts src/browser/constants.ts src/cli/browserConfig.ts tests/cli/browserConfig.test.ts
  • git diff --check
  • pnpm run build
  • Live browser smoke with local dist: ORACLE_PRO_SELECTOR_FINAL_OK
  • Live browser smoke with global oracle: ORACLE_GLOBAL_PRO_SELECTOR_FINAL_OK

@jungdaesuh
Copy link
Copy Markdown
Contributor Author

@steipete

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8049a81014

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/browser/actions/modelSelection.ts Outdated
Comment on lines +438 to +446
const candidateHasLegacyProVersion =
labelHasLegacyProVersion(normalizedText) || labelHasLegacyProVersion(normalizedTestId);
const candidateHasPro =
candidateGpt55VisibleAlias ||
normalizedText === 'pro' ||
normalizedText.startsWith('pro ') ||
normalizedText.includes(' pro ') ||
normalizedText.endsWith(' pro') ||
labelHasProWord(normalizedText) ||
normalizedText.includes('proresearch') ||
normalizedTestId.includes('pro');
if (wantsPro && candidateHasThinking) return 0;
if (wantsPro && candidateHasLegacyProVersion) return 0;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid rejecting Pro rows by their test id

When the ChatGPT picker exposes the current bare Pro row with a legacy-looking data-testid such as model-switcher-gpt-5-pro, the new legacy check marks it as stale because labelHasLegacyProVersion(normalizedTestId) matches gpt 5 pro, and line 446 then drops the only valid Pro candidate. Since the visible text is still the desired current Pro alias, this would make default browser runs fail with option-not-found; consider applying the stale-version filter to visible labels, or exempting the bare Pro alias when the text is Pro.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 334264f. The stale Pro-version filter now only checks visible option text, so a visible bare Pro row remains selectable even when its data-testid is model-switcher-gpt-5-pro. Added a regression test that executes the in-page selector against that exact menu shape.

Validated with:

  • pnpm exec vitest run tests/browser/modelSelection.test.ts tests/cli/browserConfig.test.ts tests/runOptions.test.ts tests/mcp/consult.test.ts tests/browser/pageActions.test.ts tests/browser/modelSelection.label.test.ts
  • pnpm exec oxfmt --check src/browser/actions/modelSelection.ts tests/browser/modelSelection.test.ts
  • pnpm run typecheck
  • pnpm run build

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fbeeddb945

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

import { logDomFailure } from "../domDebug.js";
import { buildClickDispatcher } from "./domEvents.js";

const LEGACY_PRO_VERSION_WORD_TOKENS = ["5 4", "5 2", "5 1", "5 0", "gpt 5 pro"] as const;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep GPT-5 Pro alias selectable during rollout

LEGACY_PRO_VERSION_WORD_TOKENS now classifies any label containing gpt 5 pro as stale, so browser selection for Pro/gpt-5.5-pro will reject a visible GPT-5 Pro row and eventually fail with option-not-found. This can break runs for tenants where ChatGPT has not fully switched to the bare Pro label (or uses the older alias in localized/gradual rollouts), even though that row still represents the current Pro target; consider excluding gpt 5 pro from the stale filter and only blocking explicitly older minor-version labels like 5.4/5.2/5.1/5.0.

Useful? React with 👍 / 👎.

@steipete steipete merged commit a1dbb13 into steipete:main May 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants