opencode-claude-code-wrapper 0.0.2 → 0.0.4

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.
Files changed (2) hide show
  1. package/index.mjs +8 -5
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -268,7 +268,14 @@ export async function ClaudeCodeWrapperPlugin({ client }) {
268
268
  const auth = await getAuth();
269
269
 
270
270
  // Claude Code CLI auth - zero cost, use CLI
271
- if (auth.type === "claude-code") {
271
+ // Detected by special key value: user enters "cli" or "claude-code" as API key
272
+ const isClaudeCodeCLI =
273
+ auth.type === "api" &&
274
+ (auth.key === "claude-code-cli" ||
275
+ auth.key === "cli" ||
276
+ auth.key === "claude-code" ||
277
+ auth.key === "cc");
278
+ if (isClaudeCodeCLI) {
272
279
  for (const model of Object.values(provider.models)) {
273
280
  model.cost = {
274
281
  input: 0,
@@ -476,10 +483,6 @@ export async function ClaudeCodeWrapperPlugin({ client }) {
476
483
  return {};
477
484
  },
478
485
  methods: [
479
- {
480
- label: "Claude Code CLI",
481
- type: "claude-code",
482
- },
483
486
  {
484
487
  label: "Claude Pro/Max",
485
488
  type: "oauth",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-claude-code-wrapper",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "OpenCode plugin that wraps Claude Code CLI for API-like access",
5
5
  "main": "./index.mjs",
6
6
  "type": "module",