Skip to content

Conversation

@manmal
Copy link
Contributor

@manmal manmal commented Dec 23, 2025

Fixes #46

Problem

The browser model selection was incorrectly mapping GPT-5.2 variants:

  • gpt-5.2-instant was mapped to "Auto" instead of "Instant"
  • gpt-5.2-thinking didn't exist as a CLI option
  • --browser-extended-thinking only supported "Extended" level, not Light/Standard/Heavy
  • The fuzzy matching algorithm would sometimes select the wrong variant (e.g., "Thinking" when "Auto" was requested)

Additionally, having fine-grained control over thinking time is useful when using oracle as a tool from AI coding agents (e.g., pi). For quick web searches or simple queries, a minimal thinking budget keeps responses fast; for complex reasoning tasks, extended thinking is preferred (and don't always need to use Pro for those).

Summary

⚠️ I haven't tested API modes, but should be fine. The only file that could affect API is src/cli/options.ts (changes to inferModelFromLabel).

  • Model Selection Fix: Correctly select Auto/Thinking/Instant/Pro variants in ChatGPT UI
    • Order BROWSER_MODEL_LABELS by specificity (most specific first)
    • Add exact testid match bonus in scoring algorithm
    • Fix buttonMatchesTarget() to reject unwanted variants (e.g., don't accept "Thinking" when "Auto" requested)
    • Add scoring penalties for thinking/instant when not requested
  • Thinking Time Parameter: Add --browser-thinking-time <light|standard|extended|heavy> option
  • Backward Compatibility: Keep --browser-extended-thinking as deprecated alias mapping to extended
  • UI Stall Workaround: Add page refresh after prompt submission to fix UI stalling with "thinking" indicator

Test plan

  • gpt-5.2 → ChatGPT 5.2 (Auto)
  • gpt-5.2-thinking → ChatGPT 5.2 Thinking
  • gpt-5.2-instant → ChatGPT 5.2 Instant
  • gpt-5.2-pro → ChatGPT 5.2 Pro
  • --browser-extended-thinking selects Extended thinking time (kept for backward compat, but could be removed as well)
  • --browser-thinking-time extended selects Extended thinking time
  • --browser-thinking-time light selects Light thinking time
  • --browser-thinking-time heavy selects Heavy thinking time
  • Build passes (pnpm build)

…arameter

- Fix model selection to correctly pick Auto/Thinking/Instant/Pro variants
- Add `--browser-thinking-time <light|standard|extended|heavy>` option
- Keep `--browser-extended-thinking` as deprecated alias for backward compatibility
- Add page refresh workaround for UI stalling after prompt submission

Model selection fixes:
- Order BROWSER_MODEL_LABELS by specificity (most specific first)
- Add exact testid match bonus in scoring algorithm
- Fix buttonMatchesTarget() to reject unwanted variants
- Add scoring penalties for thinking/instant when not requested
- Force English locale in Chrome (--lang=en-US)

Tested models:
- gpt-5.2 → ChatGPT 5.2 (Auto)
- gpt-5.2-thinking → ChatGPT 5.2 Thinking
- gpt-5.2-instant → ChatGPT 5.2 Instant
- gpt-5.2-pro → ChatGPT 5.2 Pro
@manmal manmal marked this pull request as ready for review December 23, 2025 12:22
@steipete steipete merged commit a8fc755 into steipete:main Dec 23, 2025
1 of 4 checks passed
@steipete
Copy link
Owner

Thanks Manuel!

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.

Browser mode selects wrong GPT-5.2 model variant

2 participants