@alisio/plugin-openai-compatible 0.1.0-alpha.7 → 0.1.0-alpha.9

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 CHANGED
@@ -1,7 +1,57 @@
1
1
  # @alisio/plugin-openai-compatible
2
2
 
3
- Built-in OpenAI-compatible provider for Alisio. It supports Chat Completions and Responses APIs,
4
- model discovery, tool calls, usage metadata, reasoning deltas, and image attachments.
3
+ **The built-in OpenAI-compatible model provider for [Alisio](https://github.com/GustavoGutierrez/alisio).**
4
+ Point it at any Chat Completions or Responses endpoint — OpenAI, a gateway, or a local server such
5
+ as llama.cpp — and use it from `/connect`.
5
6
 
6
- Configuration and credentials are supplied by the Alisio provider registry; the plugin does not
7
- persist secrets itself.
7
+ ## What it is
8
+
9
+ A `model-provider` plugin that registers the `openai-compatible` provider with the Alisio host. It
10
+ ships as a built-in of the `alisio` CLI and is enabled by default. Configuration and credentials
11
+ are supplied by the Alisio provider registry; the plugin does not persist secrets itself.
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 **OpenAI compatible**.
21
+ 2. Fields: **Base URL** (default `https://api.openai.com/v1`), **API key** (secret, optional),
22
+ **API key environment variable** (default `OPENAI_API_KEY`), **API mode** (`chat` or
23
+ `responses`), **Authentication** (`bearer` or `none`), **Token parameter** (`max_tokens`,
24
+ `max_completion_tokens` or `omit`), **Stream usage** (boolean).
25
+ 3. Pick a model from the discovered catalog — or enter one manually when the endpoint exposes no
26
+ `GET /models` catalog (`/connect` then asks for an optional context window in tokens).
27
+
28
+ The key is read from the stored credential first, then from `process.env[apiKeyEnv]`:
29
+
30
+ ```sh
31
+ export OPENAI_API_KEY=... # never put the key in config files, profiles or READMEs
32
+ ```
33
+
34
+ ## Features
35
+
36
+ - Model discovery via `GET /models`; per-model context windows (overridable per profile).
37
+ - Chat Completions and Responses modes; bearer or no authentication; configurable token parameter.
38
+ - Tool calls, usage metadata, reasoning deltas and image attachments.
39
+ - Provider-native web search available when the API mode is `responses`.
40
+ - Legacy `provider` configuration (`baseURL`, `apiKeyEnv`, `model`, `apiMode`, `auth`,
41
+ `tokenParameter`, `streamUsage`) keeps working for startup and headless runs.
42
+
43
+ While registered, the provider also appears in `/model` and `alisio doctor`.
44
+
45
+ ## Docs
46
+
47
+ [Configuration](https://gustavogutierrez.github.io/alisio/configuration) ·
48
+ [Plugins](https://gustavogutierrez.github.io/alisio/plugins).
49
+
50
+ ## Requirements
51
+
52
+ Node.js **>= 22.16** or Bun **>= 1.4.2**.
53
+
54
+ ## License
55
+
56
+ MIT. Maintained by Gustavo Gutiérrez Mercado. Source: <https://github.com/GustavoGutierrez/alisio> ·
57
+ npm: <https://www.npmjs.com/settings/alisio/packages>.
package/dist/provider.js CHANGED
@@ -138,7 +138,7 @@ export class OpenAICompatibleProvider {
138
138
  if (completed.some((c) => !c.id || !c.name))
139
139
  throw new Error("Incomplete tool call");
140
140
  if (finish === "length" && !text.trim())
141
- throw new Error("Provider response cut off by max output tokens before any usable content; raise limits.maxOutputTokens");
141
+ throw new Error("Provider response cut off by max output tokens before any usable content; raise limits.maxOutputTokens (/settings → Agent max output tokens)");
142
142
  yield {
143
143
  type: "completed",
144
144
  message: {
@@ -216,7 +216,7 @@ export class OpenAICompatibleProvider {
216
216
  .map((x) => x.text)
217
217
  .join("");
218
218
  if (!text.trim())
219
- throw new Error("Provider response cut off by max output tokens before any usable content; raise limits.maxOutputTokens");
219
+ throw new Error("Provider response cut off by max output tokens before any usable content; raise limits.maxOutputTokens (/settings → Agent max output tokens)");
220
220
  if (calls.some((c) => !c.id || !c.name))
221
221
  throw new Error("Incomplete tool call");
222
222
  yield {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alisio/plugin-openai-compatible",
3
- "version": "0.1.0-alpha.7",
3
+ "version": "0.1.0-alpha.9",
4
4
  "description": "Built-in OpenAI-compatible model provider for Alisio.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -24,10 +24,10 @@
24
24
  "openai": "7.23.0"
25
25
  },
26
26
  "peerDependencies": {
27
- "@alisio/sdk": "^0.1.0-alpha.5"
27
+ "@alisio/sdk": "^0.1.0-alpha.7"
28
28
  },
29
29
  "devDependencies": {
30
- "@alisio/sdk": "0.1.0-alpha.5"
30
+ "@alisio/sdk": "0.1.0-alpha.7"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public",