shivammittal274 46a8326140 feat: add ChatGPT Pro OAuth as LLM provider (#476)
* feat: add ChatGPT Pro OAuth as LLM provider

Adds OAuth 2.0 (Authorization Code + PKCE) flow so users can authenticate
with their ChatGPT Pro subscription to power BrowserOS's agent, matching
the pattern used by Codex CLI, OpenCode, and Pi.

Server:
- OAuth token lifecycle (PKCE, exchange, refresh, SQLite storage)
- Dedicated callback server on port 1455 (Codex client ID registration)
- Codex fetch wrapper routing API calls to chatgpt.com/backend-api
- Config resolution + provider factories for all code paths (chat, test, refine)

Extension:
- ChatGPT Pro template card with OAuth flow trigger
- Status polling hook + auto-create provider on auth success
- Model list with Codex-supported models (gpt-5.x-codex family)

* fix: address Greptile PR review comments

- Wire OAuth callback server stop handle into onShutdown (P1: port 1455 leak)
- Guard against missing refresh token + clear stale tokens on failed refresh (P1)
- Add logger.warn to silent catch in codex-fetch body mutation
- Document JWT trust assumption in parseAccessTokenClaims
- Source model ID from provider template instead of hard-coding

* simplify: remove unnecessary OAuth shutdown wiring and useCallback

- Revert OAuthHandle interface — callback server port releases on process exit
- Remove stopCallbackServer from shutdown flow (dead code)
- Remove all useCallback from useOAuthStatus per CLAUDE.md guidance

* style: add readonly modifiers and braces per TS style guide

* docs: add E2E test screenshots for ChatGPT Pro OAuth

* fix: strip item IDs from Codex requests to fix multi-turn conversations

* fix: preserve function_call_output IDs in Codex requests

* fix: resolve Codex store=false + tool-use incompatibility

- Pass providerOptions { openai: { store: false } } to ToolLoopAgent
  so the AI SDK inlines content instead of using item_reference
- Strip item IDs and previous_response_id in codex-fetch (safety net)
- Use .responses() model (Codex only speaks Responses API format)

* fix: remove non-Codex model gpt-5.2 from chatgpt-pro model list

* fix: strip unsupported Codex params and update model list

- Strip temperature, max_tokens, top_p from Codex requests (unsupported)
- Add all available Codex models including gpt-5.4, gpt-5.2, gpt-5.1

* chore: remove screenshots containing email

* feat: enable reasoning events for ChatGPT Pro Codex models

* chore: set reasoning effort to high for ChatGPT Pro

* feat: add configurable reasoning effort and summary for ChatGPT Pro

- Add reasoningEffort (none/low/medium/high) and reasoningSummary
  (auto/concise/detailed) dropdowns in the Edit Provider dialog
- Pass through extension → chat request → agent config → providerOptions
- Defaults: effort=high, summary=auto

* fix: strip max_output_tokens from Codex requests (fixes compaction)

* fix: address Greptile P1 issues

- Fix default model fallback: gpt-4o → gpt-5.3-codex (Codex endpoint)
- Clear stale tokens on refresh failure (prevents infinite retry loop)
- Only auto-create provider after explicit OAuth flow, not on page load
- Add catch block to auto-create effect with error toast
2026-03-18 22:07:43 +05:30
2026-03-17 18:56:55 +05:30
2026-03-17 19:01:10 +05:30
2025-09-13 18:04:54 +05:30
2026-01-06 16:24:19 -08:00
2025-09-30 12:54:03 -07:00
2025-06-18 17:48:04 -07:00
2026-03-10 13:33:47 -07:00

🌐 BrowserOS is an open-source Chromium fork that runs AI agents natively. The privacy-first alternative to ChatGPT Atlas, Perplexity Comet, and Dia.

🔒 Use your own API keys or run local models with Ollama. Your data never leaves your machine.

💡 Join our Discord or Slack and help us build! Have feature requests? Suggest here.

Quick start

  1. Download and install BrowserOS:

  2. Import your Chrome data (optional)

  3. Connect your AI provider — use Claude, OpenAI, Gemini, or local models via Ollama and LMStudio.

  4. Start automating!

What makes BrowserOS special

  • 🏠 Feels like home — same Chrome interface, all your extensions just work
  • 🤖 AI agents that run on YOUR browser, not in the cloud
  • 🔒 Privacy first — bring your own keys or run local models with Ollama. Your browsing history stays on your machine
  • 🤝 BrowserOS as MCP server — control the browser from claude-code, gemini-cli, or any MCP client (31 tools)
  • 🔄 Workflows — build repeatable browser automations with a visual graph builder
  • 📂 Cowork — combine browser automation with local file operations. Research the web, save reports to your folder
  • Scheduled Tasks — run the agent on autopilot, daily or every few minutes
  • 💬 LLM Hub — compare Claude, ChatGPT, and Gemini side-by-side on any page
  • 🛡️ Built-in ad blocker — 10x more protection than Chrome with uBlock Origin + Manifest V2 support
  • 🚀 100% open source under AGPL-3.0

Demos

🤖 BrowserOS agent in action

BrowserOS agent in action

🎇 Install BrowserOS as MCP and control it from claude-code

https://github.com/user-attachments/assets/c725d6df-1a0d-40eb-a125-ea009bf664dc



💬 Use BrowserOS to chat

https://github.com/user-attachments/assets/726803c5-8e36-420e-8694-c63a2607beca



Use BrowserOS to scrape data

https://github.com/user-attachments/assets/9f038216-bc24-4555-abf1-af2adcb7ebc0



Why We're Building BrowserOS

For the first time since Netscape pioneered the web in 1994, AI gives us the chance to completely reimagine the browser. We've seen tools like Cursor deliver 10x productivity gains for developers—yet everyday browsing remains frustratingly archaic.

You're likely juggling 70+ tabs, battling your browser instead of having it assist you. Routine tasks, like ordering something from amazon or filling a form should be handled seamlessly by AI agents.

At BrowserOS, we're convinced that AI should empower you by automating tasks locally and securely—keeping your data private. We are building the best browser for this future!

How we compare

vs Chrome
While we're grateful for Google open-sourcing Chromium, but Chrome hasn't evolved much in 10 years. No AI features, no automation, no MCP support.
vs Brave
We love what Brave started, but they've spread themselves too thin with crypto, search, VPNs. We're laser-focused on AI-powered browsing.
vs Arc/Dia
Many loved Arc, but it was closed source. When they abandoned users, there was no recourse. We're 100% open source - fork it anytime!
vs Perplexity Comet
They're a search/ad company. Your browser history becomes their product. We keep everything local.
vs ChatGPT Atlas
Your browsing data could be used for ads or to train their models. We keep your history and agent interactions strictly local.

Contributing

We'd love your help making BrowserOS better!

License

BrowserOS is open source under the AGPL-3.0 license.

Credits

  • ungoogled-chromium - BrowserOS uses some patches for enhanced privacy. Thanks to everyone behind this project!
  • The Chromium Project - At the core of BrowserOS, making it possible to exist in the first place.

Citation

If you use BrowserOS in your research or project, please cite:

@software{browseros2025,
  author = {Sonti, Nithin and Sonti, Nikhil and {BrowserOS-team}},
  title = {BrowserOS: The open-source Agentic browser},
  url = {https://github.com/browseros-ai/BrowserOS},
  year = {2025},
  publisher = {GitHub},
  license = {AGPL-3.0},
}

Copyright © 2025 Felafax, Inc.

Stargazers

Thank you to all our supporters!

Star History Chart

Built with ❤️ from San Francisco

Description
No description provided
Readme AGPL-3.0 18 GiB
Languages
TypeScript 65.6%
C++ 24%
Go 6.5%
C 1.5%
Objective-C++ 1%
Other 1.3%