Skip to content

Commit 44d8ef6

Browse files
committed
anthropic legal requests
1 parent 8e09e8c commit 44d8ef6

File tree

6 files changed

+15
-193
lines changed

6 files changed

+15
-193
lines changed

packages/opencode/src/cli/cmd/providers.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,6 @@ export const ProvidersLoginCommand = cmd({
349349
value: x.id,
350350
hint: {
351351
opencode: "recommended",
352-
anthropic: "API key",
353352
openai: "ChatGPT Plus/Pro or API key",
354353
}[x.id],
355354
})),

packages/opencode/src/plugin/index.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ import { gitlabAuthPlugin as GitlabAuthPlugin } from "@gitlab/opencode-gitlab-au
1616
export namespace Plugin {
1717
const log = Log.create({ service: "plugin" })
1818

19-
const BUILTIN = ["[email protected]"]
20-
2119
// Built-in plugins that are directly imported (not installed from npm)
2220
const INTERNAL_PLUGINS: PluginInstance[] = [CodexAuthPlugin, CopilotAuthPlugin, GitlabAuthPlugin]
2321

@@ -55,9 +53,6 @@ export namespace Plugin {
5553

5654
let plugins = config.plugin ?? []
5755
if (plugins.length) await Config.waitForDependencies()
58-
if (!Flag.OPENCODE_DISABLE_DEFAULT_PLUGINS) {
59-
plugins = [...BUILTIN, ...plugins]
60-
}
6156

6257
for (let plugin of plugins) {
6358
// ignore old codex plugin since it is supported first party now

packages/opencode/src/provider/provider.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,7 @@ export namespace Provider {
150150
autoload: false,
151151
options: {
152152
headers: {
153-
"anthropic-beta":
154-
"claude-code-20250219,interleaved-thinking-2025-05-14,fine-grained-tool-streaming-2025-05-14",
153+
"anthropic-beta": "interleaved-thinking-2025-05-14,fine-grained-tool-streaming-2025-05-14",
155154
},
156155
},
157156
}

packages/opencode/src/session/llm.ts

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -207,18 +207,12 @@ export namespace LLM {
207207
maxOutputTokens,
208208
abortSignal: input.abort,
209209
headers: {
210-
...(input.model.providerID.startsWith("opencode")
211-
? {
212-
"x-opencode-project": Instance.project.id,
213-
"x-opencode-session": input.sessionID,
214-
"x-opencode-request": input.user.id,
215-
"x-opencode-client": Flag.OPENCODE_CLIENT,
216-
}
217-
: input.model.providerID !== "anthropic"
218-
? {
219-
"User-Agent": `opencode/${Installation.VERSION}`,
220-
}
221-
: undefined),
210+
...(input.model.providerID.startsWith("opencode") && {
211+
"x-opencode-project": Instance.project.id,
212+
"x-opencode-session": input.sessionID,
213+
"x-opencode-request": input.user.id,
214+
"x-opencode-client": Flag.OPENCODE_CLIENT,
215+
}),
222216
...input.model.headers,
223217
...headers,
224218
},

packages/opencode/src/session/prompt/anthropic-20250930.txt

Lines changed: 0 additions & 166 deletions
This file was deleted.

packages/web/src/content/docs/providers.mdx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,6 @@ For custom inference profiles, use the model and provider name in the key and se
307307
```txt
308308
┌ Select auth method
309309
310-
│ Claude Pro/Max
311-
│ Create an API Key
312310
│ Manually enter API Key
313311
314312
```
@@ -320,14 +318,17 @@ For custom inference profiles, use the model and provider name in the key and se
320318
```
321319

322320
:::info
323-
Using your Claude Pro/Max subscription in OpenCode is not officially supported by [Anthropic](https://anthropic.com).
324-
:::
321+
There are plugins that allow you to use your Claude Pro/Max models with
322+
OpenCode. Anthropic explicitly prohibits this.
325323

326-
##### Using API keys
324+
Other companies support freedom of choice with developer tooling - you can use
325+
the following subscriptions in OpenCode with zero setup:
327326

328-
You can also select **Create an API Key** if you don't have a Pro/Max subscription. It'll also open your browser and ask you to login to Anthropic and give you a code you can paste in your terminal.
327+
- ChatGPT Plus
328+
- Github Copilot
329+
- Gitlab Duo
330+
:::
329331

330-
Or if you already have an API key, you can select **Manually enter API Key** and paste it in your terminal.
331332

332333
---
333334

0 commit comments

Comments
 (0)