opencode icon indicating copy to clipboard operation
opencode copied to clipboard

OpenAI does Not work when trying with Organization Subscription

Open shoaibsharif opened this issue 10 months ago • 18 comments

Description

Hi, I have trying to login with my Organization Pro subscription. this is what i get. Is this expected behavior?

Image

Plugins

none

OpenCode version

1.1.11

Steps to reproduce

  1. Go to opencode auth login
  2. connect openai pro/plus subscription
  3. complete authentication
  4. just type anything
  5. It throws error: "Usage not included in your plan"

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

shoaibsharif avatar Jan 10 '26 03:01 shoaibsharif

This issue might be a duplicate of existing issues. Please check:

  • #7550: opentui: TUI crashes after successful native OpenAI account connection (TypeError: local.agent.current() is undefined) - Also involves OpenAI authentication
  • #7565: OpenAI auth had fatal error after successful auth - Similar fatal error after authentication in version 1.1.11
  • #1686: Add OpenAI auth login like claude - Feature request for OpenAI subscription-based authentication similar to Claude
  • #7491: [FEATURE]: Verify subscription/model is usable when /connecting it - Related feature request to validate subscription/model usability

Feel free to ignore if none of these address your specific case.

github-actions[bot] avatar Jan 10 '26 03:01 github-actions[bot]

Same issue. For some reason opencode sees Business subscription as "x-codex-plan-type: free".

plxzy avatar Jan 10 '26 05:01 plxzy

yeah same thing, the new auth flow does not work with bussiness plans

fatihdogmus avatar Jan 10 '26 08:01 fatihdogmus

Hi, I’m experiencing the same issue. When using a organization subscription, I’m unable to run models properly in opencode.

Could you please share if there has been any update or workaround for this problem? I’d like to follow the latest progress.

Thanks!

hezhexi2002 avatar Jan 10 '26 08:01 hezhexi2002

Image

OmerFarukOruc avatar Jan 10 '26 12:01 OmerFarukOruc

having the same issue, hope its resolved soon

shariqriazz avatar Jan 10 '26 13:01 shariqriazz

merged PR that claims to fix, it lgtm but I can't test it myself, I tested pre-existing functionality and that still works so cutting a release

rekram1-node avatar Jan 10 '26 13:01 rekram1-node

Let me try @rekram1-node Is it going to be fixed with v1.1.12? I guess, I need to wait for https://github.com/anomalyco/opencode/actions/runs/20879328107 to be completed first

OmerFarukOruc avatar Jan 10 '26 13:01 OmerFarukOruc

yeah it should be

rekram1-node avatar Jan 10 '26 14:01 rekram1-node

Image

OmerFarukOruc avatar Jan 10 '26 14:01 OmerFarukOruc

Can confirm, not yet fixed.

rubencallewaert avatar Jan 10 '26 14:01 rubencallewaert

I updated the opencode, then did opencode auth logout and login again at now it seems to be working

fatihdogmus avatar Jan 10 '26 14:01 fatihdogmus

I updated the opencode, then did opencode auth logout and login again at now it seems to be working

Unfortunately this does not seem to be the case for me despite logging out and in multiple times.

rubencallewaert avatar Jan 10 '26 14:01 rubencallewaert

rekram1-node Hi, I analyzed the request, I found a header was missing in the opencode request. chatgpt-account-id If I add this manually, it's back to working immediately

Update: I have known how to make it work now. It was fixed in 1.1.12, and need to run command to logout opencode auth logout to refresh account id in credential files! Thank you.

hank9999 avatar Jan 10 '26 16:01 hank9999

I updated the opencode, then did opencode auth logout and login again at now it seems to be working

Unfortunately this does not seem to be the case for me despite logging out and in multiple times.

Did you try opencode auth logout?

hank9999 avatar Jan 10 '26 16:01 hank9999

talked to others you should only need to reauth and it should work again and make sure you are on 1.1.12

rekram1-node avatar Jan 10 '26 16:01 rekram1-node

I was on 1.1.12 and I did reauth multiple times, after logging out with opencode auth logout the difference is when I wanted to connect again I did it via the TUI, so in the TUI

/connect

This didn't work.

Now I tried it again with but after opencode auth logout via the cli I also used opencode auth login, this worked. So there's definitely something still broken in the TUI.

rubencallewaert avatar Jan 10 '26 16:01 rubencallewaert

I updated the opencode, then did opencode auth logout and login again at now it seems to be working

this worked for me, thank you!

  1. update to the latest opencode version
  2. run opencode auth logout
  3. run opencode auth login

robin-liquidium avatar Jan 10 '26 21:01 robin-liquidium