@alisio/plugin-opencode-go 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 +50 -4
- package/dist/provider.js +3 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,6 +1,52 @@
|
|
|
1
1
|
# @alisio/plugin-opencode-go
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
**The built-in OpenCode Go model provider for [Alisio](https://github.com/GustavoGutierrez/alisio).**
|
|
4
|
+
Discover the unauthenticated OpenCode Go catalog and route each model to the protocol OpenCode Go
|
|
5
|
+
documents for it.
|
|
6
|
+
|
|
7
|
+
## What it is
|
|
8
|
+
|
|
9
|
+
A `model-provider` plugin that registers the `opencode-go` provider with the Alisio host. It ships
|
|
10
|
+
as a built-in of the `alisio` CLI and is enabled by default. Model references use the canonical
|
|
11
|
+
`opencode-go/<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 Go**.
|
|
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/go/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-go/<model-id>` entries.
|
|
31
|
+
- Fail-closed routing from the documented endpoint table: GPT, Grok and Muse through **Responses**;
|
|
32
|
+
open compatible families through **Chat Completions**; MiniMax and Qwen through
|
|
33
|
+
**Anthropic Messages**.
|
|
34
|
+
- Unknown catalog 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
|
@@ -265,7 +265,7 @@ export class OpenCodeGatewayProvider {
|
|
|
265
265
|
if (completed.some((call) => !call.id || !call.name))
|
|
266
266
|
throw new Error("Incomplete tool call");
|
|
267
267
|
if (finish === "length" && !text.trim())
|
|
268
|
-
throw new Error("OpenCode chat response cut off by max output tokens before any usable content; raise limits.maxOutputTokens");
|
|
268
|
+
throw new Error("OpenCode chat response cut off by max output tokens before any usable content; raise limits.maxOutputTokens (/settings → Agent max output tokens)");
|
|
269
269
|
yield {
|
|
270
270
|
type: "completed",
|
|
271
271
|
message: {
|
|
@@ -341,7 +341,7 @@ export class OpenCodeGatewayProvider {
|
|
|
341
341
|
.map((item) => item.text)
|
|
342
342
|
.join("");
|
|
343
343
|
if (!text.trim())
|
|
344
|
-
throw new Error("OpenCode Responses response cut off by max output tokens before any usable content; raise limits.maxOutputTokens");
|
|
344
|
+
throw new Error("OpenCode Responses response cut off by max output tokens before any usable content; raise limits.maxOutputTokens (/settings → Agent max output tokens)");
|
|
345
345
|
if (calls.some((call) => !call.id || !call.name))
|
|
346
346
|
throw new Error("Incomplete tool call");
|
|
347
347
|
const u = event.response.usage;
|
|
@@ -522,7 +522,7 @@ export class OpenCodeGatewayProvider {
|
|
|
522
522
|
}
|
|
523
523
|
if (truncated) {
|
|
524
524
|
if (!text.trim())
|
|
525
|
-
throw new Error("OpenCode Messages response cut off by max output tokens before any usable content; raise limits.maxOutputTokens");
|
|
525
|
+
throw new Error("OpenCode Messages response cut off by max output tokens before any usable content; raise limits.maxOutputTokens (/settings → Agent max output tokens)");
|
|
526
526
|
yield {
|
|
527
527
|
type: "completed",
|
|
528
528
|
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-go",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.8",
|
|
4
4
|
"description": "Built-in OpenCode Go 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",
|