@alisio/plugin-opencode 0.1.0-alpha.6 → 0.1.0-alpha.8
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 +49 -2
- package/dist/provider.js +3 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,5 +1,52 @@
|
|
|
1
1
|
# @alisio/plugin-opencode
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**The built-in OpenCode Console (Zen) model provider for [Alisio](https://github.com/GustavoGutierrez/alisio).**
|
|
4
|
+
Discover the unauthenticated OpenCode model catalog and route each model to the protocol OpenCode
|
|
5
|
+
documents for it.
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
## What it is
|
|
8
|
+
|
|
9
|
+
A `model-provider` plugin that registers the `opencode` provider with the Alisio host. It ships as a
|
|
10
|
+
built-in of the `alisio` CLI and is enabled by default. Model references use the canonical
|
|
11
|
+
`opencode/<model-id>` form.
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
Preinstalled in the `alisio` CLI. For an embedded host, register it through `createApplication`'s
|
|
16
|
+
`builtins` list.
|
|
17
|
+
|
|
18
|
+
## Using it: `/connect`
|
|
19
|
+
|
|
20
|
+
1. Run `alisio`, then `/connect` and choose **OpenCode Console (Zen)**.
|
|
21
|
+
2. Enter the **API key** (secret, required). It is stored only in the global credentials store
|
|
22
|
+
(`credentials.json`, mode 0600) — never in the profile or configuration.
|
|
23
|
+
3. Pick a model from the discovered catalog (`https://opencode.ai/zen/v1/models`).
|
|
24
|
+
|
|
25
|
+
There is no hard-coded default API-key environment variable for this provider: the key is entered
|
|
26
|
+
in `/connect` and kept out of configuration files.
|
|
27
|
+
|
|
28
|
+
## Features
|
|
29
|
+
|
|
30
|
+
- Unauthenticated catalog discovery of `opencode/<model-id>` entries.
|
|
31
|
+
- Fail-closed routing from the documented protocol map: GPT, Grok and Muse through **Responses**;
|
|
32
|
+
DeepSeek, GLM, Kimi, MiMo, MiniMax and documented compatible models through **Chat Completions**;
|
|
33
|
+
Claude and documented Qwen models through **Anthropic Messages**.
|
|
34
|
+
- Gemini-native and System One entries are hidden rather than guessed.
|
|
35
|
+
- Requests send `user-agent: alisio/<version>` and an opaque, stable `x-opencode-session`
|
|
36
|
+
conversation ID that never includes a workspace path, prompt or credential.
|
|
37
|
+
|
|
38
|
+
While registered, the provider also appears in `/model` and `alisio doctor`.
|
|
39
|
+
|
|
40
|
+
## Docs
|
|
41
|
+
|
|
42
|
+
[Configuration](https://gustavogutierrez.github.io/alisio/configuration) ·
|
|
43
|
+
[Plugins](https://gustavogutierrez.github.io/alisio/plugins).
|
|
44
|
+
|
|
45
|
+
## Requirements
|
|
46
|
+
|
|
47
|
+
Node.js **>= 22.16** or Bun **>= 1.4.2**.
|
|
48
|
+
|
|
49
|
+
## License
|
|
50
|
+
|
|
51
|
+
MIT. Maintained by Gustavo Gutiérrez Mercado. Source: <https://github.com/GustavoGutierrez/alisio> ·
|
|
52
|
+
npm: <https://www.npmjs.com/settings/alisio/packages>.
|
package/dist/provider.js
CHANGED
|
@@ -350,7 +350,7 @@ export class OpenCodeGatewayProvider {
|
|
|
350
350
|
if (completed.some((call) => !call.id || !call.name))
|
|
351
351
|
throw new Error("Incomplete tool call");
|
|
352
352
|
if (finish === "length" && !text.trim())
|
|
353
|
-
throw new Error("OpenCode chat response cut off by max output tokens before any usable content; raise limits.maxOutputTokens");
|
|
353
|
+
throw new Error("OpenCode chat response cut off by max output tokens before any usable content; raise limits.maxOutputTokens (/settings → Agent max output tokens)");
|
|
354
354
|
yield {
|
|
355
355
|
type: "completed",
|
|
356
356
|
message: {
|
|
@@ -426,7 +426,7 @@ export class OpenCodeGatewayProvider {
|
|
|
426
426
|
.map((item) => item.text)
|
|
427
427
|
.join("");
|
|
428
428
|
if (!text.trim())
|
|
429
|
-
throw new Error("OpenCode Responses response cut off by max output tokens before any usable content; raise limits.maxOutputTokens");
|
|
429
|
+
throw new Error("OpenCode Responses response cut off by max output tokens before any usable content; raise limits.maxOutputTokens (/settings → Agent max output tokens)");
|
|
430
430
|
if (calls.some((call) => !call.id || !call.name))
|
|
431
431
|
throw new Error("Incomplete tool call");
|
|
432
432
|
const u = event.response.usage;
|
|
@@ -607,7 +607,7 @@ export class OpenCodeGatewayProvider {
|
|
|
607
607
|
}
|
|
608
608
|
if (truncated) {
|
|
609
609
|
if (!text.trim())
|
|
610
|
-
throw new Error("OpenCode Messages response cut off by max output tokens before any usable content; raise limits.maxOutputTokens");
|
|
610
|
+
throw new Error("OpenCode Messages response cut off by max output tokens before any usable content; raise limits.maxOutputTokens (/settings → Agent max output tokens)");
|
|
611
611
|
yield {
|
|
612
612
|
type: "completed",
|
|
613
613
|
message: { role: "assistant", text, calls, providerData: blocks, truncated: true },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alisio/plugin-opencode",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.8",
|
|
4
4
|
"description": "Built-in OpenCode Console (Zen) model provider for Alisio.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"node": ">=22.16"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@alisio/sdk": "^0.1.0-alpha.
|
|
24
|
+
"@alisio/sdk": "^0.1.0-alpha.7"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@alisio/sdk": "0.1.0-alpha.
|
|
27
|
+
"@alisio/sdk": "0.1.0-alpha.7"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public",
|