@khalilgharbaoui/opencode-claude-code-plugin 0.9.2 → 0.9.3

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 CHANGED
@@ -73,10 +73,12 @@ The plugin auto-registers the following. They appear in the model picker without
73
73
  | `claude-haiku-4-5` | Claude Haiku 4.5 | 200k | 8,192 | – | 1× |
74
74
  | `claude-sonnet-4-5` | Claude Sonnet 4.5 | 1M | 16,384 | low/medium/high/xhigh/max | 3× |
75
75
  | `claude-sonnet-4-6` | Claude Sonnet 4.6 | 1M | 16,384 | low/medium/high/xhigh/max | 3× |
76
+ | `claude-sonnet-5` | Claude Sonnet 5 | 1M | 128,000 | low/medium/high/xhigh/max | 2×* |
76
77
  | `claude-opus-4-5` | Claude Opus 4.5 | 1M | 16,384 | low/medium/high/xhigh/max | 5× |
77
78
  | `claude-opus-4-6` | Claude Opus 4.6 | 1M | 16,384 | low/medium/high/xhigh/max | 5× |
78
79
  | `claude-opus-4-7` | Claude Opus 4.7 | 1M | 16,384 | low/medium/high/xhigh/max | 5× |
79
80
  | `claude-opus-4-8` | Claude Opus 4.8 | 1M | 16,384 | low/medium/high/xhigh/max | 5× |
81
+ | `claude-opus-5` | Claude Opus 5 | 1M | 128,000 | low/medium/high/xhigh/max | 5× |
80
82
  | `claude-fable-5` | Claude Fable 5 | 1M | 16,384 | low/medium/high/xhigh/max | 10× |
81
83
  | `claude-mythos-5` | Claude Mythos 5 | 1M | 16,384 | low/medium/high/xhigh/max | 10× |
82
84
 
@@ -84,7 +86,7 @@ The plugin auto-registers the following. They appear in the model picker without
84
86
 
85
87
  Capabilities for every model: text + image input, text output, tool use, attachments. No temperature control, no PDF/audio/video, no interleaved streaming.
86
88
 
87
- **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.
89
+ **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 $5/$25 = 5×, Fable 5 / Mythos 5 $10/$50 = 10×), so **Fable 5 and Mythos 5 cost 2× Opus 5**. Sonnet 5's `2×` uses its introductory $2/$10 pricing through August 31, 2026; standard $3/$15 pricing begins September 1. 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.
88
90
 
89
91
  The model ID is passed straight through to `claude --model`, so anything Claude Code accepts works.
90
92
 
@@ -94,37 +96,11 @@ Variants set the underlying reasoning effort. They're regular opencode model var
94
96
 
95
97
  ---
96
98
 
