@tbui17/omp-neuralwatt-provider 0.1.0 → 1.0.0

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/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # 1.0.0 (2026-07-05)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **ci:** add @semantic-release/git to devDependencies ([58c2108](https://github.com/tbui17/omp-neuralwatt-provider/commit/58c210855ee9321fc508c21db8302f47558e5224))
7
+ * **ci:** add semantic-release devDependencies and lockfile ([ccc946e](https://github.com/tbui17/omp-neuralwatt-provider/commit/ccc946ead626131e6d99511d4a39594678c5384a))
8
+ * **ci:** restore publish.yml workflow name with semantic-release ([f1a5224](https://github.com/tbui17/omp-neuralwatt-provider/commit/f1a52245fe989880f2090234c4774b955d5ee788))
9
+ * **ci:** restore setup-bun and use bunx for semantic-release ([11560d0](https://github.com/tbui17/omp-neuralwatt-provider/commit/11560d0cd763cf3030e7dcc393f43915be336421))
10
+
11
+ # Changelog
package/README.md CHANGED
@@ -2,46 +2,121 @@
2
2
 
3
3
  Neuralwatt OpenAI-compatible provider plugin for [oh-my-pi](https://github.com/can1357/oh-my-pi).
4
4
 
5
- Provides GLM, Kimi, and Qwen models hosted on the Neuralwatt API (`https://api.neuralwatt.com/v1`).
5
+ [![](https://img.shields.io/npm/v/@tbui17/omp-neuralwatt-provider.svg)](https://www.npmjs.com/package/@tbui17/omp-neuralwatt-provider)
6
6
 
7
- ## Install
7
+ ## About Neuralwatt
8
+
9
+ [Neuralwatt](https://www.neuralwatt.com) is an energy-optimized AI inference cloud. Its API is OpenAI-compatible and accessible at `https://api.neuralwatt.com/v1`, hosting frontier models from GLM (ZhipuAI), Kimi (MoonshotAI), and Qwen.
10
+
11
+ Neuralwatt's main differentiator is **energy-based pricing**: instead of per-token markups, you pay a flat **$5.00/kWh** for actual GPU compute consumed. One rate applies to every model, so efficient mixture-of-experts models (e.g. Kimi K2.6, Qwen3.5) cost up to 95% less than traditional per-token pricing. Per-token billing is also available if you prefer the familiar model. See the [pricing page](https://portal.neuralwatt.com/pricing) for details.
12
+
13
+ - **Company / technology:** [neuralwatt.com](https://www.neuralwatt.com) · [How optimization works](https://www.neuralwatt.com/technology)
14
+ - **Cloud portal:** [portal.neuralwatt.com](https://portal.neuralwatt.com) — dashboard, API keys, playground
15
+ - **Quickstart (raw API):** [portal.neuralwatt.com/docs/quickstart](https://portal.neuralwatt.com/docs/quickstart)
16
+
17
+ ## Quickstart
18
+
19
+ ### Prerequisites
20
+
21
+ - [Bun](https://bun.sh) `>= 1.3.0`
22
+ - [`omp`](https://github.com/can1357/oh-my-pi) installed and on your `PATH`
23
+ - A Neuralwatt account and API key (starts with `sk-`)
24
+
25
+ ### Get an API key
26
+
27
+ 1. Sign up at [portal.neuralwatt.com](https://portal.neuralwatt.com).
28
+ 2. Open **Dashboard → API Keys**.
29
+ 3. Create a new key and copy it.
30
+
31
+ Keep your key secret — never commit it to version control.
32
+
33
+ ### Install the provider
8
34
 
9
35
  ```
10
36
  omp install @tbui17/omp-neuralwatt-provider
11
37
  ```
12
38
 
13
- ## Set your API key
39
+ ### Set your API key
14
40
 
41
+ The plugin reads the key from the `NEURALWATT_API_KEY` environment variable.
42
+
43
+ ```sh
44
+ # Linux / macOS (current shell)
45
+ export NEURALWATT_API_KEY=sk-...
46
+
47
+ # Persist for future shells — add the line above to:
48
+ # ~/.bashrc (bash)
49
+ # ~/.zshrc (zsh)
15
50
  ```
16
- export NEURALWATT_API_KEY=your-key-here
51
+
52
+ ```powershell
53
+ # Windows PowerShell (current session)
54
+ $env:NEURALWATT_API_KEY = "sk-..."
55
+
56
+ # Persist across sessions
57
+ [Environment]::SetEnvironmentVariable("NEURALWATT_API_KEY", "sk-...", "User")
17
58
  ```
18
59
 
19
- The plugin reads the key from the `NEURALWATT_API_KEY` environment variable. Set it before starting `omp`.
60
+ ### Smoke test
61
+
62
+ omp -p --model neuralwatt/glm-5.2 "Say hello."
63
+ ```
64
+
65
+ If `omp` returns a response, the provider is wired up correctly.
20
66
 
21
67
  ## Models
22
68
 
23
- 16 models are registered under the `neuralwatt` provider:
24
-
25
- | Model ID | Family | Reasoning | Input |
26
- |---|---|---|---|
27
- | `glm-5.2` | GLM | yes | text |
28
- | `glm-5.2-fast` | GLM | no | text |
29
- | `glm-5.2-short` | GLM (200K ctx) | yes | text |
30
- | `glm-5.2-short-fast` | GLM (200K ctx) | no | text |
31
- | `kimi-k2.6` | Kimi | yes | text + image |
32
- | `kimi-k2.6-fast` | Kimi | no | text + image |
33
- | `qwen3.5-397b` | Qwen | yes | text |
34
- | `qwen3.5-397b-fast` | Qwen | no | text |
35
- | `qwen3.6-35b` | Qwen | yes | text + image |
36
- | `kimi-k2.7-code` | Kimi | yes | text + image |
37
- | `glm-5.2-short-fast-flex` | GLM flex | no | text |
38
- | `glm-5.2-short-flex` | GLM flex | yes | text |
39
- | `kimi-k2.6-flex` | Kimi flex | yes | text + image |
40
- | `kimi-k2.7-code-flex` | Kimi flex | yes | text + image |
41
- | `glm-5.2-flex` | GLM flex | yes | text |
42
- | `qwen3.6-35b-fast` | Qwen | no | text + image |
43
-
44
- Use with: `omp -p --model neuralwatt/glm-5.2 "your prompt"`
69
+ 16 canonical models are registered under the `neuralwatt` provider, spanning three families:
70
+
71
+ - **GLM-5.2** (ZhipuAI) long-context reasoning, up to 1M token context window
72
+ - **Kimi K2.6 / K2.7** (MoonshotAI) — reasoning and vision, 256K context
73
+ - **Qwen3.5 / Qwen3.6** (Qwen) reasoning and vision, up to 256K context
74
+
75
+ Naming conventions:
76
+
77
+ | Suffix | Meaning |
78
+ |---|---|
79
+ | `-fast` | Reasoning disabled lower latency, lower cost |
80
+ | `-short` | 200K context window (vs 1M on full GLM-5.2) |
81
+ | `-flex` | Flex variant power adjusts to grid demand |
82
+ | (none) | Standard variant, full reasoning |
83
+
84
+ Vision-capable models (accept `image` input in addition to text): `kimi-k2.6`, `kimi-k2.6-fast`, `kimi-k2.7-code`, `kimi-k2.6-flex`, `kimi-k2.7-code-flex`, `qwen3.6-35b`, `qwen3.6-35b-fast`.
85
+
86
+ For live per-model pricing, capabilities, and context windows, browse the catalog at [portal.neuralwatt.com/models](https://portal.neuralwatt.com/models). Energy-rate details live at [portal.neuralwatt.com/pricing](https://portal.neuralwatt.com/pricing).
87
+
88
+ ## Usage
89
+
90
+ All examples use the `omp` CLI. Reference models as `neuralwatt/<model-id>`.
91
+
92
+ ### Default reasoning
93
+
94
+ ```sh
95
+ omp -p --model neuralwatt/glm-5.2 "Explain quicksort."
96
+ ```
97
+
98
+ ### Fast (no reasoning, lower latency)
99
+
100
+ ```sh
101
+ omp -p --model neuralwatt/glm-5.2-fast "Summarize this thread."
102
+ ```
103
+
104
+ ### Long context (200K window)
105
+
106
+ ```sh
107
+ omp -p --model neuralwatt/glm-5.2-short "Analyze this document."
108
+ ```
109
+
110
+ ### Vision-capable
111
+
112
+ ```sh
113
+ # Kimi K2.6 accepts image input
114
+ omp -p --model neuralwatt/kimi-k2.6 "What's in this screenshot?"
115
+ ```
116
+
117
+ ### Reasoning effort
118
+
119
+ Reasoning models accept an effort level via `thinkingLevelMap`. Supported levels vary per model but generally include: `off`, `minimal`, `low`, `medium`, `high`, `xhigh`. Lower effort trades reasoning depth for speed and lower energy use. Refer to the model detail page on [portal.neuralwatt.com/models](https://portal.neuralwatt.com/models) for the levels each model honors.
45
120
 
46
121
  ## License
47
122
 
package/extension.ts CHANGED
@@ -449,36 +449,6 @@ const NEURALWATT_MODELS: ProviderModelConfig[] = [
449
449
  },
450
450
  ];
451
451
 
452
- // Legacy model ID aliases that map to canonical public models.
453
- const LEGACY_MODEL_ALIAS_MAP: Record<string, string> = {
454
- "glm-5.1": "glm-5.2",
455
- "glm-5.1-fast": "glm-5.2-fast",
456
- "zai-org/GLM-5.1-FP8": "glm-5.2",
457
- "moonshotai/Kimi-K2.5": "kimi-k2.6",
458
- "kimi-k2.5-fast": "kimi-k2.6-fast",
459
- "moonshotai/Kimi-K2.6": "kimi-k2.6",
460
- "Qwen/Qwen3.5-397B-A17B-FP8": "qwen3.5-397b",
461
- "Qwen/Qwen3.6-35B-A3B": "qwen3.6-35b",
462
- };
463
-
464
- function resolveLegacyModels(): ProviderModelConfig[] {
465
- return Object.entries(LEGACY_MODEL_ALIAS_MAP).map(
466
- ([legacyId, canonicalId]) => {
467
- const canonical = NEURALWATT_MODELS.find(
468
- (model) => model.id === canonicalId,
469
- );
470
- if (!canonical) {
471
- throw new Error(`Missing canonical model for legacy alias ${legacyId}`);
472
- }
473
- return {
474
- ...canonical,
475
- id: legacyId,
476
- name: `${canonical.name} (legacy ID)`,
477
- };
478
- },
479
- );
480
- }
481
-
482
452
  // ============================================================================
483
453
  // Extension entry point
484
454
  // ============================================================================
package/package.json CHANGED
@@ -1,20 +1,41 @@
1
1
  {
2
2
  "name": "@tbui17/omp-neuralwatt-provider",
3
- "version": "0.1.0",
3
+ "version": "1.0.0",
4
4
  "description": "Neuralwatt OpenAI-compatible provider for oh-my-pi",
5
5
  "type": "module",
6
- "main": "./extension.ts",
7
- "files": ["extension.ts", "README.md", "LICENSE", "test"],
6
+ "files": [
7
+ "extension.ts",
8
+ "README.md",
9
+ "LICENSE",
10
+ "CHANGELOG.md"
11
+ ],
8
12
  "scripts": {
9
13
  "test": "bun test"
10
14
  },
11
- "keywords": ["omp", "omp-extension", "omp-plugin", "neuralwatt", "ai", "llm"],
15
+ "devDependencies": {
16
+ "semantic-release": "^25.0.5",
17
+ "@semantic-release/changelog": "^6.0.3",
18
+ "@semantic-release/git": "^10.0.1"
19
+ },
20
+ "keywords": [
21
+ "omp",
22
+ "omp-extension",
23
+ "omp-plugin",
24
+ "neuralwatt",
25
+ "ai",
26
+ "llm"
27
+ ],
12
28
  "omp": {
13
- "extensions": ["./extension.ts"]
29
+ "extensions": [
30
+ "./extension.ts"
31
+ ]
14
32
  },
15
33
  "engines": {
16
34
  "bun": ">=1.3.0"
17
35
  },
36
+ "publishConfig": {
37
+ "access": "public"
38
+ },
18
39
  "license": "MIT",
19
40
  "repository": {
20
41
  "type": "git",
@@ -1,38 +0,0 @@
1
- import { describe, test, expect } from "bun:test";
2
-
3
- const NEURALWATT_API_KEY = process.env.NEURALWATT_API_KEY;
4
- const BASE_URL = "https://api.neuralwatt.com/v1";
5
-
6
- describe.skipIf(!NEURALWATT_API_KEY)("neuralwatt integration", () => {
7
- test("qwen3.6-35b-fast responds to a chat completion request", async () => {
8
- const res = await fetch(`${BASE_URL}/chat/completions`, {
9
- method: "POST",
10
- headers: {
11
- Authorization: `Bearer ${NEURALWATT_API_KEY}`,
12
- "Content-Type": "application/json",
13
- },
14
- body: JSON.stringify({
15
- model: "qwen3.6-35b-fast",
16
- messages: [{ role: "user", content: "reply with exactly: pong" }],
17
- max_tokens: 50,
18
- }),
19
- });
20
-
21
- expect(res.ok).toBe(true);
22
- expect(res.status).toBe(200);
23
-
24
- const data = await res.json();
25
- expect(data.object).toBe("chat.completion");
26
- expect(data.model).toBe("qwen3.6-35b-fast");
27
- expect(data.choices).toBeInstanceOf(Array);
28
- expect(data.choices.length).toBeGreaterThan(0);
29
-
30
- const message = data.choices[0]?.message;
31
- expect(message?.role).toBe("assistant");
32
- expect(message?.content).toBe("pong");
33
-
34
- expect(data.usage).toBeDefined();
35
- expect(typeof data.usage.prompt_tokens).toBe("number");
36
- expect(typeof data.usage.completion_tokens).toBe("number");
37
- });
38
- });