@lokeraar/pi-enclave-bridge 0.1.1 → 0.1.2

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.
Files changed (2) hide show
  1. package/README.md +62 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @lokeraar/pi-enclave-bridge
2
2
 
3
- [![Version: 0.1.1](https://img.shields.io/badge/version-0.1.1-blue.svg)](https://www.npmjs.com/package/@lokeraar/pi-enclave-bridge)
3
+ [![Version: 0.1.2](https://img.shields.io/badge/version-0.1.2-blue.svg)](https://www.npmjs.com/package/@lokeraar/pi-enclave-bridge)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
5
 
6
6
  EnClave provider for [Pi](https://pi.dev). The live router catalog shows up in
@@ -12,8 +12,31 @@ with no extra account required.
12
12
  <img width="220" src="https://raw.githubusercontent.com/Gentleman-Programming/gentle-ai/main/docs/assets/brand/built-with-gentle-ai.png" alt="Built with Gentle-AI" />
13
13
  </a>
14
14
 
15
+ ## 🔗 Where to find me
16
+
17
+ | | |
18
+ |---|---|
19
+ | 📦 **npm** | [`@lokeraar/pi-enclave-bridge`](https://www.npmjs.com/package/@lokeraar/pi-enclave-bridge) |
20
+ | 🌐 **Pi catalog** | [pi.dev/packages/@lokeraar/pi-enclave-bridge](https://pi.dev/packages/@lokeraar/pi-enclave-bridge) |
21
+ | ⭐ **Source** | [github.com/Lokeraar/pi-EnClave-bridge](https://github.com/Lokeraar/pi-EnClave-bridge) |
22
+
23
+ Install it in Pi:
24
+
25
+ ```bash
26
+ pi install npm:@lokeraar/pi-enclave-bridge
27
+ ```
28
+
29
+ > 💛 If this bridge ever saved you from guessing a model's limits, a ⭐ on the
30
+ > repo goes a long way — it is the only thing that helps somebody else find it.
31
+ > Every star is read by a human, and so is every bug report.
32
+
15
33
  ## 📋 Releases
16
34
 
35
+ ### 0.1.2 — documentation
36
+
37
+ Links in both directions, so the npm page and the source repo point at each
38
+ other, and a note asking for a star. No behaviour change.
39
+
17
40
  ### 0.1.1 — a clamp that left room for an actual prompt
18
41
 
19
42
  The ceiling clamp kept back 2,048 tokens for the prompt. That router counts
@@ -153,6 +176,44 @@ They are deliberately **never** resolved from a catalog. OpenRouter has a model
153
176
  called `auto` too, advertising a 2,000,000 window — a different thing that shares
154
177
  the name, and a lie here.
155
178
 
179
+ ## 🐞 Fixes
180
+
181
+ **A ceiling that the window cannot hold is impossible, not large.** OpenRouter
182
+ listed `inkling` at 471,859 against a 262,144 window here, and the endpoint
183
+ refused it with *"This request needs about N tokens (messages + tools +
184
+ max_tokens)"*. Clamped to the window minus a prompt reserve.
185
+
186
+ **The reserve has to survive a real conversation.** 2,048 tokens covered a toy
187
+ request. This router counts `messages + tools + max_tokens` against the window,
188
+ not the output alone, and a real Pi call carries the system prompt plus every
189
+ tool schema — order 20k tokens. `gpt-oss-120b` had 13,108 tokens of input room
190
+ and **every** call returned `400` as soon as the conversation carried anything.
191
+
192
+ **`maxTokens` must never be `null`.** Pi's model list calls `.toString()` on it
193
+ and crashes with *"Cannot read properties of undefined"*, taking the whole list
194
+ with it.
195
+
196
+ **`compat` is never inherited from a catalog.** OpenRouter ships
197
+ `thinkingFormat: "openrouter"` plus seven other flags describing how *it* wants
198
+ reasoning framed. This endpoint speaks the OpenAI shape — verified by sending
199
+ `reasoning_effort` and watching what came back. Copying those flags would change
200
+ the request format on an endpoint they were never tested against.
201
+
202
+ **An accepted value is not an implemented one.** The endpoint accepts all six
203
+ effort levels for `glm-5.3`; the vendor card says the model only implements
204
+ low, high and max. The extras are accepted and then ignored, which is worse than
205
+ not offering them: Pi would show a thinking level that silently does nothing.
206
+
207
+ **A catalog that omits a key has not claimed anything.** An explicit `null` is a
208
+ claim and is applied; an absent key is silence and does not erase a known value.
209
+ Thinking maps are merged key by key, so a one-key catalog entry cannot delete a
210
+ seven-key one.
211
+
212
+ **A scoped package publishes private by default.** `npm publish` failed with
213
+ `E402 "You must sign up for private packages"`, which reads like a billing
214
+ problem and is not one: restricted packages need a paid plan. Declared in the
215
+ manifest as `"publishConfig": { "access": "public" }`.
216
+
156
217
  ## 🔑 Authentication
157
218
 
158
219
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokeraar/pi-enclave-bridge",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "EnClave provider bridge for Pi: /login once and the live router catalog appears in /model with real context windows, real per-token prices, live membership and the router's task aliases \u2014 resolved from the model catalog Pi already ships.",
5
5
  "type": "module",
6
6
  "main": "./index.ts",