97
- ## Billing change: June 15, 2026 (Agent SDK credit)
98
-
99
- This plugin drives Claude Code headlessly (`claude --print`), which Anthropic bills as [`claude -p` / Agent SDK usage](https://support.claude.com/en/articles/15036540-use-the-claude-agent-sdk-with-your-claude-plan). Starting **June 15, 2026**, on subscription plans that usage no longer counts toward your normal plan limits — it draws from a separate monthly **Agent SDK credit**:
100
-
101
- | Plan | Monthly credit |
102
- |---|---|
103
- | Pro | $20 |
104
- | Max 5x | $100 |
105
- | Max 20x | $200 |
106
- | Team (Standard seats) | $20 |
107
- | Team (Premium seats) | $100 |
108
- | Enterprise (usage-based) | $20 |
109
- | Enterprise (seat-based Premium seats) | $200 |
110
-
111
- Credits are **per user, not pooled** across a team, and Standard seats on seat-based Enterprise plans aren't eligible. See Anthropic's [Agent SDK credit article](https://support.claude.com/en/articles/15036540-use-the-claude-agent-sdk-with-your-claude-plan) for the authoritative table.
112
-
113
- What this means for plugin users:
114
-
115
- - **Claim the credit once.** It's a one-time opt-in via your Claude account; eligible users get an email with claim instructions before June 15, 2026. After that it refreshes every billing cycle, and unused credit does not roll over.
116
- - **Agent SDK usage drains the credit first**, before any other source.
117
- - **When the credit runs out, plugin requests stop** until the next billing cycle — unless you enable usage credits in your Claude account, in which case overflow is billed at standard API rates.
118
- - **The credit is denominated in dollars at standard API rates**, so the Price × column above maps directly to how fast each model drains it — Fable 5 / Mythos 5 burn it 10× faster than Haiku, 2× faster than Opus 4.8.
119
- - **API-key auth is unaffected.** If your `claude` CLI authenticates with an Anthropic API key / Console billing instead of a subscription, nothing changes — pay-as-you-go as before.
120
- - **Watch for a stray `ANTHROPIC_API_KEY`.** If that variable (or `ANTHROPIC_AUTH_TOKEN`) is present in your environment, Claude Code uses it and bills pay-as-you-go — silently bypassing the subscription credit even when `claude` is logged into a plan. The plugin logs a one-time warning when it detects a key. To force subscription auth, set `ignoreAnthropicApiKey: true`, which strips the key from the `claude` spawn environment.
121
- - **Interactive Claude Code in your terminal is unaffected.** The change targets programmatic usage only: the Agent SDK, `claude -p`, Claude Code GitHub Actions, and third-party apps like this plugin.
122
-
123
- Two related dates:
124
-
125
- - **June 15, 2026** also retires the original Claude 4 model IDs `claude-sonnet-4-20250514` and `claude-opus-4-20250514` from the API. The plugin doesn't register either, but model IDs pass straight through to `claude --model` — if you've configured one of these as an override, migrate to `claude-sonnet-4-6` / `claude-opus-4-8` before then.
126
- - **June 22, 2026** is the last day [Fable 5 is included at no extra cost](https://platform.claude.com/docs/en/about-claude/models/introducing-claude-fable-5-and-claude-mythos-5) on Pro, Max, Team, and seat-based Enterprise plans. From June 23, `claude-fable-5` requires usage credits (Anthropic says it aims to fold it back into plans once capacity allows). `claude-mythos-5` is unaffected — it's Glasswing access-gated either way.
99
+ ## Billing
127
100
 
101
+ This plugin drives Claude Code headlessly (Agent SDK > `claude --print`)
102
+ check out this page for updated information about billing: https://support.claude.com/en/articles/15036540-use-the-claude-agent-sdk-with-your-claude-plan
103
+
128
104
  ---
129
105
 
130
106
  ## Configuration
package/dist/index.js CHANGED
@@ -4811,6 +4811,7 @@ function defineModel(opts) {
4811
4811
  }
4812
4812
  var haikuCost = { input: 1e-6, output: 5e-6, cacheRead: 1e-7, cacheWrite: 125e-8 };
4813
4813
  var sonnetCost = { input: 3e-6, output: 15e-6, cacheRead: 3e-7, cacheWrite: 375e-8 };
4814
+ var sonnet5Cost = { input: 2e-6, output: 1e-5, cacheRead: 2e-7, cacheWrite: 25e-7 };
4814
4815
  var opusCost = { input: 5e-6, output: 25e-6, cacheRead: 5e-7, cacheWrite: 625e-8 };
4815
4816
  var fableCost = { input: 1e-5, output: 5e-5, cacheRead: 1e-6, cacheWrite: 125e-7 };
4816
4817
  function toConfigModel(model) {
@@ -4879,6 +4880,17 @@ var defaultModels = {
4879
4880
  multiplier: 3,
4880
4881
  releaseDate: "2025-06-19"
4881
4882
  }),
4883
+ "claude-sonnet-5": defineModel({
4884
+ id: "claude-sonnet-5",
4885
+ name: "Claude Sonnet 5",
4886
+ family: "sonnet",
4887
+ reasoning: true,
4888
+ context: 1e6,
4889
+ output: 128e3,
4890
+ cost: sonnet5Cost,
4891
+ multiplier: 2,
4892
+ releaseDate: "2026-06-30"
4893
+ }),
4882
4894
  "claude-opus-4-5": defineModel({
4883
4895
  id: "claude-opus-4-5",
4884
4896
  name: "Claude Opus 4.5",
@@ -4923,6 +4935,17 @@ var defaultModels = {
4923
4935
  multiplier: 5,
4924
4936
  releaseDate: "2026-05-28"
4925
4937
  }),
4938
+ "claude-opus-5": defineModel({
4939
+ id: "claude-opus-5",
4940
+ name: "Claude Opus 5",
4941
+ family: "opus",
4942
+ reasoning: true,
4943
+ context: 1e6,
4944
+ output: 128e3,
4945
+ cost: opusCost,
4946
+ multiplier: 5,
4947
+ releaseDate: "2026-07-24"
4948
+ }),
4926
4949
  "claude-fable-5": defineModel({
4927
4950
  id: "claude-fable-5",
4928
4951
  name: "Claude Fable 5",