harn-vm 0.10.162

Async bytecode virtual machine for the Harn programming language
Documentation
# Z.AI GLM family, served via the OpenAI-compatible `/api/paas/v4` endpoint
# (the `.../v1` base 404s). The live `/models` listing on 2026-09-20 reports:
# glm-4.5, glm-4.5-air, glm-4.6, glm-4.7, glm-5, glm-5-turbo, glm-5.1,
# glm-5.2, glm-5.3, glm-5.3-flash, and glm-5.3-flashx. Nothing was retired
# since the 2026-08-22 read; FlashX is the one addition. The GLM-4.x line stays catalogued as the
# cheap independent-bucket coding/judge routes (glm-4.6 is confirmed serving
# 200 at paas/v4). Pricing per docs.z.ai.
#
# GLM-5.3 joined the public model list and OpenRouter on 2026-08-22 and is now
# on the public rate card at GLM-5.2's tariff ($1.40 / $4.40 per MTok, $0.26
# cache hit). Z.AI's own migration note is a one-parameter swap: same base
# model, same wire shape, `model="glm-5.2"` -> `model="glm-5.3"`. It is the
# current GLM flagship, so the bare `glm` alias resolves to it, and the
# retired Cerebras and NVIDIA GLM rows already name it in `superseded_by`.
#
# GLM-5-Turbo's price was re-read against the same rate card on 2026-08-22:
# it is $1.20 / $4.00 / $0.24, not the $0.60 / $2.00 / $0.11 this file
# previously carried.

# GLM-4.6 — 200K-context coding model, confirmed serving at paas/v4.
[models."glm-4.6"]
name = "GLM 4.6"
provider = "zai"
context_window = 204800
capabilities = ["tools", "streaming", "thinking", "prompt_caching"]
pricing = { input_per_mtok = 0.60, output_per_mtok = 2.20, cache_read_per_mtok = 0.11 }
tier = "mid"
open_weight = true
strengths = ["coding", "agentic", "tool_use", "cheap"]

# GLM-4.5 — prior-generation coding flagship; GLM-4.5-Air is the lighter
# MoE variant. Kept as cheap independent-bucket routes.
[models."glm-4.5"]
name = "GLM 4.5"
provider = "zai"
context_window = 131072
capabilities = ["tools", "streaming", "thinking", "prompt_caching"]
pricing = { input_per_mtok = 0.60, output_per_mtok = 2.20, cache_read_per_mtok = 0.11 }
tier = "mid"
open_weight = true
strengths = ["coding", "agentic", "tool_use", "cheap"]
[models."glm-4.5-air"]
name = "GLM 4.5 Air"
provider = "zai"
context_window = 131072
capabilities = ["tools", "streaming", "thinking"]
pricing = { input_per_mtok = 0.20, output_per_mtok = 1.10, cache_read_per_mtok = 0.03 }
tier = "small"
open_weight = true
strengths = ["speed", "cheap", "coding", "tool_use"]

# GLM-4.7 — current GLM-4.x generation coding model.
[models."glm-4.7"]
name = "GLM 4.7"
provider = "zai"
context_window = 204800
capabilities = ["tools", "streaming", "thinking", "prompt_caching"]
pricing = { input_per_mtok = 0.60, output_per_mtok = 2.20, cache_read_per_mtok = 0.11 }
tier = "mid"
open_weight = true
strengths = ["coding", "agentic", "tool_use", "cheap"]

