opencode-puter-auth 1.0.32 → 1.0.34
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 +164 -87
- package/dist/cli.js +0 -0
- package/dist/plugin.d.ts +5 -2
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +29 -26
- package/dist/plugin.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -5,32 +5,30 @@
|
|
|
5
5
|
[](https://opensource.org/licenses/MIT)
|
|
6
6
|
[](https://ko-fi.com/chindrismihai)
|
|
7
7
|
|
|
8
|
-
>
|
|
8
|
+
> Access Claude Opus 4.5, Sonnet 4.5, GPT-5, Gemini, DeepSeek, and 500+ AI models through Puter.com - no API keys needed.
|
|
9
9
|
|
|
10
|
-
Enable OpenCode to authenticate with [Puter.com](https://puter.com) via OAuth, giving you
|
|
10
|
+
Enable OpenCode to authenticate with [Puter.com](https://puter.com) via OAuth, giving you easy access to premium AI models through your Puter account.
|
|
11
11
|
|
|
12
12
|
## What You Get
|
|
13
13
|
|
|
14
|
-
- **
|
|
15
|
-
- **
|
|
16
|
-
- **
|
|
17
|
-
- **
|
|
18
|
-
- **FREE, UNLIMITED DeepSeek R1** - Advanced reasoning model
|
|
14
|
+
- **Claude Opus 4.5, Sonnet 4.5** - Best coding AI models
|
|
15
|
+
- **GPT-5.2, o3-mini, o4-mini** - OpenAI's latest models
|
|
16
|
+
- **Gemini 2.5 Pro** - 1M context window
|
|
17
|
+
- **DeepSeek R1** - Advanced reasoning model
|
|
19
18
|
- **500+ More Models** - Mistral, Llama, Grok, and more
|
|
20
|
-
- **No Rate Limits** - Puter's "User-Pays" model means truly unlimited usage
|
|
21
19
|
- **Real-time SSE Streaming** - Full streaming support
|
|
22
20
|
- **Tool Calling** - Native function calling support
|
|
23
21
|
- **Vision Support** - Image analysis capabilities
|
|
24
22
|
|
|
25
23
|
## How It Works
|
|
26
24
|
|
|
27
|
-
Puter.com uses
|
|
25
|
+
Puter.com uses a **credit-based model**:
|
|
28
26
|
|
|
29
|
-
1. **
|
|
30
|
-
2. **
|
|
31
|
-
3. **
|
|
27
|
+
1. **No API keys** - Just sign in with your Puter account
|
|
28
|
+
2. **Free credits** - New accounts get initial credits to start
|
|
29
|
+
3. **Pay as you go** - Premium models consume credits; top up when needed
|
|
32
30
|
|
|
33
|
-
This
|
|
31
|
+
> **Important:** Premium AI models (Claude, GPT, etc.) consume Puter credits. This is NOT unlimited - when credits run out, you can add more on Puter.com.
|
|
34
32
|
|
|
35
33
|
## Installation
|
|
36
34
|
|
|
@@ -39,91 +37,81 @@ This means whether you have 1 or 1 million users, you pay $0 for AI infrastructu
|
|
|
39
37
|
Paste this into any LLM agent (Claude Code, OpenCode, Cursor, etc.):
|
|
40
38
|
|
|
41
39
|
```
|
|
42
|
-
Install the opencode-puter-auth plugin and configure Puter.com models
|
|
40
|
+
Install the opencode-puter-auth plugin and configure Puter.com models
|
|
43
41
|
in ~/.config/opencode/opencode.json by following:
|
|
44
42
|
https://raw.githubusercontent.com/Mihai-Codes/opencode-puter-auth/main/README.md
|
|
45
43
|
```
|
|
46
44
|
|
|
47
45
|
### Option B: Manual Setup
|
|
48
46
|
|
|
49
|
-
1. **Add the
|
|
50
|
-
|
|
51
|
-
```json
|
|
52
|
-
{
|
|
53
|
-
"plugin": ["opencode-puter-auth"]
|
|
54
|
-
}
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
2. **Authenticate with Puter:**
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
# Run the CLI authentication command
|
|
61
|
-
puter-auth
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
> **Note:** Puter authentication does NOT appear in `opencode auth login`. This is by design - the plugin uses the same pattern as `opencode-antigravity-auth`, piggybacking on the `google` provider. Authentication happens automatically when you first use a Puter model, or you can run `puter-auth` manually.
|
|
65
|
-
|
|
66
|
-
3. **Add model definitions:**
|
|
47
|
+
1. **Add the complete configuration to your opencode.json** (`~/.config/opencode/opencode.json`):
|
|
67
48
|
|
|
68
49
|
```json
|
|
69
50
|
{
|
|
70
51
|
"$schema": "https://opencode.ai/config.json",
|
|
71
52
|
"plugin": ["opencode-puter-auth"],
|
|
72
53
|
"provider": {
|
|
73
|
-
"
|
|
54
|
+
"puter": {
|
|
55
|
+
"npm": "opencode-puter-auth",
|
|
56
|
+
"name": "Puter.com (500+ AI Models)",
|
|
74
57
|
"models": {
|
|
75
|
-
"
|
|
76
|
-
"name": "Claude Opus 4.5 (
|
|
58
|
+
"claude-opus-4-5": {
|
|
59
|
+
"name": "Claude Opus 4.5 (via Puter)",
|
|
77
60
|
"limit": { "context": 200000, "output": 64000 },
|
|
78
61
|
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
|
|
79
62
|
},
|
|
80
|
-
"
|
|
81
|
-
"name": "Claude Sonnet 4.5 (
|
|
63
|
+
"claude-sonnet-4-5": {
|
|
64
|
+
"name": "Claude Sonnet 4.5 (via Puter)",
|
|
82
65
|
"limit": { "context": 200000, "output": 64000 },
|
|
83
66
|
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
|
|
84
67
|
},
|
|
85
|
-
"
|
|
86
|
-
"name": "Claude Sonnet 4 (
|
|
68
|
+
"claude-sonnet-4": {
|
|
69
|
+
"name": "Claude Sonnet 4 (via Puter)",
|
|
87
70
|
"limit": { "context": 200000, "output": 64000 },
|
|
88
71
|
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
|
|
89
72
|
},
|
|
90
|
-
"
|
|
91
|
-
"name": "Claude Haiku 4.5 (
|
|
73
|
+
"claude-haiku-4-5": {
|
|
74
|
+
"name": "Claude Haiku 4.5 (via Puter - Fast)",
|
|
92
75
|
"limit": { "context": 200000, "output": 64000 },
|
|
93
76
|
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
|
|
94
77
|
},
|
|
95
|
-
"
|
|
96
|
-
"name": "GPT-5.2 (
|
|
78
|
+
"gpt-5.2": {
|
|
79
|
+
"name": "GPT-5.2 (via Puter)",
|
|
97
80
|
"limit": { "context": 128000, "output": 32768 },
|
|
98
81
|
"modalities": { "input": ["text", "image"], "output": ["text"] }
|
|
99
82
|
},
|
|
100
|
-
"
|
|
101
|
-
"name": "GPT-
|
|
83
|
+
"gpt-4.1-nano": {
|
|
84
|
+
"name": "GPT-4.1 Nano (via Puter - Ultra Fast)",
|
|
85
|
+
"limit": { "context": 128000, "output": 16384 },
|
|
86
|
+
"modalities": { "input": ["text", "image"], "output": ["text"] }
|
|
87
|
+
},
|
|
88
|
+
"gpt-4o": {
|
|
89
|
+
"name": "GPT-4o (via Puter)",
|
|
102
90
|
"limit": { "context": 128000, "output": 16384 },
|
|
103
91
|
"modalities": { "input": ["text", "image"], "output": ["text"] }
|
|
104
92
|
},
|
|
105
|
-
"
|
|
106
|
-
"name": "o3-mini (
|
|
93
|
+
"o3-mini": {
|
|
94
|
+
"name": "o3-mini (via Puter - Reasoning)",
|
|
107
95
|
"limit": { "context": 128000, "output": 32768 },
|
|
108
96
|
"modalities": { "input": ["text"], "output": ["text"] }
|
|
109
97
|
},
|
|
110
|
-
"
|
|
111
|
-
"name": "o4-mini (
|
|
98
|
+
"o4-mini": {
|
|
99
|
+
"name": "o4-mini (via Puter - Reasoning)",
|
|
112
100
|
"limit": { "context": 128000, "output": 32768 },
|
|
113
101
|
"modalities": { "input": ["text"], "output": ["text"] }
|
|
114
102
|
},
|
|
115
|
-
"
|
|
116
|
-
"name": "DeepSeek R1 (
|
|
103
|
+
"deepseek-r1": {
|
|
104
|
+
"name": "DeepSeek R1 (via Puter - Reasoning)",
|
|
117
105
|
"limit": { "context": 128000, "output": 32768 },
|
|
118
106
|
"modalities": { "input": ["text"], "output": ["text"] }
|
|
119
107
|
},
|
|
120
|
-
"
|
|
121
|
-
"name": "Gemini 2.5 Pro (
|
|
108
|
+
"google/gemini-2.5-pro": {
|
|
109
|
+
"name": "Gemini 2.5 Pro (via Puter - 1M Context)",
|
|
122
110
|
"limit": { "context": 1000000, "output": 65536 },
|
|
123
111
|
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
|
|
124
112
|
},
|
|
125
|
-
"
|
|
126
|
-
"name": "Gemini 2.5 Flash (
|
|
113
|
+
"google/gemini-2.5-flash": {
|
|
114
|
+
"name": "Gemini 2.5 Flash (via Puter)",
|
|
127
115
|
"limit": { "context": 1000000, "output": 65536 },
|
|
128
116
|
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
|
|
129
117
|
}
|
|
@@ -133,10 +121,19 @@ puter-auth
|
|
|
133
121
|
}
|
|
134
122
|
```
|
|
135
123
|
|
|
136
|
-
|
|
124
|
+
2. **Authenticate with Puter:**
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
opencode auth login
|
|
128
|
+
# Select "Puter" provider
|
|
129
|
+
# Select "Puter.com (500+ AI Models)"
|
|
130
|
+
# Complete OAuth in browser
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
3. **Use it:**
|
|
137
134
|
|
|
138
135
|
```bash
|
|
139
|
-
opencode
|
|
136
|
+
opencode --model=puter/claude-opus-4-5
|
|
140
137
|
```
|
|
141
138
|
|
|
142
139
|
## Available Models (January 2026)
|
|
@@ -145,33 +142,33 @@ opencode run "Hello" --model=google/puter-claude-opus-4-5
|
|
|
145
142
|
|
|
146
143
|
| Model | Description | Context | Best For |
|
|
147
144
|
|-------|-------------|---------|----------|
|
|
148
|
-
| `
|
|
149
|
-
| `
|
|
150
|
-
| `
|
|
151
|
-
| `
|
|
145
|
+
| `puter/claude-opus-4-5` | **Best coding model in the world** | 200K | Complex reasoning, agentic coding |
|
|
146
|
+
| `puter/claude-sonnet-4-5` | Balanced performance | 200K | General coding tasks |
|
|
147
|
+
| `puter/claude-sonnet-4` | Previous gen Sonnet | 200K | Fast coding |
|
|
148
|
+
| `puter/claude-haiku-4-5` | Fastest Claude | 200K | Simple tasks, quick responses |
|
|
152
149
|
|
|
153
150
|
### OpenAI (GPT) - Latest Models
|
|
154
151
|
|
|
155
152
|
| Model | Description | Context | Best For |
|
|
156
153
|
|-------|-------------|---------|----------|
|
|
157
|
-
| `
|
|
158
|
-
| `
|
|
159
|
-
| `
|
|
160
|
-
| `
|
|
161
|
-
| `
|
|
154
|
+
| `puter/gpt-5.2` | Latest GPT model | 128K | Advanced tasks |
|
|
155
|
+
| `puter/gpt-4.1-nano` | Ultra-fast | 128K | Quick responses |
|
|
156
|
+
| `puter/gpt-4o` | Multimodal GPT | 128K | Vision tasks |
|
|
157
|
+
| `puter/o3-mini` | Reasoning model | 128K | Complex logic |
|
|
158
|
+
| `puter/o4-mini` | Latest reasoning model | 128K | Advanced reasoning |
|
|
162
159
|
|
|
163
160
|
### Google (Gemini) - Massive Context
|
|
164
161
|
|
|
165
162
|
| Model | Description | Context | Best For |
|
|
166
163
|
|-------|-------------|---------|----------|
|
|
167
|
-
| `google/
|
|
168
|
-
| `google/
|
|
164
|
+
| `puter/google/gemini-2.5-pro` | Best Gemini | 1M | Huge codebases |
|
|
165
|
+
| `puter/google/gemini-2.5-flash` | Fast Gemini | 1M | Quick analysis |
|
|
169
166
|
|
|
170
167
|
### DeepSeek - Advanced Reasoning
|
|
171
168
|
|
|
172
169
|
| Model | Description | Context | Best For |
|
|
173
170
|
|-------|-------------|---------|----------|
|
|
174
|
-
| `
|
|
171
|
+
| `puter/deepseek-r1` | Advanced reasoning | 128K | Complex problem solving |
|
|
175
172
|
|
|
176
173
|
## AI SDK Provider (Standalone Usage)
|
|
177
174
|
|
|
@@ -232,28 +229,108 @@ The plugin adds these tools to OpenCode:
|
|
|
232
229
|
|
|
233
230
|
| Feature | Puter | Antigravity |
|
|
234
231
|
|---------|-------|-------------|
|
|
235
|
-
| **Cost** |
|
|
236
|
-
| **
|
|
237
|
-
| **Claude
|
|
238
|
-
| **
|
|
239
|
-
| **
|
|
240
|
-
| **
|
|
241
|
-
| **
|
|
242
|
-
| **
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
232
|
+
| **Cost Model** | Credit-based | Weekly quotas |
|
|
233
|
+
| **Claude Opus 4.5** | Yes (uses credits) | Limited weekly |
|
|
234
|
+
| **Claude Sonnet 4.5** | Yes (uses credits) | Limited weekly |
|
|
235
|
+
| **GPT-5** | Yes (uses credits) | No |
|
|
236
|
+
| **DeepSeek R1** | Yes (uses credits) | No |
|
|
237
|
+
| **Gemini 3** | No | Limited weekly |
|
|
238
|
+
| **Provider Type** | Standalone (`puter/`) | Google piggyback (`google/`) |
|
|
239
|
+
| **Initial Free Credits** | Yes (new accounts) | Weekly refresh |
|
|
240
|
+
|
|
241
|
+
**Bottom line**: Use **Puter** if you want access to Claude/GPT/DeepSeek (credit-based). Use **Antigravity** for Gemini 3 (weekly quota).
|
|
242
|
+
|
|
243
|
+
## Migrating from Old Config (v1.0.27 and earlier)
|
|
244
|
+
|
|
245
|
+
If you were using the old configuration format that piggybacked on Google (`google/puter-*` models), you need to update to the new standalone provider format.
|
|
246
|
+
|
|
247
|
+
### Old Format (Deprecated)
|
|
248
|
+
|
|
249
|
+
```json
|
|
250
|
+
{
|
|
251
|
+
"plugin": ["opencode-puter-auth"],
|
|
252
|
+
"provider": {
|
|
253
|
+
"google": {
|
|
254
|
+
"models": {
|
|
255
|
+
"puter-claude-opus-4-5": { ... }
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### New Format (v1.0.32+)
|
|
263
|
+
|
|
264
|
+
```json
|
|
265
|
+
{
|
|
266
|
+
"plugin": ["opencode-puter-auth"],
|
|
267
|
+
"provider": {
|
|
268
|
+
"puter": {
|
|
269
|
+
"npm": "opencode-puter-auth",
|
|
270
|
+
"name": "Puter.com (500+ AI Models)",
|
|
271
|
+
"models": {
|
|
272
|
+
"claude-opus-4-5": { ... }
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### Migration Steps
|
|
280
|
+
|
|
281
|
+
1. **Clear the plugin cache:**
|
|
282
|
+
```bash
|
|
283
|
+
rm -rf ~/.cache/opencode/node_modules/opencode-puter-auth
|
|
284
|
+
rm -rf ~/.config/opencode/node_modules/opencode-puter-auth
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
2. **Update your `opencode.json`:**
|
|
288
|
+
- Change `provider.google.models.puter-*` to `provider.puter.models.*`
|
|
289
|
+
- Add `"npm": "opencode-puter-auth"` to the puter provider section
|
|
290
|
+
- Remove the `puter-` prefix from model names
|
|
291
|
+
|
|
292
|
+
3. **Update your model references:**
|
|
293
|
+
- Old: `google/puter-claude-opus-4-5`
|
|
294
|
+
- New: `puter/claude-opus-4-5`
|
|
295
|
+
|
|
296
|
+
4. **Re-authenticate:**
|
|
297
|
+
```bash
|
|
298
|
+
opencode auth login
|
|
299
|
+
# Select "Puter" provider → "Puter.com (500+ AI Models)"
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
### Why the Change?
|
|
303
|
+
|
|
304
|
+
The new standalone provider offers:
|
|
305
|
+
- **Direct API access** - No routing through Google/Antigravity infrastructure
|
|
306
|
+
- **Proper OAuth visibility** - Puter now appears in `opencode auth login`
|
|
307
|
+
- **Better reliability** - Direct connection to Puter's API
|
|
308
|
+
- **Cleaner model names** - `puter/claude-opus-4-5` instead of `google/puter-claude-opus-4-5`
|
|
247
309
|
|
|
248
310
|
## Troubleshooting
|
|
249
311
|
|
|
250
|
-
### "
|
|
312
|
+
### "You have reached your AI usage limit"
|
|
313
|
+
|
|
314
|
+
This means your Puter account has exhausted its credits. Premium AI models (Claude, GPT, etc.) consume credits.
|
|
251
315
|
|
|
252
|
-
|
|
316
|
+
**Solutions:**
|
|
317
|
+
1. Add more credits on [Puter.com](https://puter.com)
|
|
318
|
+
2. Use a different free provider (Antigravity, OpenRouter free tier, Cerebras, Groq)
|
|
319
|
+
3. Create a new Puter account (new accounts get initial credits)
|
|
320
|
+
|
|
321
|
+
### Clear cached plugin and reinstall
|
|
253
322
|
|
|
254
323
|
```bash
|
|
255
|
-
#
|
|
256
|
-
puter-auth
|
|
324
|
+
# macOS/Linux
|
|
325
|
+
rm -rf ~/.cache/opencode/node_modules/opencode-puter-auth
|
|
326
|
+
rm -rf ~/.config/opencode/node_modules/opencode-puter-auth
|
|
327
|
+
|
|
328
|
+
# Windows (PowerShell)
|
|
329
|
+
Remove-Item -Recurse -Force "$env:LOCALAPPDATA\opencode\node_modules\opencode-puter-auth" -ErrorAction SilentlyContinue
|
|
330
|
+
Remove-Item -Recurse -Force "$env:APPDATA\opencode\node_modules\opencode-puter-auth" -ErrorAction SilentlyContinue
|
|
331
|
+
|
|
332
|
+
# Restart opencode
|
|
333
|
+
opencode
|
|
257
334
|
```
|
|
258
335
|
|
|
259
336
|
### Browser doesn't open for auth
|
|
@@ -266,8 +343,8 @@ http://localhost:19847
|
|
|
266
343
|
### "Not authenticated" error
|
|
267
344
|
|
|
268
345
|
```bash
|
|
269
|
-
|
|
270
|
-
|
|
346
|
+
opencode auth login
|
|
347
|
+
# Select "Puter" provider
|
|
271
348
|
```
|
|
272
349
|
|
|
273
350
|
### API timeout errors
|
package/dist/cli.js
CHANGED
|
File without changes
|
package/dist/plugin.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* OpenCode Plugin for Puter.com Authentication
|
|
3
3
|
*
|
|
4
|
-
* This plugin provides
|
|
5
|
-
*
|
|
4
|
+
* This plugin provides easy access to Claude, GPT, Gemini, and 500+ AI models
|
|
5
|
+
* through Puter.com's OAuth authentication. No API keys needed - just sign in.
|
|
6
|
+
*
|
|
7
|
+
* Note: Puter uses a credit-based system. New accounts get free credits,
|
|
8
|
+
* and premium models consume credits. This is NOT unlimited - credits run out.
|
|
6
9
|
*
|
|
7
10
|
* @author chindris-mihai-alexandru
|
|
8
11
|
* @license MIT
|
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAsB,MAAM,qBAAqB,CAAC;AAuDtE;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,MAuS7B,CAAC"}
|
package/dist/plugin.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* OpenCode Plugin for Puter.com Authentication
|
|
3
3
|
*
|
|
4
|
-
* This plugin provides
|
|
5
|
-
*
|
|
4
|
+
* This plugin provides easy access to Claude, GPT, Gemini, and 500+ AI models
|
|
5
|
+
* through Puter.com's OAuth authentication. No API keys needed - just sign in.
|
|
6
|
+
*
|
|
7
|
+
* Note: Puter uses a credit-based system. New accounts get free credits,
|
|
8
|
+
* and premium models consume credits. This is NOT unlimited - credits run out.
|
|
6
9
|
*
|
|
7
10
|
* @author chindris-mihai-alexandru
|
|
8
11
|
* @license MIT
|
|
@@ -14,7 +17,6 @@ import http from 'node:http';
|
|
|
14
17
|
import { URL } from 'node:url';
|
|
15
18
|
import { PuterClient } from './client.js';
|
|
16
19
|
import { createPuterAuthManager } from './auth.js';
|
|
17
|
-
import { createPuterFetch } from './provider.js';
|
|
18
20
|
import { PuterConfigSchema } from './types.js';
|
|
19
21
|
// Default config directory
|
|
20
22
|
const getConfigDir = () => {
|
|
@@ -73,32 +75,33 @@ export const PuterAuthPlugin = async (_input) => {
|
|
|
73
75
|
}
|
|
74
76
|
return {
|
|
75
77
|
// ========================================
|
|
76
|
-
// AUTH HOOK - OAuth with Puter
|
|
78
|
+
// AUTH HOOK - OAuth with Puter (Standalone Provider)
|
|
77
79
|
// ========================================
|
|
78
80
|
auth: {
|
|
79
|
-
// Use '
|
|
80
|
-
//
|
|
81
|
-
//
|
|
82
|
-
//
|
|
83
|
-
|
|
81
|
+
// Use 'puter' as a STANDALONE provider - NOT routing through Google!
|
|
82
|
+
// This provides direct access to Puter's API without
|
|
83
|
+
// being subject to Google/Antigravity rate limits.
|
|
84
|
+
//
|
|
85
|
+
// Users must configure opencode.json with:
|
|
86
|
+
// "provider": { "puter": { "npm": "opencode-puter-auth", ... } }
|
|
87
|
+
//
|
|
88
|
+
// Models are then accessed as puter/claude-opus-4-5, puter/gpt-4o, etc.
|
|
89
|
+
provider: 'puter',
|
|
84
90
|
// Load auth credentials for Puter provider
|
|
91
|
+
// Returns the API key (auth token) that OpenCode passes to the AI SDK provider
|
|
85
92
|
async loader(_auth, provider) {
|
|
86
93
|
const account = authManager?.getActiveAccount();
|
|
87
94
|
if (account) {
|
|
88
|
-
// Set
|
|
95
|
+
// Set cost to 0 for OpenCode's cost tracking (Puter handles billing separately)
|
|
89
96
|
if (provider?.models) {
|
|
90
|
-
for (const
|
|
91
|
-
|
|
92
|
-
if (modelId.startsWith('puter-')) {
|
|
93
|
-
model.cost = { input: 0, output: 0, cache: { read: 0, write: 0 } };
|
|
94
|
-
}
|
|
97
|
+
for (const model of Object.values(provider.models)) {
|
|
98
|
+
model.cost = { input: 0, output: 0, cache: { read: 0, write: 0 } };
|
|
95
99
|
}
|
|
96
100
|
}
|
|
97
|
-
// Return
|
|
98
|
-
//
|
|
101
|
+
// Return the auth token - OpenCode passes this to createPuter() as apiKey
|
|
102
|
+
// The AI SDK provider (createPuter) uses this to authenticate with Puter's API
|
|
99
103
|
return {
|
|
100
|
-
apiKey:
|
|
101
|
-
fetch: createPuterFetch(account.authToken, pluginConfig),
|
|
104
|
+
apiKey: account.authToken,
|
|
102
105
|
};
|
|
103
106
|
}
|
|
104
107
|
return {};
|
|
@@ -106,7 +109,7 @@ export const PuterAuthPlugin = async (_input) => {
|
|
|
106
109
|
methods: [
|
|
107
110
|
{
|
|
108
111
|
type: 'oauth',
|
|
109
|
-
label: 'Puter.com (
|
|
112
|
+
label: 'Puter.com (500+ AI Models, No API Keys)',
|
|
110
113
|
async authorize() {
|
|
111
114
|
return new Promise((resolve) => {
|
|
112
115
|
let resolved = false;
|
|
@@ -201,7 +204,7 @@ export const PuterAuthPlugin = async (_input) => {
|
|
|
201
204
|
});
|
|
202
205
|
resolve({
|
|
203
206
|
url: `http://localhost:${CALLBACK_PORT}`,
|
|
204
|
-
instructions: 'Opening browser for Puter.com authentication. Sign in or create
|
|
207
|
+
instructions: 'Opening browser for Puter.com authentication. Sign in or create an account to access 500+ AI models.',
|
|
205
208
|
method: 'auto',
|
|
206
209
|
callback: () => callbackPromise,
|
|
207
210
|
});
|
|
@@ -215,14 +218,14 @@ export const PuterAuthPlugin = async (_input) => {
|
|
|
215
218
|
// ========================================
|
|
216
219
|
tool: {
|
|
217
220
|
'puter-models': tool({
|
|
218
|
-
description: 'List all available Puter.com AI models (Claude, GPT, Gemini
|
|
221
|
+
description: 'List all available Puter.com AI models (Claude, GPT, Gemini, etc.)',
|
|
219
222
|
args: {},
|
|
220
223
|
async execute() {
|
|
221
224
|
if (!puterClient) {
|
|
222
225
|
return 'Not authenticated with Puter. Run: opencode auth login';
|
|
223
226
|
}
|
|
224
227
|
const models = await puterClient.listModels();
|
|
225
|
-
let output = '# Available Puter.com Models
|
|
228
|
+
let output = '# Available Puter.com Models\n\n';
|
|
226
229
|
// Group by provider
|
|
227
230
|
const byProvider = {};
|
|
228
231
|
for (const model of models) {
|
|
@@ -241,7 +244,7 @@ export const PuterAuthPlugin = async (_input) => {
|
|
|
241
244
|
}
|
|
242
245
|
output += '\n';
|
|
243
246
|
}
|
|
244
|
-
output += `\nTotal: ${models.length} models available
|
|
247
|
+
output += `\nTotal: ${models.length} models available via Puter.com`;
|
|
245
248
|
return output;
|
|
246
249
|
},
|
|
247
250
|
}),
|
|
@@ -272,12 +275,12 @@ export const PuterAuthPlugin = async (_input) => {
|
|
|
272
275
|
}
|
|
273
276
|
}
|
|
274
277
|
output += '\n---\n';
|
|
275
|
-
output += 'Puter uses
|
|
278
|
+
output += 'Puter uses a credit-based system. New accounts get free credits.\n';
|
|
276
279
|
return output;
|
|
277
280
|
},
|
|
278
281
|
}),
|
|
279
282
|
'puter-chat': tool({
|
|
280
|
-
description: 'Send a chat message using Puter AI
|
|
283
|
+
description: 'Send a chat message using Puter AI. Access Claude, GPT, Gemini via Puter.com.',
|
|
281
284
|
args: {
|
|
282
285
|
message: tool.schema.string().describe('The message to send to the AI'),
|
|
283
286
|
model: tool.schema.string().optional().describe('Model to use (default: claude-sonnet-4-5). Options: claude-opus-4-5, claude-sonnet-4-5, gpt-5.2, gpt-4o, gemini-2.5-pro, etc.'),
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAyB,MAAM,WAAW,CAAC;AAE1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,2BAA2B;AAC3B,MAAM,YAAY,GAAG,GAAW,EAAE;IAChC,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;IAC9C,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAC1C,CAAC;IACD,OA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CAAC,CAAC,eAAe,EAAE,CAAC;oBACrG,CAAC;gBACH,CAAC;aACF,CAAC;SACH;QAED,2CAA2C;QAC3C,gBAAgB;QAChB,2CAA2C;QAC3C,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE;YACnB,IAAI,YAAY,CAAC,KAAK,EAAE,CAAC;gBACvB,OAAO,CAAC,GAAG,CAAC,uBAAuB,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;YACnD,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-puter-auth",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Puter.com OAuth
|
|
3
|
+
"version": "1.0.34",
|
|
4
|
+
"description": "Puter.com OAuth plugin for OpenCode - Easy access to Claude, GPT, Gemini & 500+ AI models. No API keys needed, credit-based usage.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"puter-auth": "dist/cli.js"
|
|
7
7
|
},
|
|
@@ -44,14 +44,14 @@
|
|
|
44
44
|
"gpt",
|
|
45
45
|
"openai",
|
|
46
46
|
"gemini",
|
|
47
|
-
"free",
|
|
48
|
-
"unlimited",
|
|
49
47
|
"oauth",
|
|
50
48
|
"plugin",
|
|
51
49
|
"auth",
|
|
52
50
|
"ai",
|
|
53
51
|
"coding",
|
|
54
|
-
"llm"
|
|
52
|
+
"llm",
|
|
53
|
+
"no-api-key",
|
|
54
|
+
"easy-setup"
|
|
55
55
|
],
|
|
56
56
|
"engines": {
|
|
57
57
|
"node": ">=20.0.0"
|