opencode-metis 0.1.9 → 0.2.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/README.md +43 -1
- package/dist/cli.cjs +17 -17
- package/dist/mcp-server.cjs +7 -7
- package/dist/plugin.cjs +4 -4
- package/dist/worker.cjs +44 -44
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -82,12 +82,54 @@ The memory system has its own optional config file at `~/.config/opencode/memory
|
|
|
82
82
|
|
|
83
83
|
| Key | Type | Default | Description |
|
|
84
84
|
|-----|------|---------|-------------|
|
|
85
|
-
| `aiProvider` | string \| null | `null` | AI provider: `"gemini"`, `"openrouter"`, `"anthropic"
|
|
85
|
+
| `aiProvider` | string \| null | `null` | AI provider: `"gemini"`, `"openrouter"`, or `"anthropic"`. Set to `null` to disable AI compression. |
|
|
86
86
|
| `aiModel` | string \| null | `null` | Override the default model for the selected provider |
|
|
87
87
|
| `aiCompressionTimeoutMs` | number | `15000` | Timeout per AI compression call |
|
|
88
88
|
| `aiCompressionMaxRetries` | number | `3` | Max retries for failed compressions |
|
|
89
89
|
| `aiSkipTools` | string[] | `[]` | Tool names to skip during observation capture |
|
|
90
90
|
|
|
91
|
+
#### Enabling AI Compression
|
|
92
|
+
|
|
93
|
+
AI compression transforms raw tool outputs into structured, searchable knowledge. To enable it:
|
|
94
|
+
|
|
95
|
+
1. Set the corresponding API key environment variable:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# Pick one provider:
|
|
99
|
+
export GEMINI_API_KEY="your-key" # For Google Gemini
|
|
100
|
+
export OPENROUTER_API_KEY="your-key" # For OpenRouter
|
|
101
|
+
export ANTHROPIC_API_KEY="your-key" # For Anthropic Claude
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
2. Create or edit `~/.config/opencode/memory/settings.json`:
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"aiProvider": "gemini"
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Replace `"gemini"` with `"openrouter"` or `"anthropic"` based on your chosen provider.
|
|
113
|
+
|
|
114
|
+
3. (Optional) Override the default model:
|
|
115
|
+
|
|
116
|
+
```json
|
|
117
|
+
{
|
|
118
|
+
"aiProvider": "anthropic",
|
|
119
|
+
"aiModel": "claude-sonnet-4-20250514"
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
#### Default Models
|
|
124
|
+
|
|
125
|
+
| Provider | Default Model | Environment Variable |
|
|
126
|
+
|----------|---------------|---------------------|
|
|
127
|
+
| `gemini` | `gemini-2.0-flash` | `GEMINI_API_KEY` |
|
|
128
|
+
| `openrouter` | `anthropic/claude-haiku` | `OPENROUTER_API_KEY` |
|
|
129
|
+
| `anthropic` | `claude-haiku-4-5-20251001` | `ANTHROPIC_API_KEY` |
|
|
130
|
+
|
|
131
|
+
Without `aiProvider` set, observations are stored with basic string truncation instead of AI-powered structured extraction.
|
|
132
|
+
|
|
91
133
|
### Privacy
|
|
92
134
|
|
|
93
135
|
| Key | Type | Default | Description |
|