zk-credits 0.2.4 → 0.2.5
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 +3 -3
- package/dist/codex-profile.js +1 -0
- package/dist/responses-bridge.js +15 -0
- package/dist/zk-credits.js +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ are founder-provisioned test credits, and the circuit is not independently
|
|
|
7
7
|
audited.
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm install --global zk-credits@0.2.
|
|
10
|
+
npm install --global zk-credits@0.2.5
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
## Pinned pilot versions
|
|
@@ -17,11 +17,11 @@ not mix versions between the sidecar, the adapter package, and the gateway:
|
|
|
17
17
|
|
|
18
18
|
| Package | Version |
|
|
19
19
|
| --- | --- |
|
|
20
|
-
| `zk-credits` (this sidecar) | `0.2.
|
|
20
|
+
| `zk-credits` (this sidecar) | `0.2.5` |
|
|
21
21
|
| `@zk-credits/x402-zk-prepaid` (adapter) | `0.1.0` |
|
|
22
22
|
| `@zk-credits/shared` | `0.1.0` |
|
|
23
23
|
|
|
24
|
-
The pinned Base Sepolia trial version is `0.2.
|
|
24
|
+
The pinned Base Sepolia trial version is `0.2.5`. It uses the non-streaming
|
|
25
25
|
`POST /v1/chat/completions` path below, includes the loopback Responses bridge
|
|
26
26
|
for Codex, and acquires the pinned private proving bundle through the local
|
|
27
27
|
GitHub CLI session. It also synchronizes V2 Base events and checks the gateway
|
package/dist/codex-profile.js
CHANGED
|
@@ -23,6 +23,7 @@ export function renderCodexProfile(options) {
|
|
|
23
23
|
const model = options.model?.trim() || DEFAULT_CODEX_MODEL;
|
|
24
24
|
return [
|
|
25
25
|
`model = ${tomlString(model)}`,
|
|
26
|
+
'model_reasoning_effort = "none"',
|
|
26
27
|
'model_provider = "zk_credits"',
|
|
27
28
|
'',
|
|
28
29
|
'[model_providers.zk_credits]',
|
package/dist/responses-bridge.js
CHANGED
|
@@ -91,6 +91,21 @@ function responseTools(value) {
|
|
|
91
91
|
tools.push({ type: 'function', function: definition });
|
|
92
92
|
continue;
|
|
93
93
|
}
|
|
94
|
+
// Codex sends its local freeform apply_patch tool with every Responses
|
|
95
|
+
// request. Chat Completions cannot execute that tool, so validate this
|
|
96
|
+
// known declaration and omit it from the provider request.
|
|
97
|
+
if (tool.type === 'custom') {
|
|
98
|
+
if (!hasOnlyKeys(tool, ['type', 'name', 'description', 'format'])
|
|
99
|
+
|| tool.name !== 'apply_patch'
|
|
100
|
+
|| (tool.description !== undefined && typeof tool.description !== 'string')
|
|
101
|
+
|| !isRecord(tool.format)
|
|
102
|
+
|| !hasOnlyKeys(tool.format, ['type', 'syntax', 'definition'])
|
|
103
|
+
|| tool.format.type !== 'grammar'
|
|
104
|
+
|| tool.format.syntax !== 'lark'
|
|
105
|
+
|| typeof tool.format.definition !== 'string')
|
|
106
|
+
return undefined;
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
94
109
|
// Codex includes these tool declarations in each Responses request. The
|
|
95
110
|
// fixed service class has no web-search executor and accepts only direct
|
|
96
111
|
// function tools, so validate their known shape and drop them.
|
package/dist/zk-credits.js
CHANGED
|
@@ -80687,6 +80687,7 @@ function renderCodexProfile(options) {
|
|
|
80687
80687
|
const model = options.model?.trim() || DEFAULT_CODEX_MODEL;
|
|
80688
80688
|
return [
|
|
80689
80689
|
`model = ${tomlString(model)}`,
|
|
80690
|
+
'model_reasoning_effort = "none"',
|
|
80690
80691
|
'model_provider = "zk_credits"',
|
|
80691
80692
|
"",
|
|
80692
80693
|
"[model_providers.zk_credits]",
|
|
@@ -82873,6 +82874,11 @@ function responseTools(value) {
|
|
|
82873
82874
|
tools.push({ type: "function", function: definition });
|
|
82874
82875
|
continue;
|
|
82875
82876
|
}
|
|
82877
|
+
if (tool.type === "custom") {
|
|
82878
|
+
if (!hasOnlyKeys(tool, ["type", "name", "description", "format"]) || tool.name !== "apply_patch" || tool.description !== void 0 && typeof tool.description !== "string" || !isRecord3(tool.format) || !hasOnlyKeys(tool.format, ["type", "syntax", "definition"]) || tool.format.type !== "grammar" || tool.format.syntax !== "lark" || typeof tool.format.definition !== "string")
|
|
82879
|
+
return void 0;
|
|
82880
|
+
continue;
|
|
82881
|
+
}
|
|
82876
82882
|
if (tool.type === "web_search") {
|
|
82877
82883
|
if (!hasOnlyKeys(tool, ["type", "external_web_access"]) || tool.external_web_access !== void 0 && typeof tool.external_web_access !== "boolean")
|
|
82878
82884
|
return void 0;
|
package/package.json
CHANGED