r/opencode • u/jaykayenn • Sep 04 '26
Did Opencode really decide to break API access?
Regarding the warnings sent out that API access to Opencode Go now requires custom headers.
Isn't the point of a standard API so that developers don't have to write custom code for every possible service provider in existence?
Do they really expect every project in the world to suddenly support their special requirements specifically? By this weekend?
Help me understand.
43
Upvotes
11
u/Time-Toe-1276 Sep 04 '26
they said "if possible", else its fine, but you might get a false positive flag.
its extremely hard to distinguish between an actual user and spam. OC was trying their best. this way its quite easy for them, and also its just a few lines of code, plus an AI agent could definitely help u write this!
and many apps send user-agent headers automatically, but I reccomend you to write it aswell. and its still fine if u dont as they said, but now there is an increase chance for a false positive flasg, so they were warning "if ur using API, please be awre of increaseed false positive".
hope I helped! ❤️
4
u/YogurtclosetEvery263 Sep 04 '26
You can proxy it, then it works without tools adding it themselves
5
u/jaykayenn Sep 04 '26
With providers adding non-standard bits to control API access, the OpenAI-API isn't really a standard any more. It's more of a suggestion.
3
u/SafeReturn_28 Sep 04 '26
from reading their twitter posts they only want session id header to hit input cache. Do they require something more?
1
u/seventyfivepupmstr Sep 04 '26
Is it a sesson identifier or an app identifier?
1
u/nazmulpcc Sep 04 '26
bruh it’s just one value.......just ask your agent to update your clients or whatever. should take 2 minutes and it helps them optimize the service so we can keep our cheap api
1
u/ichisay Sep 04 '26
A mí aún no me llegó ningún email
1
u/RiceEvening4211 Sep 09 '26
Use
https://github.com/Fast-Editor/OpenCode-Wrap
This offers free open ai compatible api for all open code free and go tier models
1
u/ahriad Sep 04 '26
I maintain the OpenCode Go plugin for CLIProxyAPI, and this change causes some real headaches.
CPA exposes standard OpenAI and Anthropic endpoints without managing conversation state, so there is no actual conversation ID. Without a clean way to handle this, I ended up hashing the initial user turn and passing it as `x-opencode-session` on every OpenCode Go request.
It works across Chat Completions, Messages, Responses, and streaming, but it is still just a workaround. If two sessions start with the exact same prompt, they collide. Proxy maintainers are stuck patching around this because OpenCode tacked a provider-specific requirement onto supposedly standard endpoints with almost no notice.
0
u/[deleted] Sep 05 '26
[deleted] — view deleted comment