pi-coralbricks-provider 1.0.26 → 1.0.27

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
@@ -2,7 +2,7 @@
2
2
 
3
3
  # 🪸 pi-coralbricks-provider
4
4
 
5
- **GLM 5.3 & DeepSeek V4.1 Flash (FP4 variants included) through [Coral Bricks](https://www.coralbricks.ai)**
5
+ **GLM 5.3 & DeepSeek V4.1 Flash through [Coral Bricks](https://www.coralbricks.ai)**
6
6
 
7
7
  _A [pi](https://github.com/earendil-works/pi-coding-agent) provider extension for Coral's OpenAI-compatible inference gateway — up to **1M context** on open models._
8
8
 
@@ -22,8 +22,8 @@ Run `bun run test:pi` for offline manifest, catalog, lifecycle and streaming che
22
22
 
23
23
  ## Features
24
24
 
25
- - **4 reasoning models** from Coral's live catalog — GLM 5.3 and its FP4 variant, DeepSeek V4.1 Flash and its FP4 variant
26
- - **1M token context** on GLM and DeepSeek, with vision (image input) on DeepSeek V4.1 Flash and its FP4 variant
25
+ - **2 reasoning models** from Coral's live catalog — GLM 5.3 and DeepSeek V4.1 Flash (the `-fp4` twin slugs Coral still serves are hidden as duplicates)
26
+ - **1M token context** on GLM and DeepSeek, with vision (image input) on DeepSeek V4.1 Flash
27
27
  - **OpenAI-compatible API** — standard `/v1/chat/completions`, streaming, and tool calling
28
28
  - **Per-family thinking levels** — zai-style `thinking` control for GLM (including a *real* off switch), `reasoning_effort` for DeepSeek V4.1 Flash
29
29
  - **Accurate cost tracking** — input, cache-write and output rates mirror Coral's [published pricing](https://www.coralbricks.ai/pricing), and cached reads are **$0 on every model**
@@ -86,9 +86,7 @@ pi
86
86
  | Model | Context | Vision | Reasoning | Input $/M | Cache Read $/M | Cache Write $/M | Output $/M |
87
87
  |-------|---------|--------|-----------|-----------|-----------------|------------------|------------|
88
88
  | DeepSeek V4.1 Flash | 1.0M | ✅ | ✅ | $0.30 | — | $0.09 | $1.20 |
89
- | DeepSeek V4.1 Flash FP4 | 1.0M | ✅ | ✅ | $0.30 | — | $0.09 | $1.20 |
90
89
  | GLM 5.3 | 1.0M | ❌ | ✅ | $1.12 | — | $1.68 | $4.40 |
91
- | GLM 5.3 FP4 | 1.0M | ❌ | ✅ | $1.12 | — | $1.68 | $4.40 |
92
90
 
93
91
  *Costs are per million tokens. Cache Read shows — because Coral bills cached input at **$0** on every model. Prompt tokens Coral has not cached yet are billed once at the Cache Write rate, in place of the Input rate. Prices subject to change — check [Coral's live catalog](https://www.coralbricks.ai/api/public/models).*
94
92
 
@@ -188,7 +186,7 @@ Coral's gateway follows the OpenAI Chat Completions API:
188
186
 
189
187
  ### Patch Overrides & Custom Models
190
188
 
191
- - **`patch.json`** — per-model overrides applied on top of `models.json` (reasoning flags, pricing corrections, compat settings, thinking level maps). Currently one entry per live model: GLM 5.3 and its FP4 twin (reasoning, thinking level map, zai-style compat settings) and DeepSeek V4.1 Flash and its FP4 twin (reasoning, image input, thinking level map, `openai`-style compat settings).
189
+ - **`patch.json`** — per-model overrides applied on top of `models.json` (reasoning flags, pricing corrections, compat settings, thinking level maps, `"hidden"`). One entry per model Coral serves: GLM 5.3 and DeepSeek V4.1 Flash carry the reasoning and compat settings, and their `-fp4` twins set `"hidden": true` so `/model` and the table above list each model once.
192
190
  - **`custom-models.json`** — full model definitions for models Coral doesn't list. Merged after patch.
193
191
 
194
192
  Merge order: `[live|cache|embedded] → patch.json → custom-models.json`
package/index.ts CHANGED
@@ -73,10 +73,13 @@ interface JsonModel {
73
73
  supportsStrictMode?: boolean;
74
74
  requiresReasoningContentOnAssistantMessages?: boolean;
75
75
  };
76
+ /** Curation-only (patch.json): keep a served model out of the catalog. */
77
+ hidden?: boolean;
76
78
  }
77
79
 
78
80
  interface PatchEntry {
79
81
  name?: string;
82
+ hidden?: boolean;
80
83
  reasoning?: boolean;
81
84
  input?: ("text" | "image")[];
82
85
  cost?: {
@@ -106,6 +109,7 @@ function applyPatch(model: JsonModel, patch: PatchEntry): JsonModel {
106
109
  };
107
110
 
108
111
  if (patch.name !== undefined) result.name = patch.name;
112
+ if (patch.hidden !== undefined) result.hidden = patch.hidden;
109
113
  if (patch.reasoning !== undefined) result.reasoning = patch.reasoning;
110
114
  if (patch.input !== undefined) result.input = patch.input;
111
115
  if (patch.contextWindow !== undefined) result.contextWindow = patch.contextWindow;
@@ -166,7 +170,11 @@ function buildModels(base: JsonModel[], custom: JsonModel[], patch: PatchData):
166
170
  }
167
171
  }
168
172
 
169
- return Array.from(modelMap.values());
173
+ // Hidden models stay out of the registered catalog — and therefore out of
174
+ // `/model` — while `models.json` keeps mirroring what Coral serves for the key.
175
+ return Array.from(modelMap.values())
176
+ .filter((m) => !m.hidden)
177
+ .map(({ hidden: _hidden, ...model }) => model);
170
178
  }
171
179
 
172
180
  // Stale-While-Revalidate Model Sync
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-coralbricks-provider",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "description": "CoralBricks provider extension for pi - Access GLM 5.3 and DeepSeek V4.1 Flash (FP4 variants included) through the Coral Inference API",
5
5
  "author": "monotykamary",
6
6
  "homepage": "https://github.com/monotykamary/pi-coralbricks-provider#readme",
package/patch.json CHANGED
@@ -8,6 +8,7 @@
8
8
  },
9
9
  "deepseek-v4.1-flash-fast-fp4": {
10
10
  "name": "DeepSeek V4.1 Flash FP4",
11
+ "hidden": true,
11
12
  "reasoning": true,
12
13
  "input": ["text", "image"],
13
14
  "thinkingLevelMap": { "off": "none", "minimal": null, "low": "low", "medium": null, "high": "high", "xhigh": null, "max": "max" },
@@ -23,6 +24,7 @@
23
24
  },
24
25
  "glm-5.3-fp4": {
25
26
  "name": "GLM 5.3 FP4",
27
+ "hidden": true,
26
28
  "reasoning": true,
27
29
  "thinkingLevelMap": { "off": "none", "minimal": null, "low": "low", "medium": null, "high": "high", "xhigh": null, "max": "max" },
28
30
  "maxTokens": 131072,
@@ -347,6 +347,7 @@ function applyPatch(model, patch) {
347
347
  thinkingLevelMap: model.thinkingLevelMap ? { ...model.thinkingLevelMap } : undefined,
348
348
  };
349
349
  if (patch.name !== undefined) result.name = patch.name;
350
+ if (patch.hidden !== undefined) result.hidden = patch.hidden;
350
351
  if (patch.reasoning !== undefined) result.reasoning = patch.reasoning;
351
352
  if (patch.input !== undefined) result.input = patch.input;
352
353
  if (patch.contextWindow !== undefined) result.contextWindow = patch.contextWindow;
@@ -400,7 +401,11 @@ function buildModels(baseModels, customModels, patchData) {
400
401
  modelMap.set(model.id, model);
401
402
  }
402
403
  }
403
- return Array.from(modelMap.values());
404
+ // Mirrors index.ts buildModels: hidden models are served by Coral but kept out
405
+ // of the catalog the provider offers, so the README table skips them too.
406
+ return Array.from(modelMap.values())
407
+ .filter((m) => !m.hidden)
408
+ .map(({ hidden: _hidden, ...model }) => model);
404
409
  }
405
410
 
406
411
  // README generation