@link-assistant/agent 0.7.0 → 0.8.1

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/EXAMPLES.md DELETED
@@ -1,462 +0,0 @@
1
- # Usage Examples
2
-
3
- This document provides practical examples for using each tool with both `@link-assistant/agent` and `opencode` commands.
4
-
5
- > ⚠️ **Bun-only** - `@link-assistant/agent` requires [Bun](https://bun.sh) and does NOT support Node.js or Deno.
6
-
7
- ## Table of Contents
8
-
9
- - [Basic Usage](#basic-usage)
10
- - [File Operations](#file-operations)
11
- - [Search Tools](#search-tools)
12
- - [Execution Tools](#execution-tools)
13
- - [Utility Tools](#utility-tools)
14
-
15
- ## Basic Usage
16
-
17
- ### Simplest Examples - Start Here!
18
-
19
- **Plain text (@link-assistant/agent only, easiest!):**
20
-
21
- ```bash
22
- echo "hi" | agent
23
- ```
24
-
25
- **Simple JSON message (both @link-assistant/agent and opencode):**
26
-
27
- @link-assistant/agent:
28
-
29
- ```bash
30
- echo '{"message":"hi"}' | agent
31
- ```
32
-
33
- opencode:
34
-
35
- ```bash
36
- echo '{"message":"hi"}' | opencode run --format json --model opencode/grok-code
37
- ```
38
-
39
- ### Plain Text Input (@link-assistant/agent only)
40
-
41
- ```bash
42
- # Simple message
43
- echo "hello world" | agent
44
-
45
- # Ask a question
46
- echo "what is TypeScript?" | agent
47
-
48
- # Request web search
49
- echo "search the web for latest React news" | agent
50
- ```
51
-
52
- ### JSON Input Examples
53
-
54
- **@link-assistant/agent:**
55
-
56
- ```bash
57
- echo '{"message":"hello world"}' | agent
58
- ```
59
-
60
- **opencode:**
61
-
62
- ```bash
63
- echo '{"message":"hello world"}' | opencode run --format json --model opencode/grok-code
64
- ```
65
-
66
- ## File Operations
67
-
68
- ### bash Tool
69
-
70
- Execute shell commands.
71
-
72
- **@link-assistant/agent:**
73
-
74
- ```bash
75
- echo '{"message":"run command","tools":[{"name":"bash","params":{"command":"echo hello world"}}]}' | agent
76
- ```
77
-
78
- **opencode:**
79
-
80
- ```bash
81
- echo '{"message":"run command","tools":[{"name":"bash","params":{"command":"echo hello world"}}]}' | opencode run --format json --model opencode/grok-code
82
- ```
83
-
84
- **Example with description:**
85
-
86
- ```bash
87
- echo '{"message":"list files","tools":[{"name":"bash","params":{"command":"ls -la","description":"List all files in current directory"}}]}' | agent
88
- ```
89
-
90
- ### read Tool
91
-
92
- Read file contents.
93
-
94
- **@link-assistant/agent:**
95
-
96
- ```bash
97
- echo '{"message":"read file","tools":[{"name":"read","params":{"file_path":"/path/to/file.txt"}}]}' | agent
98
- ```
99
-
100
- **opencode:**
101
-
102
- ```bash
103
- echo '{"message":"read file","tools":[{"name":"read","params":{"file_path":"/path/to/file.txt"}}]}' | opencode run --format json --model opencode/grok-code
104
- ```
105
-
106
- ### write Tool
107
-
108
- Write content to a file.
109
-
110
- **@link-assistant/agent:**
111
-
112
- ```bash
113
- echo '{"message":"write file","tools":[{"name":"write","params":{"file_path":"/tmp/test.txt","content":"Hello World"}}]}' | agent
114
- ```
115
-
116
- **opencode:**
117
-
118
- ```bash
119
- echo '{"message":"write file","tools":[{"name":"write","params":{"file_path":"/tmp/test.txt","content":"Hello World"}}]}' | opencode run --format json --model opencode/grok-code
120
- ```
121
-
122
- ### edit Tool
123
-
124
- Edit file with string replacement.
125
-
126
- **@link-assistant/agent:**
127
-
128
- ```bash
129
- echo '{"message":"edit file","tools":[{"name":"edit","params":{"file_path":"/tmp/test.txt","old_string":"Hello","new_string":"Hi"}}]}' | agent
130
- ```
131
-
132
- **opencode:**
133
-
134
- ```bash
135
- echo '{"message":"edit file","tools":[{"name":"edit","params":{"file_path":"/tmp/test.txt","old_string":"Hello","new_string":"Hi"}}]}' | opencode run --format json --model opencode/grok-code
136
- ```
137
-
138
- ### list Tool
139
-
140
- List directory contents.
141
-
142
- **@link-assistant/agent:**
143
-
144
- ```bash
145
- echo '{"message":"list directory","tools":[{"name":"list","params":{"path":"."}}]}' | agent
146
- ```
147
-
148
- **opencode:**
149
-
150
- ```bash
151
- echo '{"message":"list directory","tools":[{"name":"list","params":{"path":"."}}]}' | opencode run --format json --model opencode/grok-code
152
- ```
153
-
154
- ## Search Tools
155
-
156
- ### glob Tool
157
-
158
- Find files using glob patterns.
159
-
160
- **@link-assistant/agent:**
161
-
162
- ```bash
163
- # Find all JavaScript files
164
- echo '{"message":"find js files","tools":[{"name":"glob","params":{"pattern":"**/*.js"}}]}' | agent
165
-
166
- # Find TypeScript files in src directory
167
- echo '{"message":"find ts files","tools":[{"name":"glob","params":{"pattern":"src/**/*.ts"}}]}' | agent
168
- ```
169
-
170
- **opencode:**
171
-
172
- ```bash
173
- echo '{"message":"find js files","tools":[{"name":"glob","params":{"pattern":"**/*.js"}}]}' | opencode run --format json --model opencode/grok-code
174
- ```
175
-
176
- ### grep Tool
177
-
178
- Search text in files with regex.
179
-
180
- **@link-assistant/agent:**
181
-
182
- ```bash
183
- # Search for pattern in files
184
- echo '{"message":"search pattern","tools":[{"name":"grep","params":{"pattern":"function","output_mode":"files_with_matches"}}]}' | agent
185
-
186
- # Search with content display
187
- echo '{"message":"search TODO","tools":[{"name":"grep","params":{"pattern":"TODO","output_mode":"content"}}]}' | agent
188
-
189
- # Case-insensitive search in JavaScript files
190
- echo '{"message":"search error","tools":[{"name":"grep","params":{"pattern":"error","-i":true,"type":"js","output_mode":"content"}}]}' | agent
191
- ```
192
-
193
- **opencode:**
194
-
195
- ```bash
196
- echo '{"message":"search pattern","tools":[{"name":"grep","params":{"pattern":"TODO","output_mode":"content"}}]}' | opencode run --format json --model opencode/grok-code
197
- ```
198
-
199
- ### websearch Tool
200
-
201
- Search the web using Exa API.
202
-
203
- **@link-assistant/agent (no environment variable needed!):**
204
-
205
- ```bash
206
- echo '{"message":"search web","tools":[{"name":"websearch","params":{"query":"TypeScript latest features"}}]}' | agent
207
-
208
- echo '{"message":"search web","tools":[{"name":"websearch","params":{"query":"React hooks best practices"}}]}' | agent
209
- ```
210
-
211
- **opencode (requires OPENCODE_EXPERIMENTAL_EXA=true):**
212
-
213
- ```bash
214
- echo '{"message":"search web","tools":[{"name":"websearch","params":{"query":"TypeScript latest features"}}]}' | opencode run --format json --model opencode/grok-code
215
- ```
216
-
217
- ### codesearch Tool
218
-
219
- Search code repositories and documentation.
220
-
221
- **@link-assistant/agent (no environment variable needed!):**
222
-
223
- ```bash
224
- echo '{"message":"search code","tools":[{"name":"codesearch","params":{"query":"React hooks implementation"}}]}' | agent
225
-
226
- echo '{"message":"search code","tools":[{"name":"codesearch","params":{"query":"async/await patterns"}}]}' | agent
227
- ```
228
-
229
- **opencode (requires OPENCODE_EXPERIMENTAL_EXA=true):**
230
-
231
- ```bash
232
- echo '{"message":"search code","tools":[{"name":"codesearch","params":{"query":"React hooks implementation"}}]}' | opencode run --format json --model opencode/grok-code
233
- ```
234
-
235
- ## Execution Tools
236
-
237
- ### batch Tool
238
-
239
- Batch multiple tool calls together for optimal performance.
240
-
241
- **@link-assistant/agent (no configuration needed!):**
242
-
243
- ```bash
244
- echo '{"message":"run batch","tools":[{"name":"batch","params":{"tool_calls":[{"tool":"bash","parameters":{"command":"echo hello"}},{"tool":"bash","parameters":{"command":"echo world"}}]}}]}' | agent
245
- ```
246
-
247
- **opencode (requires experimental config):**
248
-
249
- ```bash
250
- # Create config file first
251
- mkdir -p .link-assistant-agent
252
- echo '{"experimental":{"batch_tool":true}}' > .link-assistant-agent/opencode.json
253
-
254
- # Then run
255
- echo '{"message":"run batch","tools":[{"name":"batch","params":{"tool_calls":[{"tool":"bash","parameters":{"command":"echo hello"}},{"tool":"bash","parameters":{"command":"echo world"}}]}}]}' | opencode run --format json --model opencode/grok-code
256
- ```
257
-
258
- ### task Tool
259
-
260
- Launch specialized agents for complex tasks.
261
-
262
- **@link-assistant/agent:**
263
-
264
- ```bash
265
- echo '{"message":"launch task","tools":[{"name":"task","params":{"description":"Analyze codebase","prompt":"Find all TODO comments in JavaScript files","subagent_type":"general-purpose"}}]}' | agent
266
- ```
267
-
268
- **opencode:**
269
-
270
- ```bash
271
- echo '{"message":"launch task","tools":[{"name":"task","params":{"description":"Analyze codebase","prompt":"Find all TODO comments in JavaScript files","subagent_type":"general-purpose"}}]}' | opencode run --format json --model opencode/grok-code
272
- ```
273
-
274
- ## Utility Tools
275
-
276
- ### todo Tool
277
-
278
- Read and write TODO items for task tracking.
279
-
280
- **@link-assistant/agent:**
281
-
282
- ```bash
283
- # Write todos
284
- echo '{"message":"add todos","tools":[{"name":"todowrite","params":{"todos":[{"content":"Implement feature X","status":"pending","activeForm":"Implementing feature X"},{"content":"Write tests","status":"pending","activeForm":"Writing tests"}]}}]}' | agent
285
-
286
- # Read todos
287
- echo '{"message":"read todos","tools":[{"name":"todoread","params":{}}]}' | agent
288
- ```
289
-
290
- **opencode:**
291
-
292
- ```bash
293
- echo '{"message":"add todos","tools":[{"name":"todowrite","params":{"todos":[{"content":"Implement feature X","status":"pending","activeForm":"Implementing feature X"}]}}]}' | opencode run --format json --model opencode/grok-code
294
- ```
295
-
296
- ### webfetch Tool
297
-
298
- Fetch and process web content.
299
-
300
- **@link-assistant/agent:**
301
-
302
- ```bash
303
- echo '{"message":"fetch url","tools":[{"name":"webfetch","params":{"url":"https://example.com","prompt":"Summarize the content"}}]}' | agent
304
- ```
305
-
306
- **opencode:**
307
-
308
- ```bash
309
- echo '{"message":"fetch url","tools":[{"name":"webfetch","params":{"url":"https://example.com","prompt":"Summarize the content"}}]}' | opencode run --format json --model opencode/grok-code
310
- ```
311
-
312
- ## Output Format
313
-
314
- ### JSON Standards
315
-
316
- @link-assistant/agent supports two JSON output format standards via the `--json-standard` option:
317
-
318
- #### OpenCode Standard (default)
319
-
320
- ```bash
321
- # Default - same as --json-standard opencode
322
- echo "hi" | agent
323
-
324
- # Explicit opencode standard
325
- echo "hi" | agent --json-standard opencode
326
- ```
327
-
328
- #### Claude Standard (experimental)
329
-
330
- ```bash
331
- # Claude CLI compatible format (NDJSON)
332
- echo "hi" | agent --json-standard claude
333
- ```
334
-
335
- ### JSON Event Streaming (Pretty-Printed) - OpenCode Standard
336
-
337
- @link-assistant/agent outputs JSON events in pretty-printed streaming format for easy readability, 100% compatible with OpenCode's event structure:
338
-
339
- ```bash
340
- echo "hi" | agent
341
- ```
342
-
343
- Output (pretty-printed JSON events):
344
-
345
- ```json
346
- {
347
- "type": "step_start",
348
- "timestamp": 1763618628840,
349
- "sessionID": "ses_560236487ffe3ROK1ThWvPwTEF",
350
- "part": {
351
- "id": "prt_a9fdca4e8001APEs6AriJx67me",
352
- "type": "step-start",
353
- ...
354
- }
355
- }
356
- {
357
- "type": "text",
358
- "timestamp": 1763618629886,
359
- "sessionID": "ses_560236487ffe3ROK1ThWvPwTEF",
360
- "part": {
361
- "type": "text",
362
- "text": "Hi! How can I help with your coding tasks today?",
363
- ...
364
- }
365
- }
366
- {
367
- "type": "step_finish",
368
- "timestamp": 1763618629916,
369
- "sessionID": "ses_560236487ffe3ROK1ThWvPwTEF",
370
- "part": {
371
- "type": "step-finish",
372
- "reason": "stop",
373
- ...
374
- }
375
- }
376
- ```
377
-
378
- This format is designed for:
379
-
380
- - **Readability**: Pretty-printed JSON is easy to read and debug
381
- - **Streaming**: Events output in real-time as they occur
382
- - **Compatibility**: 100% compatible with OpenCode's event structure
383
- - **Automation**: Can be parsed using standard JSON tools (see filtering examples below)
384
-
385
- ### Claude Stream-JSON Output (NDJSON)
386
-
387
- When using `--json-standard claude`, output is in NDJSON (Newline-Delimited JSON) format, compatible with Claude CLI:
388
-
389
- ```bash
390
- echo "hi" | agent --json-standard claude
391
- ```
392
-
393
- Output (compact NDJSON):
394
-
395
- ```json
396
- {"type":"init","timestamp":"2025-01-01T00:00:00.000Z","session_id":"ses_560236487ffe3ROK1ThWvPwTEF"}
397
- {"type":"message","timestamp":"2025-01-01T00:00:01.000Z","session_id":"ses_560236487ffe3ROK1ThWvPwTEF","role":"assistant","content":[{"type":"text","text":"Hi! How can I help with your coding tasks today?"}]}
398
- {"type":"result","timestamp":"2025-01-01T00:00:01.100Z","session_id":"ses_560236487ffe3ROK1ThWvPwTEF","status":"success","duration_ms":1100}
399
- ```
400
-
401
- Key differences from OpenCode format:
402
-
403
- - **Compact**: One JSON per line (no pretty-printing)
404
- - **Event Types**: `init`, `message`, `tool_use`, `tool_result`, `result`
405
- - **Timestamps**: ISO 8601 strings instead of Unix milliseconds
406
- - **Session ID**: `session_id` (snake_case) instead of `sessionID` (camelCase)
407
- - **Content**: Message content in array format with `{type, text}` objects
408
-
409
- ### Filtering Output
410
-
411
- Extract specific event types using `jq`:
412
-
413
- ```bash
414
- # Get only text responses
415
- echo '{"message":"hello"}' | agent | jq -r 'select(.type=="text") | .part.text'
416
-
417
- # Get tool use events
418
- echo '{"message":"run","tools":[{"name":"bash","params":{"command":"ls"}}]}' | agent | jq 'select(.type=="tool_use")'
419
-
420
- # Get bash tool output
421
- echo '{"message":"run","tools":[{"name":"bash","params":{"command":"echo test"}}]}' | agent | jq -r 'select(.type=="tool_use" and .part.tool=="bash") | .part.state.output'
422
-
423
- # Pretty print all events
424
- echo "hello" | agent | jq
425
- ```
426
-
427
- ## Tips
428
-
429
- ### @link-assistant/agent Advantages
430
-
431
- 1. **No Configuration**: WebSearch, CodeSearch, and Batch tools work without any setup
432
- 2. **Plain Text Input**: Can use simple text instead of JSON
433
- 3. **Always Enabled**: All tools available by default
434
- 4. **Bun-only**: Optimized for Bun runtime (no Node.js/Deno overhead)
435
-
436
- ### Working with JSON
437
-
438
- Use single quotes for the outer shell command and double quotes inside JSON:
439
-
440
- ```bash
441
- echo '{"message":"test","tools":[{"name":"bash","params":{"command":"echo hello"}}]}' | agent
442
- ```
443
-
444
- ### Debugging
445
-
446
- Add `| jq` to prettify JSON output:
447
-
448
- ```bash
449
- echo "hello" | agent | jq
450
- ```
451
-
452
- ### Chaining Commands
453
-
454
- Process output with standard Unix tools:
455
-
456
- ```bash
457
- # Count events
458
- echo "hello" | agent | wc -l
459
-
460
- # Filter and format
461
- echo "hello" | agent | jq -r 'select(.type=="text") | .part.text'
462
- ```
package/LICENSE DELETED
@@ -1,24 +0,0 @@
1
- This is free and unencumbered software released into the public domain.
2
-
3
- Anyone is free to copy, modify, publish, use, compile, sell, or
4
- distribute this software, either in source code form or as a compiled
5
- binary, for any purpose, commercial or non-commercial, and by any
6
- means.
7
-
8
- In jurisdictions that recognize copyright laws, the author or authors
9
- of this software dedicate any and all copyright interest in the
10
- software to the public domain. We make this dedication for the benefit
11
- of the public at large and to the detriment of our heirs and
12
- successors. We intend this dedication to be an overt act of
13
- relinquishment in perpetuity of all present and future rights to this
14
- software under copyright law.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
- IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20
- OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
- ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
- OTHER DEALINGS IN THE SOFTWARE.
23
-
24
- For more information, please refer to <https://unlicense.org>
package/MODELS.md DELETED
@@ -1,143 +0,0 @@
1
- # Models
2
-
3
- This agent supports multiple model providers. By default, it uses models from the [OpenCode Zen](https://opencode.ai/docs/zen/) subscription service. Additionally, you can use models directly from providers like [Groq](https://groq.com/) by setting the appropriate API key.
4
-
5
- ## Supported Providers
6
-
7
- | Provider | Format | API Key Env Variable | Documentation |
8
- | ------------ | ------------------------- | ---------------------------- | -------------------------------------------------- |
9
- | OpenCode Zen | `opencode/<model-id>` | N/A (public for free models) | [OpenCode Zen](https://opencode.ai/docs/zen/) |
10
- | Anthropic | `anthropic/<model-id>` | `ANTHROPIC_API_KEY` | [Anthropic Docs](https://docs.anthropic.com/) |
11
- | Claude OAuth | `claude-oauth/<model-id>` | `CLAUDE_CODE_OAUTH_TOKEN` | [Claude OAuth Documentation](docs/claude-oauth.md) |
12
- | Groq | `groq/<model-id>` | `GROQ_API_KEY` | [Groq Documentation](docs/groq.md) |
13
-
14
- > **Claude OAuth:** The `claude-oauth` provider allows using your Claude Pro/Max subscription. Authenticate with `agent auth claude` or use existing Claude Code CLI credentials with `--use-existing-claude-oauth`.
15
-
16
- ## Available Models
17
-
18
- All models are accessed using the format `<provider>/<model-id>`. Use the `--model` option to specify which model to use:
19
-
20
- ```bash
21
- echo "hi" | agent --model opencode/grok-code
22
- ```
23
-
24
- ## OpenCode Zen Pricing
25
-
26
- Below are the prices per 1M tokens for OpenCode Zen models. Models are sorted by output price (lowest first) for best pricing visibility.
27
-
28
- | Model | Model ID | Input | Output | Cached Read | Cached Write |
29
- | ---------------------------------------- | --------------------------- | ------ | ------ | ----------- | ------------ |
30
- | **Free Models (Output: $0.00)** |
31
- | Grok Code Fast 1 | `opencode/grok-code` | Free | Free | Free | - |
32
- | GPT 5 Nano | `opencode/gpt-5-nano` | Free | Free | Free | - |
33
- | Big Pickle | `opencode/big-pickle` | Free | Free | Free | - |
34
- | **Paid Models (sorted by output price)** |
35
- | Qwen3 Coder 480B | `opencode/qwen3-coder-480b` | $0.45 | $1.50 | - | - |
36
- | GLM 4.6 | `opencode/glm-4-6` | $0.60 | $2.20 | $0.10 | - |
37
- | Kimi K2 | `opencode/kimi-k2` | $0.60 | $2.50 | $0.36 | - |
38
- | Claude Haiku 3.5 | `opencode/claude-haiku-3-5` | $0.80 | $4.00 | $0.08 | $1.00 |
39
- | Claude Haiku 4.5 | `opencode/haiku` | $1.00 | $5.00 | $0.10 | $1.25 |
40
- | GPT 5.1 | `opencode/gpt-5-1` | $1.25 | $10.00 | $0.125 | - |
41
- | GPT 5.1 Codex | `opencode/gpt-5-1-codex` | $1.25 | $10.00 | $0.125 | - |
42
- | GPT 5 | `opencode/gpt-5` | $1.25 | $10.00 | $0.125 | - |
43
- | GPT 5 Codex | `opencode/gpt-5-codex` | $1.25 | $10.00 | $0.125 | - |
44
- | Gemini 3 Pro (≤ 200K tokens) | `opencode/gemini-3-pro` | $2.00 | $12.00 | $0.20 | - |
45
- | Claude Sonnet 4.5 (≤ 200K tokens) | `opencode/sonnet` | $3.00 | $15.00 | $0.30 | $3.75 |
46
- | Claude Sonnet 4 (≤ 200K tokens) | `opencode/claude-sonnet-4` | $3.00 | $15.00 | $0.30 | $3.75 |
47
- | Gemini 3 Pro (> 200K tokens) | `opencode/gemini-3-pro` | $4.00 | $18.00 | $0.40 | - |
48
- | Claude Sonnet 4.5 (> 200K tokens) | `opencode/sonnet` | $6.00 | $22.50 | $0.60 | $7.50 |
49
- | Claude Sonnet 4 (> 200K tokens) | `opencode/claude-sonnet-4` | $6.00 | $22.50 | $0.60 | $7.50 |
50
- | Claude Opus 4.1 | `opencode/opus` | $15.00 | $75.00 | $1.50 | $18.75 |
51
-
52
- ## Default Model
53
-
54
- The default model is **Grok Code Fast 1** (`opencode/grok-code`), which is completely free. This model provides excellent performance for coding tasks with no cost.
55
-
56
- ## Usage Examples
57
-
58
- ### Using the Default Model (Free)
59
-
60
- ```bash
61
- # Uses opencode/grok-code by default
62
- echo "hello" | agent
63
- ```
64
-
65
- ### Using Other Free Models
66
-
67
- ```bash
68
- # Big Pickle (free)
69
- echo "hello" | agent --model opencode/big-pickle
70
-
71
- # GPT 5 Nano (free)
72
- echo "hello" | agent --model opencode/gpt-5-nano
73
- ```
74
-
75
- ### Using Paid Models
76
-
77
- ```bash
78
- # Claude Sonnet 4.5 (best quality)
79
- echo "hello" | agent --model opencode/sonnet
80
-
81
- # Claude Haiku 4.5 (fast and affordable)
82
- echo "hello" | agent --model opencode/haiku
83
-
84
- # Claude Opus 4.1 (most capable)
85
- echo "hello" | agent --model opencode/opus
86
-
87
- # Gemini 3 Pro
88
- echo "hello" | agent --model opencode/gemini-3-pro
89
-
90
- # GPT 5.1
91
- echo "hello" | agent --model opencode/gpt-5-1
92
-
93
- # Qwen3 Coder (specialized for coding)
94
- echo "hello" | agent --model opencode/qwen3-coder-480b
95
- ```
96
-
97
- ## More Information
98
-
99
- For complete details about OpenCode Zen subscription and pricing, visit the [OpenCode Zen Documentation](https://opencode.ai/docs/zen/).
100
-
101
- ## Notes
102
-
103
- - All prices are per 1 million tokens
104
- - Cache pricing applies when using prompt caching features
105
- - Token context limits vary by model
106
- - Free models have no token costs but may have rate limits
107
-
108
- ---
109
-
110
- ## Groq Provider
111
-
112
- [Groq](https://groq.com/) provides ultra-fast inference for open-source large language models. To use Groq models, set your API key:
113
-
114
- ```bash
115
- export GROQ_API_KEY=your_api_key_here
116
- ```
117
-
118
- ### Groq Models
119
-
120
- | Model | Model ID | Context Window | Tool Use |
121
- | ----------------------- | ------------------------------ | -------------- | -------- |
122
- | Llama 3.3 70B Versatile | `groq/llama-3.3-70b-versatile` | 131,072 tokens | Yes |
123
- | Llama 3.1 8B Instant | `groq/llama-3.1-8b-instant` | 131,072 tokens | Yes |
124
- | GPT-OSS 120B | `groq/openai/gpt-oss-120b` | 131,072 tokens | Yes |
125
- | GPT-OSS 20B | `groq/openai/gpt-oss-20b` | 131,072 tokens | Yes |
126
- | Qwen3 32B | `groq/qwen/qwen3-32b` | 131,072 tokens | Yes |
127
- | Compound | `groq/groq/compound` | 131,072 tokens | Yes |
128
- | Compound Mini | `groq/groq/compound-mini` | 131,072 tokens | Yes |
129
-
130
- ### Groq Usage Examples
131
-
132
- ```bash
133
- # Using Llama 3.3 70B (recommended)
134
- echo "hello" | agent --model groq/llama-3.3-70b-versatile
135
-
136
- # Using faster Llama 3.1 8B
137
- echo "hello" | agent --model groq/llama-3.1-8b-instant
138
-
139
- # Using Compound (agentic with server-side tools)
140
- echo "hello" | agent --model groq/groq/compound
141
- ```
142
-
143
- For more details, see the [Groq Documentation](docs/groq.md).