@khalilgharbaoui/opencode-claude-code-plugin 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -10
- package/dist/index.js +36 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ claude --version
|
|
|
23
23
|
|
|
24
24
|
That's it. Restart opencode, pick a `claude-code` model, done.
|
|
25
25
|
|
|
26
|
-
The plugin self-registers the `claude-code` provider, all current Claude Code models (Haiku 4.5, Sonnet 4.5/4.6, Opus 4.5/4.6/4.7/4.8) with reasoning variants (`low` / `medium` / `high` / `xhigh` / `max`), and sensible defaults for tool proxying. You don't need to write a `provider` block at all unless you want to override something.
|
|
26
|
+
The plugin self-registers the `claude-code` provider, all current Claude Code models (Haiku 4.5, Sonnet 4.5/4.6, Opus 4.5/4.6/4.7/4.8, Fable 5, Mythos 5) with reasoning variants (`low` / `medium` / `high` / `xhigh` / `max`), and sensible defaults for tool proxying. You don't need to write a `provider` block at all unless you want to override something.
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
@@ -66,18 +66,24 @@ In your `opencode.json`, point at the local build with a `file://` URL:
|
|
|
66
66
|
|
|
67
67
|
The plugin auto-registers the following. They appear in the model picker without any extra config.
|
|
68
68
|
|
|
69
|
-
| ID | Display name | Context | Output | Reasoning variants |
|
|
70
|
-
|
|
71
|
-
| `claude-haiku-4-5` | Claude
|
|
72
|
-
| `claude-sonnet-4-5` | Claude
|
|
73
|
-
| `claude-sonnet-4-6` | Claude
|
|
74
|
-
| `claude-opus-4-5` | Claude
|
|
75
|
-
| `claude-opus-4-6` | Claude
|
|
76
|
-
| `claude-opus-4-7` | Claude
|
|
77
|
-
| `claude-opus-4-8` | Claude
|
|
69
|
+
| ID | Display name | Context | Output | Reasoning variants | Price × |
|
|
70
|
+
|---|---|---|---|---|---|
|
|
71
|
+
| `claude-haiku-4-5` | Claude Haiku 4.5 | 200k | 8,192 | – | 1× |
|
|
72
|
+
| `claude-sonnet-4-5` | Claude Sonnet 4.5 | 1M | 16,384 | low/medium/high/xhigh/max | 3× |
|
|
73
|
+
| `claude-sonnet-4-6` | Claude Sonnet 4.6 | 1M | 16,384 | low/medium/high/xhigh/max | 3× |
|
|
74
|
+
| `claude-opus-4-5` | Claude Opus 4.5 | 1M | 16,384 | low/medium/high/xhigh/max | 5× |
|
|
75
|
+
| `claude-opus-4-6` | Claude Opus 4.6 | 1M | 16,384 | low/medium/high/xhigh/max | 5× |
|
|
76
|
+
| `claude-opus-4-7` | Claude Opus 4.7 | 1M | 16,384 | low/medium/high/xhigh/max | 5× |
|
|
77
|
+
| `claude-opus-4-8` | Claude Opus 4.8 | 1M | 16,384 | low/medium/high/xhigh/max | 5× |
|
|
78
|
+
| `claude-fable-5` | Claude Fable 5 | 1M | 16,384 | low/medium/high/xhigh/max | 10× |
|
|
79
|
+
| `claude-mythos-5` | Claude Mythos 5 | 1M | 16,384 | low/medium/high/xhigh/max | 10× |
|
|
80
|
+
|
|
81
|
+
`claude-mythos-5` is Mythos-class like Fable 5 but without safety classifiers, and is **limited availability via [Project Glasswing](https://anthropic.com/glasswing)**. It's registered unconditionally; if your Claude account lacks access, `claude --model claude-mythos-5` just errors. Use `claude-fable-5` (generally available) otherwise.
|
|
78
82
|
|
|
79
83
|
Capabilities for every model: text + image input, text output, tool use, attachments. No temperature control, no PDF/audio/video, no interleaved streaming.
|
|
80
84
|
|
|
85
|
+
**Price ×** is each model's per-token list price relative to Haiku, the cheapest model. It's derived exactly from Anthropic's published pricing — input and output ratios both come out the same (Haiku $1/$5 = 1×, Sonnet $3/$15 = 3×, Opus 4.8 $5/$25 = 5×, Fable 5 / Mythos 5 $10/$50 = 10×), so **Fable 5 and Mythos 5 cost 2× Opus 4.8**. The same multiplier is shown as a `(N×)` suffix on the display name in opencode's model picker, since opencode has no dedicated multiplier field. On a flat Max/Pro subscription it doubles as a rough guide to how fast each model drains your usage limit.
|
|
86
|
+
|
|
81
87
|
The model ID is passed straight through to `claude --model`, so anything Claude Code accepts works.
|
|
82
88
|
|
|
83
89
|
### Picking a variant
|
package/dist/index.js
CHANGED
|
@@ -4128,7 +4128,7 @@ function defineModel(opts) {
|
|
|
4128
4128
|
id: opts.id,
|
|
4129
4129
|
providerID: PROVIDER_ID,
|
|
4130
4130
|
api: { id: opts.id, url: "", npm: NPM },
|
|
4131
|
-
name: opts.name
|
|
4131
|
+
name: `${opts.name} (${opts.multiplier}\xD7)`,
|
|
4132
4132
|
family: opts.family,
|
|
4133
4133
|
capabilities: { ...baseCapabilities, reasoning: opts.reasoning },
|
|
4134
4134
|
cost: {
|
|
@@ -4146,7 +4146,8 @@ function defineModel(opts) {
|
|
|
4146
4146
|
}
|
|
4147
4147
|
var haikuCost = { input: 1e-6, output: 5e-6, cacheRead: 1e-7, cacheWrite: 125e-8 };
|
|
4148
4148
|
var sonnetCost = { input: 3e-6, output: 15e-6, cacheRead: 3e-7, cacheWrite: 375e-8 };
|
|
4149
|
-
var opusCost = { input:
|
|
4149
|
+
var opusCost = { input: 5e-6, output: 25e-6, cacheRead: 5e-7, cacheWrite: 625e-8 };
|
|
4150
|
+
var fableCost = { input: 1e-5, output: 5e-5, cacheRead: 1e-6, cacheWrite: 125e-7 };
|
|
4150
4151
|
function toConfigModel(model) {
|
|
4151
4152
|
const inputMods = [];
|
|
4152
4153
|
const outputMods = [];
|
|
@@ -4188,6 +4189,7 @@ var defaultModels = {
|
|
|
4188
4189
|
context: 2e5,
|
|
4189
4190
|
output: 8192,
|
|
4190
4191
|
cost: haikuCost,
|
|
4192
|
+
multiplier: 1,
|
|
4191
4193
|
releaseDate: "2024-10-22"
|
|
4192
4194
|
}),
|
|
4193
4195
|
"claude-sonnet-4-5": defineModel({
|
|
@@ -4198,6 +4200,7 @@ var defaultModels = {
|
|
|
4198
4200
|
context: 1e6,
|
|
4199
4201
|
output: 16384,
|
|
4200
4202
|
cost: sonnetCost,
|
|
4203
|
+
multiplier: 3,
|
|
4201
4204
|
releaseDate: "2025-04-14"
|
|
4202
4205
|
}),
|
|
4203
4206
|
"claude-sonnet-4-6": defineModel({
|
|
@@ -4208,6 +4211,7 @@ var defaultModels = {
|
|
|
4208
4211
|
context: 1e6,
|
|
4209
4212
|
output: 16384,
|
|
4210
4213
|
cost: sonnetCost,
|
|
4214
|
+
multiplier: 3,
|
|
4211
4215
|
releaseDate: "2025-06-19"
|
|
4212
4216
|
}),
|
|
4213
4217
|
"claude-opus-4-5": defineModel({
|
|
@@ -4218,6 +4222,7 @@ var defaultModels = {
|
|
|
4218
4222
|
context: 1e6,
|
|
4219
4223
|
output: 16384,
|
|
4220
4224
|
cost: opusCost,
|
|
4225
|
+
multiplier: 5,
|
|
4221
4226
|
releaseDate: "2025-04-14"
|
|
4222
4227
|
}),
|
|
4223
4228
|
"claude-opus-4-6": defineModel({
|
|
@@ -4228,6 +4233,7 @@ var defaultModels = {
|
|
|
4228
4233
|
context: 1e6,
|
|
4229
4234
|
output: 16384,
|
|
4230
4235
|
cost: opusCost,
|
|
4236
|
+
multiplier: 5,
|
|
4231
4237
|
releaseDate: "2025-06-19"
|
|
4232
4238
|
}),
|
|
4233
4239
|
"claude-opus-4-7": defineModel({
|
|
@@ -4238,6 +4244,7 @@ var defaultModels = {
|
|
|
4238
4244
|
context: 1e6,
|
|
4239
4245
|
output: 16384,
|
|
4240
4246
|
cost: opusCost,
|
|
4247
|
+
multiplier: 5,
|
|
4241
4248
|
releaseDate: "2025-07-16"
|
|
4242
4249
|
}),
|
|
4243
4250
|
"claude-opus-4-8": defineModel({
|
|
@@ -4248,7 +4255,34 @@ var defaultModels = {
|
|
|
4248
4255
|
context: 1e6,
|
|
4249
4256
|
output: 16384,
|
|
4250
4257
|
cost: opusCost,
|
|
4258
|
+
multiplier: 5,
|
|
4251
4259
|
releaseDate: "2026-05-28"
|
|
4260
|
+
}),
|
|
4261
|
+
"claude-fable-5": defineModel({
|
|
4262
|
+
id: "claude-fable-5",
|
|
4263
|
+
name: "Claude Fable 5",
|
|
4264
|
+
family: "fable",
|
|
4265
|
+
reasoning: true,
|
|
4266
|
+
context: 1e6,
|
|
4267
|
+
output: 16384,
|
|
4268
|
+
cost: fableCost,
|
|
4269
|
+
multiplier: 10,
|
|
4270
|
+
releaseDate: "2026-06-09"
|
|
4271
|
+
}),
|
|
4272
|
+
// Mythos 5 shares Fable 5's capabilities and pricing without the safety
|
|
4273
|
+
// classifiers; limited availability via Project Glasswing. `claude --model
|
|
4274
|
+
// claude-mythos-5` simply errors for accounts without access, so it's safe to
|
|
4275
|
+
// register unconditionally.
|
|
4276
|
+
"claude-mythos-5": defineModel({
|
|
4277
|
+
id: "claude-mythos-5",
|
|
4278
|
+
name: "Claude Mythos 5",
|
|
4279
|
+
family: "mythos",
|
|
4280
|
+
reasoning: true,
|
|
4281
|
+
context: 1e6,
|
|
4282
|
+
output: 16384,
|
|
4283
|
+
cost: fableCost,
|
|
4284
|
+
multiplier: 10,
|
|
4285
|
+
releaseDate: "2026-06-09"
|
|
4252
4286
|
})
|
|
4253
4287
|
};
|
|
4254
4288
|
|