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, | ||
| }), |
There was a problem hiding this comment.
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.
This reverts commit 1ac1a02.
There was a problem hiding this comment.
Instead of deleting it, it was easier to implement a solution.
You probably deleted it because your grandma hit you in the mouth with a slipper and you got scared.
You're pathetic.
There was a problem hiding this comment.
@titet11 No need to be dramatic, you're free to use https://github.com/griffinmartin/opencode-claude-auth or the plethora of other solutions that have been made in response to this.
| :::info | ||
| Using your Claude Pro/Max subscription in OpenCode is not officially supported by [Anthropic](https://anthropic.com). | ||
| ::: | ||
| There are plugins that allow you to use your Claude Pro/Max models with |
There was a problem hiding this comment.
Why did they make this change? Did they receive a warning letter or something like that?
| import { Log } from "../util/log" | ||
| import { createOpencodeClient } from "@opencode-ai/sdk" | ||
| import { Server } from "../server/server" | ||
| import { BunProc } from "../bun" |
- 恢复 providers.ts 中的 Anthropic 认证提示 - 恢复 llm.ts 中对 Anthropic 提供者的请求头处理 - 恢复 anthropic-20250930.txt 提示文件 - 恢复 providers.mdx 中关于 Anthropic 的文档信息
This reverts commit 1ac1a02.
This reverts commit 1ac1a02.
This reverts commit 1ac1a02.
This reverts commit 1ac1a02.
This reverts commit 1ac1a02.
还原官方因法律请求移除的 Anthropic 相关功能: - 恢复 opencode-anthropic-auth 内置插件 - 恢复 claude-code-20250219 beta header - 恢复 anthropic prompt 文件 - 恢复 provider 登录提示 - 恢复文档中的 OAuth 订阅说明
This reverts commit 1ac1a02.
This reverts commit 1ac1a02.
This reverts commit 1ac1a02.
This reverts commit 1ac1a02.
This reverts commit 1ac1a02.
This reverts commit 1ac1a02.
This reverts commit 1ac1a02.
This reverts commit 1ac1a02.
This reverts commit 1ac1a02.
This reverts commit 1ac1a02.
This reverts commit 1ac1a02.
Remove anthropic references per legal requests: