dsh-codex-share 0.4.2 → 0.4.3
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 +1 -1
- package/dist/index.mjs +17 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ The plugin intentionally does not refresh a stale token. When Codex writes a rep
|
|
|
32
32
|
|
|
33
33
|
When `GLM_API_KEY` is non-empty in the Harness launch environment, this plugin also adds **GLM Coding Plan (global)** to the model picker under the `glm-coding-global` provider route. It uses pi-ai's installed Z.AI model catalog and the global Coding Plan endpoint, `https://api.z.ai/api/coding/paas/v4` (not the China endpoint or the standard pay-as-you-go API).
|
|
34
34
|
|
|
35
|
-
Export your Coding Plan key before launching the Harness, or set it in a Harness launch `.env` file, and restart the profile. No manual model/provider configuration is needed. With no key, or an empty/whitespace-only key, the GLM route is omitted. `ZAI_API_KEY` does not enable this route. GLM requests use only `GLM_API_KEY` and do not require a Codex login; Codex requests continue to use the local Codex credential file. The key is not written to plugin settings. Available models follow the installed pi-ai catalog;
|
|
35
|
+
Export your Coding Plan key before launching the Harness, or set it in a Harness launch `.env` file, and restart the profile. No manual model/provider configuration is needed. With no key, or an empty/whitespace-only key, the GLM route is omitted. `ZAI_API_KEY` does not enable this route. GLM requests use only `GLM_API_KEY` and do not require a Codex login; Codex requests continue to use the local Codex credential file. The key is not written to plugin settings. Available models follow the installed pi-ai catalog, plus **GLM-5.3 Flash X** (`glm-5.3-flashx`) when upstream does not yet list it. Flash X inherits Flash's 1M context, 128K maximum output, image input, and reasoning capabilities; its cost estimate is left at zero until upstream supplies model-specific pricing (this does not imply free usage). [Z.AI's documentation](https://docs.z.ai/guides/vlm/glm-5.3-flash) currently says FlashX is not yet available on the Coding Plan; it is listed for forward compatibility, but requests may be rejected until your plan supports it.
|
|
36
36
|
|
|
37
37
|
## Development
|
|
38
38
|
|
package/dist/index.mjs
CHANGED
|
@@ -115,6 +115,22 @@ function apply(ctx, config = Config({})) {
|
|
|
115
115
|
};
|
|
116
116
|
const glmKey = launchEnvironmentOf(ctx).get("GLM_API_KEY")?.value;
|
|
117
117
|
const glmUpstream = glmKey?.trim() ? zaiProvider() : void 0;
|
|
118
|
+
const glmCatalog = glmUpstream ? [...glmUpstream.getModels()] : [];
|
|
119
|
+
if (glmUpstream && !glmCatalog.some((model) => model.id === "glm-5.3-flashx")) {
|
|
120
|
+
const flash = glmCatalog.find((model) => model.id === "glm-5.3-flash");
|
|
121
|
+
if (flash === void 0) throw new TypeError("The Z.AI catalog must include GLM-5.3-Flash");
|
|
122
|
+
glmCatalog.push({
|
|
123
|
+
...flash,
|
|
124
|
+
id: "glm-5.3-flashx",
|
|
125
|
+
name: "GLM-5.3 Flash X",
|
|
126
|
+
cost: {
|
|
127
|
+
input: 0,
|
|
128
|
+
output: 0,
|
|
129
|
+
cacheRead: 0,
|
|
130
|
+
cacheWrite: 0
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
}
|
|
118
134
|
const glmProfile = glmUpstream && {
|
|
119
135
|
...profileBase,
|
|
120
136
|
provider: "glm-coding-global",
|
|
@@ -124,7 +140,7 @@ function apply(ctx, config = Config({})) {
|
|
|
124
140
|
id: "glm-coding-global",
|
|
125
141
|
name: "GLM Coding Plan (global)",
|
|
126
142
|
auth: { apiKey: envApiKeyAuth("GLM Coding Plan API key", []) },
|
|
127
|
-
getModels: () =>
|
|
143
|
+
getModels: () => glmCatalog.map((model) => ({
|
|
128
144
|
...model,
|
|
129
145
|
provider: "glm-coding-global"
|
|
130
146
|
}))
|