Skip to content

docs: Add LLM subscriptions guide for OpenAI ChatGPT subscription authentication#267

Merged
xingyaoww merged 11 commits intomainfrom
feat/openai-subscription-auth
Feb 2, 2026
Merged

docs: Add LLM subscriptions guide for OpenAI ChatGPT subscription authentication#267
xingyaoww merged 11 commits intomainfrom
feat/openai-subscription-auth

Conversation

@xingyaoww
Copy link
Contributor

Summary

This PR adds documentation for the new LLM.subscription_login() feature that allows users to authenticate with their ChatGPT Plus/Pro subscription to access Codex models without consuming API credits.

Related SDK PR: OpenHands/software-agent-sdk#1682

Changes

  • Added new guide: sdk/guides/llm-subscriptions.mdx
  • Updated docs.json to include the new page in the "LLM Features" navigation group

Documentation Covers

  • OAuth PKCE authentication flow - Secure browser-based login
  • Credential caching - Automatic storage in ~/.local/share/openhands/auth/
  • Automatic token refresh - Seamless credential management
  • Supported models:
    • gpt-5.2-codex (default)
    • gpt-5.2
    • gpt-5.1-codex-max
    • gpt-5.1-codex-mini
  • Configuration options:
    • force_login - Force fresh OAuth login
    • open_browser - Control browser auto-open behavior
  • Requirements - ChatGPT Plus/Pro subscription, browser access

Note

OpenAI subscription is the first provider supported. The documentation is structured to accommodate future subscription providers as they are added.

@xingyaoww can click here to continue refining the PR

…hentication

This adds documentation for the new subscription_login() feature that allows
users to authenticate with their ChatGPT Plus/Pro subscription to access
Codex models without consuming API credits.

Key features documented:
- OAuth PKCE authentication flow
- Credential caching and automatic token refresh
- Supported models (gpt-5.2-codex, gpt-5.2, gpt-5.1-codex-max, gpt-5.1-codex-mini)
- Configuration options (force_login, open_browser)
- Credential storage location

Related SDK PR: OpenHands/software-agent-sdk#1682

Co-authored-by: openhands <openhands@all-hands.dev>
…tion

- Fix subscription_login example path from 34 to 35
- Add vendor='openai' parameter to all code examples
- Update code to match actual SDK example
- Add new critic.mdx documentation for 34_critic_example.py
- Add critic page to Agent Features navigation group

Co-authored-by: openhands <openhands@all-hands.dev>
@xingyaoww
Copy link
Contributor Author

@OpenHands merge from main and resolve the conflict. KEEP critic docs from main, and only add the new llm subscription docs

@openhands-ai
Copy link

openhands-ai bot commented Feb 2, 2026

I'm on it! xingyaoww can track my progress at all-hands.dev

Keep critic docs from main, preserve new llm-subscriptions docs

Co-authored-by: openhands <openhands@all-hands.dev>
@openhands-ai
Copy link

openhands-ai bot commented Feb 2, 2026

I've successfully merged main into the feat/openai-subscription-auth branch and resolved the conflict as requested.

Summary of Changes

Conflict Resolution:

  • ✅ Merged from origin/main into the feature branch
  • ✅ Resolved the conflict in sdk/guides/critic.mdx by keeping the version from main (the more comprehensive documentation with sections like "What is a Critic?", "Quick Start", "Understanding Critic Results", "Troubleshooting", etc.)
  • ✅ Preserved the new sdk/guides/llm-subscriptions.mdx documentation from the feature branch

Final Diff (compared to main):

  • docs.json: +1 line (adds llm-subscriptions to navigation)
  • sdk/guides/llm-subscriptions.mdx: +183 lines (new file with LLM subscription documentation)
  • sdk/guides/critic.mdx: No changes (identical to main)

The changes have been pushed to the remote branch feat/openai-subscription-auth.

View full conversation

@xingyaoww xingyaoww marked this pull request as ready for review February 2, 2026 13:51
@xingyaoww xingyaoww requested a review from enyst as a code owner February 2, 2026 13:51
@xingyaoww xingyaoww marked this pull request as draft February 2, 2026 13:51
…quickstart

- Update credential storage path from ~/.local/share/openhands/auth/ to ~/.openhands/auth/ to match SDK PR #1682
- Fix example directory name from agent-sdk to software-agent-sdk
- Add ChatGPT Subscription as third option in how-to-run-example.mdx
- Add Tip component linking to LLM Subscriptions guide

Co-authored-by: openhands <openhands@all-hands.dev>
Remove code block for ChatGPT subscription option and keep it as a Tip
component that links to the LLM Subscriptions guide.

Co-authored-by: openhands <openhands@all-hands.dev>
- Add import for RunExampleCode shared snippet
- Add 'ready-to-run example' link at top
- Restructure 'How It Works' section using Steps/Step components
- Move 'Ready-to-run Example' section to end (before Next Steps)
- Add RunExampleCode component after code block
- Add icon='python' to all code blocks

Co-authored-by: openhands <openhands@all-hands.dev>
- Remove OAuth PKCE flow details (keep it high-level)
- Remove Automatic Token Management step (merge into step 2)
- Simplify Credential Storage section

Co-authored-by: openhands <openhands@all-hands.dev>
…GENTS.md

- Add Option 3: ChatGPT Subscription to getting-started.mdx AccordionGroup
- Add 'LLM API Key Options' section to AGENTS.md documenting the three ways
  users can obtain LLM access for future reference

Co-authored-by: openhands <openhands@all-hands.dev>
Copy link
Collaborator

@enyst enyst left a comment

Choose a reason for hiding this comment

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

Thank you!

Co-authored-by: Engel Nyst <engel.nyst@gmail.com>
@openhands-ai
Copy link

openhands-ai bot commented Feb 2, 2026

Looks like there are a few issues preventing this PR from being merged!

  • GitHub Actions are failing:
    • .github/workflows/sync-agent-sdk-openapi.yml
    • .github/workflows/sync-docs-code-blocks.yml

If you'd like me to help, just leave a comment, like

@OpenHands please fix the failing actions on PR #267 at branch `feat/openai-subscription-auth`

Feel free to include any additional details that might help me get this PR into a better state.

You can manage your notification settings

@xingyaoww xingyaoww merged commit bc15056 into main Feb 2, 2026
4 checks passed
@xingyaoww xingyaoww deleted the feat/openai-subscription-auth branch February 2, 2026 15:10
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.

3 participants

Comments