# GLM-5 family. GLM-5.2 is the current 1M-context open-weight flagship;
# GLM-5.1 / GLM-5 are kept for pinned callers. glm-5-turbo is the current
# accelerated tier. OpenRouter mirrors live below.
[models."glm-5-turbo"]
name = "GLM 5 Turbo"
provider = "zai"
context_window = 202752
capabilities = ["tools", "streaming", "thinking"]
# docs.z.ai rate card, 2026-08-22: $1.20 / $4.00 per MTok (cache hit $0.24).
# OpenRouter's `z-ai/glm-5-turbo` mirror quotes the same three numbers.
pricing = { input_per_mtok = 1.20, output_per_mtok = 4.00, cache_read_per_mtok = 0.24 }
tier = "mid"
open_weight = true
strengths = ["speed", "coding", "agentic", "tool_use", "cheap"]
[models."glm-5"]
name = "GLM 5"
provider = "zai"
context_window = 202752
capabilities = ["tools", "streaming", "thinking", "prompt_caching"]
# docs.z.ai pricing verified 2026-07-02: $1.00 / $3.20 per MTok (cache
# hit $0.20). The prior 0.98/3.08 figures matched no published tier.
pricing = { input_per_mtok = 1.00, output_per_mtok = 3.20, cache_read_per_mtok = 0.20 }
tier = "frontier"
open_weight = true
strengths = ["coding", "agentic", "tool_use"]

[models."glm-5.1"]
name = "GLM 5.1"
provider = "zai"
context_window = 202752
equivalence_group = "frontier-agent-coding"
capabilities = ["tools", "streaming", "thinking", "prompt_caching"]
pricing = { input_per_mtok = 1.40, output_per_mtok = 4.40, cache_read_per_mtok = 0.26 }
tier = "frontier"
open_weight = true
strengths = ["coding", "agentic", "tool_use", "reasoning", "long_context"]
benchmarks = { swe_bench_pro_lead = 1.0 }
[models."glm-5.2"]
name = "GLM 5.2"
provider = "zai"
context_window = 1048576
equivalence_group = "frontier-agent-coding"
capabilities = ["tools", "streaming", "thinking", "prompt_caching"]
pricing = { input_per_mtok = 1.40, output_per_mtok = 4.40, cache_read_per_mtok = 0.26 }
tier = "frontier"
open_weight = true
strengths = ["coding", "agentic", "tool_use", "reasoning", "long_context"]
benchmarks = { swe_bench_pro_lead = 1.0 }
[models."glm-5.3"]
name = "GLM 5.3"
provider = "zai"
context_window = 1048576
equivalence_group = "frontier-agent-coding"
capabilities = ["tools", "streaming", "thinking", "prompt_caching"]
# docs.z.ai rate card, 2026-08-22: GLM-5.3 lists at GLM-5.2's tariff, which
# is what Z.AI's launch note means by "available at the same price".
pricing = { input_per_mtok = 1.40, output_per_mtok = 4.40, cache_read_per_mtok = 0.26 }
tier = "frontier"
open_weight = true
strengths = ["coding", "agentic", "tool_use", "reasoning", "long_context"]

# GLM-5.3-Flash is the natively multimodal, efficiency-focused sibling of
# GLM-5.3. Z.AI's 2026-08-26 model card documents 320B total / 18B active
# parameters, 1M context, native image/video/file input, mandatory reasoning,
# tools, structured output, streaming, caching, and MIT-licensed weights.
# The 50% launch promotion expires at 24:00 Singapore time on September 9,
# which is the exclusive UTC instant 2026-09-09T16:00:00Z.
[models."glm-5.3-flash"]
name = "GLM 5.3 Flash"
provider = "zai"
context_window = 1048576
logical_model = "glm-5.3-flash"
equivalence_group = "glm-5.3-flash"
served_variant = "zai-direct"
capabilities = ["tools", "vision", "video", "streaming", "thinking", "prompt_caching"]
pricing = { input_per_mtok = 0.15, output_per_mtok = 0.50, cache_read_per_mtok = 0.03, promotions = [{ id = "zai-glm-5.3-flash-launch", starts_on = "2026-08-26", ends_at = "2026-09-09T16:00:00Z", source_url = "https://docs.z.ai/guides/overview/pricing", input_per_mtok = 0.075, output_per_mtok = 0.25, cache_read_per_mtok = 0.015 }] }
architecture = { parameter_count_b = 320.0, active_parameter_count_b = 18.0, moe = true, license = "MIT", source_url = "https://docs.z.ai/guides/vlm/glm-5.3-flash", last_verified = "2026-08-28" }
tier = "frontier"
open_weight = true
strengths = ["cheap", "coding", "agentic", "tool_use", "reasoning", "long_context", "vision", "speed"]

# OpenRouter mirror of GLM-5 family so callers without a Z.AI key still
# resolve a route. OR doesn't list GLM-4.6/4.7 — the canonical OR slugs
# are the GLM-5 generation.
[models."z-ai/glm-5"]
name = "GLM 5 (via OpenRouter)"
provider = "openrouter"
context_window = 204800
capabilities = ["tools", "streaming"]
pricing = { input_per_mtok = 0.60, output_per_mtok = 1.92, cache_read_per_mtok = 0.12 }
tier = "frontier"
open_weight = true
strengths = ["coding", "agentic"]
[models."z-ai/glm-5.1"]
name = "GLM 5.1 (via OpenRouter)"
provider = "openrouter"
context_window = 204800
equivalence_group = "frontier-agent-coding"
capabilities = ["tools", "streaming"]
pricing = { input_per_mtok = 1.4, output_per_mtok = 4.4, cache_read_per_mtok = 0.26 }
tier = "frontier"
open_weight = true
strengths = ["coding", "agentic", "tool_use", "reasoning", "long_context"]
[models."z-ai/glm-5.2"]
name = "GLM 5.2 (via OpenRouter)"
provider = "openrouter"
context_window = 1048576
equivalence_group = "frontier-agent-coding"
capabilities = ["tools", "streaming", "thinking", "prompt_caching"]
pricing = { input_per_mtok = 0.25, output_per_mtok = 3.99, cache_read_per_mtok = 0.2 }
tier = "frontier"
open_weight = true
strengths = ["coding", "agentic", "tool_use", "reasoning", "long_context"]
[models."z-ai/glm-5.3"]
name = "GLM 5.3 (via OpenRouter)"
provider = "openrouter"
context_window = 1048576
equivalence_group = "frontier-agent-coding"
capabilities = ["tools", "streaming", "thinking", "prompt_caching"]
pricing = { input_per_mtok = 1.4, output_per_mtok = 4.4, cache_read_per_mtok = 0.26 }
tier = "frontier"
open_weight = true
strengths = ["coding", "agentic", "tool_use", "reasoning", "long_context"]
# GLM-5.3 Prime is an OpenRouter-only row: Z.ai publishes no first-party
# `glm-5.3-prime` id (docs.z.ai pricing, read 2026-10-09), and OpenRouter's
# only endpoint is Alibaba, whose Model Studio "Prime mode" serves the same
# weights on a faster lane at exactly this card ($2.80 / $0.56 cached / $8.80;
# Singapore). Text input only, 1M context, 131,072 max output. Probed
# 2026-10-09 pinned to that endpoint: a native tool call, the tool-result
# round trip and a required tool choice returned 200, effort `low` and `high`
# reasoned, and reasoning off was a 400 "Reasoning is mandatory", which the
# `z-ai/glm-5.3*` rule already encodes.
[models."z-ai/glm-5.3-prime"]
name = "GLM 5.3 Prime (via OpenRouter)"
provider = "openrouter"
context_window = 1000000
released = "2026-09-23"
capabilities = ["tools", "streaming", "thinking", "prompt_caching"]
pricing = { input_per_mtok = 2.80, output_per_mtok = 8.80, cache_read_per_mtok = 0.56 }
tier = "frontier"
open_weight = true
strengths = ["coding", "agentic", "tool_use", "reasoning", "long_context", "speed"]
[models."z-ai/glm-5.3-flash"]
name = "GLM 5.3 Flash (via OpenRouter)"
provider = "openrouter"
context_window = 1048576
logical_model = "glm-5.3-flash"
equivalence_group = "glm-5.3-flash"
served_variant = "openrouter"
capabilities = ["tools", "vision", "video", "streaming", "thinking", "prompt_caching"]
# Re-read 2026-09-20. Z.AI's launch promotion expired on 2026-09-09, but
# OpenRouter did not return to Z.AI's list rate: it now bills $0.09 / $0.30
# with a $0.018 cache read, below the $0.15 / $0.50 list the direct row still
# carries (docs.z.ai rate card, re-checked the same day). That is OpenRouter's
# own rate for this route, not a Z.AI promotion, so it is the base here and the
# expired promotion is gone.
pricing = { input_per_mtok = 0.15, output_per_mtok = 0.5, cache_read_per_mtok = 0.03 }
architecture = { parameter_count_b = 320.0, active_parameter_count_b = 18.0, moe = true, license = "MIT", source_url = "https://openrouter.ai/api/v1/models", last_verified = "2026-08-28" }
tier = "frontier"
open_weight = true
strengths = ["cheap", "coding", "agentic", "tool_use", "reasoning", "long_context", "vision", "speed"]

