okstra 0.201.0 → 0.201.1
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/docs/cli.md
CHANGED
|
@@ -799,7 +799,16 @@ Each GLM child process uses `https://api.z.ai/api/anthropic` and its own model/a
|
|
|
799
799
|
|
|
800
800
|
The runtime rejects a missing `ZAI_API_KEY` before starting the worker. Catalog visibility does not verify the account's model entitlement or remaining quota. The installed Claude Code version and Z.ai account must support the selected model. See [Z.ai's Claude Code setup](https://docs.z.ai/devpack/tool/claude) and [Coding Plan usage policy](https://docs.z.ai/devpack/usage-policy) for provider requirements.
|
|
801
801
|
|
|
802
|
-
GLM response model identities are recorded as `zai/<model>`; a startup model label alone is not treated as proof of the served model. The final Claude Code usage event supplies input, output, cache-creation, and cache-read counters. Repeated dispatches are summed by their status files.
|
|
802
|
+
GLM response model identities are recorded as `zai/<model>`; a startup model label alone is not treated as proof of the served model. The final Claude Code usage event supplies input, output, cache-creation, and cache-read counters. Repeated dispatches are summed by their status files. Costs use Z.ai's public API token prices regardless of whether the account uses a subscription or metered API billing. Missing usage or an unknown model price stays unavailable.
|
|
803
|
+
|
|
804
|
+
The [official API prices](https://docs.z.ai/guides/overview/pricing), checked on 2026-09-14, are USD per million tokens:
|
|
805
|
+
|
|
806
|
+
| Model | Input | Cached input | Output |
|
|
807
|
+
|---|---:|---:|---:|
|
|
808
|
+
| `glm-5.3` | $1.40 | $0.26 | $4.40 |
|
|
809
|
+
| `glm-5.3-flash` | $0.15 | $0.03 | $0.50 |
|
|
810
|
+
|
|
811
|
+
Cache-creation tokens use the input rate; cache-read tokens use the cached-input rate. Z.ai currently lists cached-input storage as free for a limited time. The reported cost is the API-equivalent token cost, not the subscription invoice. Regression coverage is in `tests/adapters/accounting/test_cli_provider_transcripts.py` and `tests/adapters/providers/test_provider_registry.py`.
|
|
803
812
|
|
|
804
813
|
## `okstra` Node CLI — introspection subcommands
|
|
805
814
|
|
package/package.json
CHANGED
package/runtime/BUILD.json
CHANGED
|
@@ -15,10 +15,12 @@ from okstra_ctl.domain.worker_presentation import JsonEvents
|
|
|
15
15
|
from okstra_ctl.domain.worker_stream import content_block_events
|
|
16
16
|
|
|
17
17
|
ZAI_MODELS = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
# 입력·캐시 입력·출력 USD/100만 토큰, 2026-09-14 공식 단가 확인.
|
|
19
|
+
# https://docs.z.ai/guides/overview/pricing
|
|
20
|
+
name: ModelSpec(name, label, name, pricing=pricing)
|
|
21
|
+
for name, label, pricing in (
|
|
22
|
+
("glm-5.3", "GLM-5.3", (1.40, 0.26, 4.40)),
|
|
23
|
+
("glm-5.3-flash", "GLM-5.3 Flash", (0.15, 0.03, 0.50)),
|
|
22
24
|
)
|
|
23
25
|
}
|
|
24
26
|
|
|
@@ -702,10 +702,16 @@ def _cli_usage_block(provider: str, totals: dict, session_paths: list[Path]) ->
|
|
|
702
702
|
if totals.get("model"):
|
|
703
703
|
block["model"] = totals["model"]
|
|
704
704
|
block["cliModel"] = totals["model"]
|
|
705
|
-
if provider in _THREE_RATE_PROVIDERS:
|
|
705
|
+
if provider in _THREE_RATE_PROVIDERS or provider == "zai":
|
|
706
|
+
input_tokens = totals.get("inputTokens", 0) or 0
|
|
707
|
+
if provider == "zai":
|
|
708
|
+
# GLM 상태는 캐시 토큰을 입력과 별도로 보고한다. 공통 단가는
|
|
709
|
+
# 캐시 포함 입력을 받으며, 캐시 생성은 일반 입력 단가로 계산한다.
|
|
710
|
+
cached_input = totals.get("cacheReadTokens", 0) or 0
|
|
711
|
+
input_tokens += (totals.get("cacheCreationTokens", 0) or 0) + cached_input
|
|
706
712
|
rates = (
|
|
707
713
|
totals.get("model"),
|
|
708
|
-
|
|
714
|
+
input_tokens,
|
|
709
715
|
cached_input,
|
|
710
716
|
totals.get("outputTokens", 0) or 0,
|
|
711
717
|
)
|