OpenCode logo

Coding agents · by OpenCode

Live

OpenCode supports Sign in with ChatGPT

Open-source AI coding agent for the terminal.

Visit OpenCode

How to use your ChatGPT plan in OpenCode

  1. Run /connect and pick OpenAI.
  2. Choose Sign in with ChatGPT (not the legacy methods).
  3. Pick a model with /models.

Context is capped for ChatGPT sign-ins: 500K tokens on GPT-6.1 Sol and newer, 272K on older models.

Source: github.com · last verified

OpenCode and ChatGPT: FAQ

Does OpenCode support Sign in with ChatGPT?
Yes. You can log in to OpenCode with your ChatGPT account and use your ChatGPT plan for its AI requests.
How do I log in to OpenCode with ChatGPT?
Run /connect and pick OpenAI. Choose Sign in with ChatGPT (not the legacy methods). Pick a model with /models.
Which ChatGPT plans work with OpenCode?
Per OpenAI, any ChatGPT plan, including Free can be used in OpenCode. Eligible usage counts toward your ChatGPT plan limits, which you can check at chatgpt.com/settings/usage. Context is capped for ChatGPT sign-ins: 500K tokens on GPT-6.1 Sol and newer, 272K on older models.

Building your own app? Read the Sign in with ChatGPT developer guide.

Other coding agents with Sign in with ChatGPT