# GLM-5.3-FlashX, added 2026-09-20. Z.AI's higher-throughput FlashX build of
# GLM-5.3-Flash, released 2026-09-18 (`created` on the OpenRouter record). Same
# 320B/18B hybrid sparse-plus-linear-attention architecture and the same
# 1M-token window as Flash; the trade is roughly 200 output tok/s for a higher
# rate. Rates agree across two sources read on 2026-09-20: the docs.z.ai rate
# card ($0.37 in / $0.075 cached / $1.25 out per MTok) and
# https://openrouter.ai/api/v1/models ($0.37 / $1.25).
#
# Capabilities are inherited from the glm-5.3-flash rows, which is a family
# default, not a verified FlashX fact: Z.AI publishes no separate FlashX model
# card, so its vision, video and caching support are unverified here.
[models."glm-5.3-flashx"]
name = "GLM 5.3 FlashX"
provider = "zai"
context_window = 1048576
logical_model = "glm-5.3-flashx"
equivalence_group = "glm-5.3-flashx"
served_variant = "zai-direct"
capabilities = ["tools", "vision", "video", "streaming", "thinking", "prompt_caching"]
pricing = { input_per_mtok = 0.37, output_per_mtok = 1.25, cache_read_per_mtok = 0.075 }
architecture = { parameter_count_b = 320.0, active_parameter_count_b = 18.0, moe = true, license = "MIT", source_url = "https://docs.z.ai/guides/overview/pricing", last_verified = "2026-09-20" }
tier = "frontier"
open_weight = true
strengths = ["speed", "cheap", "coding", "agentic", "tool_use", "reasoning", "long_context", "vision"]

[models."z-ai/glm-5.3-flashx"]
name = "GLM 5.3 FlashX (via OpenRouter)"
provider = "openrouter"
context_window = 1048576
logical_model = "glm-5.3-flashx"
equivalence_group = "glm-5.3-flashx"
served_variant = "openrouter"
capabilities = ["tools", "vision", "video", "streaming", "thinking", "prompt_caching"]
pricing = { input_per_mtok = 0.37, output_per_mtok = 1.25, cache_read_per_mtok = 0.09 }
architecture = { parameter_count_b = 320.0, active_parameter_count_b = 18.0, moe = true, license = "MIT", source_url = "https://openrouter.ai/api/v1/models", last_verified = "2026-09-20" }
tier = "frontier"
open_weight = true
strengths = ["speed", "cheap", "coding", "agentic", "tool_use", "reasoning", "long_context", "vision"]

[models."z-ai/glm-5v-turbo"]
name = "GLM 5V Turbo (via OpenRouter)"
provider = "openrouter"
context_window = 202752
capabilities = ["tools", "streaming", "vision"]
pricing = { input_per_mtok = 1.20, output_per_mtok = 4.00, cache_read_per_mtok = 0.24 }
# Inline metadata keeps this row independent of fragment-order defaults.
tier = "frontier"
open_weight = true
strengths = ["vision", "coding", "agentic"]