Skip to content

graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs

Python
2.7 KB
Raw Blame

v0.0.269 (2026-08-20)

This release upgrades the existing Z.AI seat to GLM-5.3 and token-maxes its implicit prefix cache, and adds Vercel AI Gateway as a first-class chat seat. It ships on top of 0.0.268 (TOML agents, live bash, Cerebras, session resume, codedb list_dir).

Vercel AI Gateway

AI_GATEWAY_API_KEY (or graff key set vercel …) is a built-in OpenAI-chat seat at https://ai-gateway.vercel.sh/coding-agent/v1. Vercel documents that URL as the coding-agent surface: same auth, routing, and billing as /v1, tagged as harness traffic. Override with GRAFF_VERCEL_URL if you want the generic https://ai-gateway.vercel.sh/v1/chat/completions host.

Default model is alibaba/qwen3.8-27b (1M context). Live GET /models overlays language rows (context_window, type=language); image, video, embedding, and rerank models are not chat seats. /effort maps onto the gateway's reasoning.effort object (none…xhigh; graff max/ultra become xhigh). Requests send optional app attribution (http-referer: https://codegraff.com, x-title: graff). This is not the Anthropic Messages wire, the Responses wire, or image/video generation.

Z.AI GLM-5.3

ZAI_API_KEY was already a first-class seat. It now defaults to glm-5.3 (1M context) and fetches the live catalog from https://api.z.ai/api/paas/v4/models. Offline catalog also includes glm-5-turbo and glm-5v-turbo; the older GLM-5.2 / 5 / 4.7 / 4.5 rows stay.

GLM-5.3 always reasons: the wire sends thinking.type=enabled and maps /effort onto Z.AI's allow-list low / high / max (graff's default medium becomes high so the request is not rejected; xhigh / ultra become max).

Pay-as-you-go stays on https://api.z.ai/api/paas/v4/chat/completions. A GLM Coding Plan key needs ZAI_CODING=1 or GRAFF_ZAI_URL pointing at https://api.z.ai/api/coding/paas/v4/chat/completions. Image and video models (GLM-Image, CogVideoX) are not chat seats.

Implicit prefix cache

Z.AI cache is implicit on an identical request prefix (usage.prompt_tokens_details.cached_tokens). The paas default thinking.clear_thinking=true would drop replayed reasoning_content on the next tool turn and bust that prefix, so graff sends thinking.clear_thinking=false. Coding Plan already defaults preserved thinking on. A sticky prompt_cache_key is accepted and does not prevent hits. /cache still shows remaining-max for the seat.

This is still one provider id (zai). The kernel stays at 19 seats.

Distribution

Prebuilt archives are available for Linux, macOS, and Windows on arm64 and x86_64. Both macOS binaries are Developer ID signed, hardened-runtime enabled, and notarized by Apple; SHA256SUMS covers all six platform archives.