@mcowger/opencode-plexus 1.13.1 → 1.14.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 +39 -41
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,10 +4,10 @@ Exposes models from a self-hosted [Plexus](https://github.com/mcowger/plexus) AI
|
|
|
4
4
|
|
|
5
5
|
## Supported agents
|
|
6
6
|
|
|
7
|
-
| Package
|
|
8
|
-
|
|
9
|
-
| `plexus-pi`
|
|
10
|
-
| `plexus-oh-my-pi`
|
|
7
|
+
| Package | Agent | npm |
|
|
8
|
+
| -------------------- | ---------------------------------------------------- | -------------------------- |
|
|
9
|
+
| `plexus-pi` | [pi](https://github.com/earendil-works/pi) | `@mcowger/pi-plexus` |
|
|
10
|
+
| `plexus-oh-my-pi` | [Oh My Pi](https://github.com/can1357/oh-my-pi) | `@mcowger/oh-my-pi-plexus` |
|
|
11
11
|
| `plexus-opencode-v2` | [OpenCode](https://github.com/anomalyco/opencode) V2 | `@mcowger/opencode-plexus` |
|
|
12
12
|
|
|
13
13
|
## Prerequisites
|
|
@@ -47,9 +47,7 @@ Then register the path in `~/.pi/agent/settings.json`:
|
|
|
47
47
|
|
|
48
48
|
```json
|
|
49
49
|
{
|
|
50
|
-
|
|
51
|
-
"~/code/plexus-agent-plugins/packages/plexus-pi"
|
|
52
|
-
]
|
|
50
|
+
"extensions": ["~/code/plexus-agent-plugins/packages/plexus-pi"]
|
|
53
51
|
}
|
|
54
52
|
```
|
|
55
53
|
|
|
@@ -82,9 +80,7 @@ Then register the path in `~/.omp/agent/settings.json`:
|
|
|
82
80
|
|
|
83
81
|
```json
|
|
84
82
|
{
|
|
85
|
-
|
|
86
|
-
"~/code/plexus-agent-plugins/packages/plexus-oh-my-pi"
|
|
87
|
-
]
|
|
83
|
+
"extensions": ["~/code/plexus-agent-plugins/packages/plexus-oh-my-pi"]
|
|
88
84
|
}
|
|
89
85
|
```
|
|
90
86
|
|
|
@@ -94,8 +90,8 @@ Add the plugin to `~/.config/opencode/opencode.jsonc`, either from npm or from a
|
|
|
94
90
|
|
|
95
91
|
```jsonc
|
|
96
92
|
{
|
|
97
|
-
|
|
98
|
-
|
|
93
|
+
"plugins": ["@mcowger/opencode-plexus"],
|
|
94
|
+
// or: ["file:///home/you/code/plexus-agent-plugins/packages/plexus-opencode-v2"]
|
|
99
95
|
}
|
|
100
96
|
```
|
|
101
97
|
|
|
@@ -200,8 +196,8 @@ For Pi, edit `~/.pi/agent/extensions/plexus/config.json` (or `<agent-dir>/extens
|
|
|
200
196
|
|
|
201
197
|
```json
|
|
202
198
|
{
|
|
203
|
-
|
|
204
|
-
|
|
199
|
+
"baseUrl": "https://plexus.example.com",
|
|
200
|
+
"apiKeyEnv": "AIHOME_PI_API_KEY"
|
|
205
201
|
}
|
|
206
202
|
```
|
|
207
203
|
|
|
@@ -209,8 +205,8 @@ For OMP, edit `~/.omp/agent/extensions/plexus/config.json` (under the active pro
|
|
|
209
205
|
|
|
210
206
|
```json
|
|
211
207
|
{
|
|
212
|
-
|
|
213
|
-
|
|
208
|
+
"baseUrl": "https://plexus.example.com",
|
|
209
|
+
"apiKeyEnv": "AIHOME_OMP_API_KEY"
|
|
214
210
|
}
|
|
215
211
|
```
|
|
216
212
|
|
|
@@ -218,15 +214,15 @@ For OpenCode V2, put `apiKeyEnv` in the plugin's `options` in `~/.config/opencod
|
|
|
218
214
|
|
|
219
215
|
```jsonc
|
|
220
216
|
{
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
217
|
+
"plugins": [
|
|
218
|
+
{
|
|
219
|
+
"package": "@mcowger/opencode-plexus",
|
|
220
|
+
"options": {
|
|
221
|
+
"plexusBaseURL": "https://plexus.example.com",
|
|
222
|
+
"apiKeyEnv": "AIHOME_OPENCODE_API_KEY",
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
],
|
|
230
226
|
}
|
|
231
227
|
```
|
|
232
228
|
|
|
@@ -234,10 +230,10 @@ Set the named variable in the process environment that launches the client. Rest
|
|
|
234
230
|
|
|
235
231
|
Credential precedence:
|
|
236
232
|
|
|
237
|
-
| Client
|
|
238
|
-
|
|
239
|
-
| Pi
|
|
240
|
-
| OMP
|
|
233
|
+
| Client | `apiKeyEnv` omitted | `apiKeyEnv` explicitly set |
|
|
234
|
+
| ----------- | ------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
|
|
235
|
+
| Pi | Saved host credential, then `PLEXUS_API_KEY` fallback | Only the named environment variable, ahead of saved credentials |
|
|
236
|
+
| OMP | Registered `PLEXUS_API_KEY` env override, then host credentials | Only the named environment variable, ahead of saved credentials |
|
|
241
237
|
| OpenCode V2 | `PLEXUS_API_KEY`, then saved `/connect` credential, then plugin `apiKey` option | Only the named environment variable, ahead of both saved credentials and `apiKey` |
|
|
242
238
|
|
|
243
239
|
An explicit setting is authoritative even when it names `PLEXUS_API_KEY`. If the selected variable is missing, empty, or whitespace-only, the plugin reports an error naming the variable without showing its value. It does not fall back to a saved key, OpenCode's `apiKey` option, or the shared `PLEXUS_API_KEY`. Saved credentials remain stored; remove `apiKeyEnv` to restore the default precedence.
|
|
@@ -268,16 +264,18 @@ All plugin packages support suppressing models by name or pattern so undesired m
|
|
|
268
264
|
### Configuration methods
|
|
269
265
|
|
|
270
266
|
- **Environment variables**:
|
|
267
|
+
|
|
271
268
|
```sh
|
|
272
269
|
export PLEXUS_SUPPRESS_MODELS="gpt-3.5*, *deprecated*, whisper"
|
|
273
270
|
```
|
|
271
|
+
|
|
274
272
|
`PLEXUS_EXCLUDE_MODELS` is also accepted. Values can be comma-, semicolon-, or newline-separated.
|
|
275
273
|
|
|
276
274
|
- **pi / Oh My Pi config**: Add `suppressModels` (or `suppress`) to `config.json`:
|
|
277
275
|
```json
|
|
278
276
|
{
|
|
279
|
-
|
|
280
|
-
|
|
277
|
+
"baseUrl": "https://plexus.example.com",
|
|
278
|
+
"suppressModels": ["gpt-3.5*", "*deprecated*"]
|
|
281
279
|
}
|
|
282
280
|
```
|
|
283
281
|
|
|
@@ -324,16 +322,16 @@ packages/
|
|
|
324
322
|
|
|
325
323
|
The `/v1/models` endpoint returns an OpenRouter-style list. These fields drive host behavior:
|
|
326
324
|
|
|
327
|
-
| Field
|
|
328
|
-
|
|
329
|
-
| `preferred_api`
|
|
330
|
-
| `supported_parameters`
|
|
331
|
-
| `architecture.input_modalities` | Enables text/image/audio/video/pdf support where the host supports it.
|
|
332
|
-
| `pricing`
|
|
333
|
-
| `pricing.tiers`
|
|
334
|
-
| `top_provider`
|
|
335
|
-
| `pi_provider` / `pi_model`
|
|
336
|
-
| `pi_options`
|
|
325
|
+
| Field | Effect |
|
|
326
|
+
| ------------------------------- | -------------------------------------------------------------------------------------- |
|
|
327
|
+
| `preferred_api` | String or array. First recognized value selects the host API dialect. |
|
|
328
|
+
| `supported_parameters` | `reasoning`, `include_reasoning`, or `reasoning_effort` enables reasoning support. |
|
|
329
|
+
| `architecture.input_modalities` | Enables text/image/audio/video/pdf support where the host supports it. |
|
|
330
|
+
| `pricing` | Converted into host per-million-token cost metadata. Plexus returns per-token prices. |
|
|
331
|
+
| `pricing.tiers` | Alternate rates above `input_tokens_above`; mapped to native pi context pricing tiers. |
|
|
332
|
+
| `top_provider` | Supplies context and output token limits when present. |
|
|
333
|
+
| `pi_provider` / `pi_model` | Lets the pi adapter reuse built-in pi compat, headers, and thinking-level metadata. |
|
|
334
|
+
| `pi_options` | pi compat overrides. These win over heuristic and built-in metadata. |
|
|
337
335
|
|
|
338
336
|
Models with a falsy `id` are skipped. Missing metadata falls back to safe defaults.
|
|
339
337
|
|