opencode-claude-code-wrapper 0.0.3 → 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 -10
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -268,8 +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
- // Detected by special key value set during authorize
272
- if (auth.type === "api" && auth.key === "claude-code-cli") {
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) {
273
279
  for (const model of Object.values(provider.models)) {
274
280
  model.cost = {
275
281
  input: 0,
@@ -477,14 +483,6 @@ export async function ClaudeCodeWrapperPlugin({ client }) {
477
483
  return {};
478
484
  },
479
485
  methods: [
480
- {
481
- label: "Claude Code CLI",
482
- type: "api",
483
- authorize: async () => {
484
- // Return immediately with special key marker
485
- return { type: "success", key: "claude-code-cli" };
486
- },
487
- },
488
486
  {
489
487
  label: "Claude Pro/Max",
490
488
  type: "oauth",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-claude-code-wrapper",
3
- "version": "0.0.3",
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",