Conversation
Greptile SummaryThis PR removes Anthropic-specific references from the codebase per legal requirements, including the branded system prompt file, the Key changes:
Issues found:
Confidence Score: 3/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[LLM.stream called] --> B{providerID starts with 'opencode'?}
B -- Yes --> C[Add x-opencode-project/session/request/client headers]
B -- No --> D[No extra headers added]
C --> E[Merge model.headers]
D --> E
E --> F[Merge plugin chat.headers]
F --> G[streamText call]
subgraph "Before PR (removed path)"
H{providerID !== 'anthropic'?}
H -- Yes --> I["Add User-Agent: opencode/VERSION"]
H -- No --> J[undefined — no headers]
end
style D fill:#f99,stroke:#c00
style I fill:#9f9,stroke:#090
style J fill:#ccc,stroke:#999
|
| headers: { | ||
| ...(input.model.providerID.startsWith("opencode") | ||
| ? { | ||
| "x-opencode-project": Instance.project.id, | ||
| "x-opencode-session": input.sessionID, | ||
| "x-opencode-request": input.user.id, | ||
| "x-opencode-client": Flag.OPENCODE_CLIENT, | ||
| } | ||
| : input.model.providerID !== "anthropic" | ||
| ? { | ||
| "User-Agent": `opencode/${Installation.VERSION}`, | ||
| } | ||
| : undefined), | ||
| ...(input.model.providerID.startsWith("opencode") && { | ||
| "x-opencode-project": Instance.project.id, | ||
| "x-opencode-session": input.sessionID, | ||
| "x-opencode-request": input.user.id, | ||
| "x-opencode-client": Flag.OPENCODE_CLIENT, | ||
| }), |
Silent removal of
User-Agent header for third-party providers
The original logic sent User-Agent: opencode/${Installation.VERSION} to all providers except opencode-prefixed and anthropic ones. The refactored code only adds the x-opencode-* headers for opencode providers and adds nothing for everyone else — meaning providers like openai, google, azure, openrouter, etc. silently lose the User-Agent header.
This is likely an unintended side-effect of removing the anthropic-specific exclusion. The ternary was restructured into a simple &&, dropping the middle branch entirely.
If intentional, this should be documented. If unintentional, consider restoring it:
| headers: { | |
| ...(input.model.providerID.startsWith("opencode") | |
| ? { | |
| "x-opencode-project": Instance.project.id, | |
| "x-opencode-session": input.sessionID, | |
| "x-opencode-request": input.user.id, | |
| "x-opencode-client": Flag.OPENCODE_CLIENT, | |
| } | |
| : input.model.providerID !== "anthropic" | |
| ? { | |
| "User-Agent": `opencode/${Installation.VERSION}`, | |
| } | |
| : undefined), | |
| ...(input.model.providerID.startsWith("opencode") && { | |
| "x-opencode-project": Instance.project.id, | |
| "x-opencode-session": input.sessionID, | |
| "x-opencode-request": input.user.id, | |
| "x-opencode-client": Flag.OPENCODE_CLIENT, | |
| }), | |
| ...(input.model.providerID.startsWith("opencode") | |
| ? { | |
| "x-opencode-project": Instance.project.id, | |
| "x-opencode-session": input.sessionID, | |
| "x-opencode-request": input.user.id, | |
| "x-opencode-client": Flag.OPENCODE_CLIENT, | |
| } | |
| : { | |
| "User-Agent": `opencode/${Installation.VERSION}`, | |
| }), |
This reverts commit 1ac1a02.
|
I can't tell if the lack of noise in here is a good or bad thing haha Not trying to start something but oooooof this sucks @thdxr has his hands tied but we as the community can stand up |
|
What should and what can we do??? |
|
We need to work together to find a solution that doesn't involve the OpenCode name We have all the tools |
|
It seems like the change here is that the plugin will not be loaded by default, not that the plugin won't work. It seems like a truly third party plugin is still possible |
This reverts commit 1ac1a02.
This reverts commit 1ac1a02.
|
@griffinmartin has a plugin incoming that will fix |
|
The obvious question here is.. what's the border between normal enforcement of product boundaries and a hostile move against third-party harnesses. |
|
I think the best solution to use Anthropic models with OpenCode without breaking the bank at the moment is through a Copilot subscription. I've created a gist for research purposes describing how one would implement the OAuth flow and impersonate Claude Code: https://gist.github.com/cedws/3a24b2c7569bb610e24aa90dd217d9f2 |
|
For as i know. i been using claude on latest update via custom provider :/ idk if this changes anything beyond our current use for opencode |
This reverts commit 1ac1a02.
|
Worth considering: https://en.wikipedia.org/wiki/Code_as_speech |
|
Lame. Switching to OpenAI. 5.4 gives pretty good results. |
|
https://pi.dev still supports logging in with your Claude subscription |
|
Bye bye claude subscription, what an idiot of a ceo . They cannot make a cli which doesn't glitch like an alien movie, and yet cancels the only thing that works with their product |
|
https://github.com/griffinmartin/opencode-claude-auth is stable and confirmed working. |
|
Thanks to the amazing work of the OSS community. Btw, if you're using Arch Linux, I've just created an AUR package for easier installation: https://aur.archlinux.org/packages/opencode-claude-auth |
This reverts commit 1ac1a02 (anomalyco#18186)
|
We need a plugin manager system here, so such plugins can be downloaded and installed automatically |
|
the anthropic need to be die |
|
What a loss we had today... |
|
Community workaround available: opencode-anthropic-oauth Direct browser OAuth — no Claude Code installation or credential syncing needed. {
"plugin": ["opencode-anthropic-oauth"]
}GitHub: https://github.com/shahidshabbir-se/opencode-anthropic-oauth |
|
OK, there are plugins now to fetch Claude Code tokens, but this PR goes bigger than tokens: anthropic provider removal. Once this PR is released, what needs to be done to keep it working? |
|
They just seem like such scumbags. Hey let us abuse our users because we wrote some legalese. Just rate-limit if it's such an issue for service health; but no... some management consulting nitwit convinced them
I like the anthropic models and the openai models, because they just are better than open models that normal people can run without a bunch of investment. This isn't using any proprietary tech within the CLI... Anthropic are trying to weaponise, legally their terribly implemented APIs (from a perspective this could cause them any damages); this is not even like soft-modding a console; it's using different hardware to run games you already pay for access to. Ugh |
|
Anthropic, a company named after 'humanity,' why does it constantly fail to act like one? |
This reverts commit 1ac1a02.
I mean, have you seen the greedy things humans do? |
|
Hi there,Thank you for your email. I am currently offline and will not have access to email instantly. If this is urgent, please contact me by phone 18258583270. I will do my best to respond promptly to your email when I am on line.Best,
|
|
loser dario |
|
Proud of all the peeps here with creative solutions! I think the next steps would be for someone to launch a plugin that actively manages something like https://github.com/router-for-me/CLIProxyAPI in order to make it even harder for them to catch us! 😉 The gist is that we want a plugin that would manage a Proxy directly instead of worrying about headers and whatnot. This would involve adding a PR to support a plugin auto-registering a new provider, potentially, but WE CAN DO THIS! The power of open source is amazing Friendly reminder that OpenCode team will probably not be rearing their heads in here due to legal, but let's all remember that forks are not the answer! Maybe one day they can spin out maintainership of this repo to a non-profit instead of it conflicting with their Zen product's economics 😁 |
|
The underlying issue is that anthropic does not want these tools to integrate with their subscription api. Making plug-ins does not work in the long-run. |
Things like these are a game of whack-a-mole. You just need more moles. That's why open-source wins. Plugins specifically also shifts the liability away from Anomaly which is perfect! |
|
@cdbattags tools will be spun up for sure, I have one being churned out that uses CC like anthropic wants it to be used, fully compliant, OC remains in the driving seat. Zen with Kimi K2.5 free quota with its overthinking has got it to a point. There's also https://github.com/unixfox/opencode-claude-code-plugin that gets closest to a provider. It's not the OC community that has to go around anthropic, anthropic is stumbling around not just OC but entire dev landscape. The more features they mount on the REPL, the more they tangle themselves as their compliance model caves into itself. It's a vicious loop. I hope CC team is enjoying the process maintaining their obfuscated contraption and soaking it all in as entertainment, that's the only way for them to learn and grow along with us. |
|
The day. I was here. |
Remove anthropic references per legal requests: