Add ZAI Coding Plan GLM-5.2 with Anthropic provider model#2277
Conversation
|
First create a model in the models/zhipuai folder and then refer to it according to the readme: Model-only facts live in Use model metadata for provider-agnostic facts:
Example: name = "GPT-5"
family = "gpt"
release_date = "2025-08-07"
last_updated = "2025-08-07"
attachment = true
reasoning = true
temperature = false
tool_call = true
structured_output = true
open_weights = false
[limit]
context = 400_000
input = 272_000
output = 128_000
[modalities]
input = ["text", "image"]
output = ["text"]
[[benchmarks]]
name = "Benchmark Name"
score = 72.5
metric = "accuracy"
source = "https://example.com/results"
[[weights]]
label = "Model weights"
url = "https://huggingface.co/example/model"
format = "safetensors"Provider TOMLs can inherit these facts with base_model = "openai/gpt-5"
[cost]
input = 1.25
output = 10.00
cache_read = 0.125
[limit]
context = 200_000 # optional provider override
output = 32_000Provider fields win over model metadata during generation. Use this when the underlying model is the same but a provider serves it with different context limits, modalities, features, or pricing. |
…odel reference Move provider-agnostic facts (name, family, dates, capability flags, limit, modalities) into models/zhipuai/glm-5.2.toml and reference it via base_model in the provider TOML, which now keeps only provider- specific fields (reasoning_options, interleaved, cost, per-model anthropic [provider] override). Per README wrapper-provider guidance.
|
Split the entry into a provider-agnostic |
|
LGTM, nice work adding both the provider-agnostic metadata and the Coding Plan entry. Hoping this gets merged soon! |
Summary
providers/zai-coding-plan/models/glm-5.2.tomlname = "GLM-5.2"reasoning = truetool_call = trueinterleaved.field = "reasoning_content"limit.context = 1000000,limit.output = 131072reasoning_options = [{ type = "effort", values = ["high", "max"] }]npm = "@ai-sdk/anthropic"api = "https://api.z.ai/api/anthropic"Motivation
The provider field was intentionally switched to Anthropic SDK because the Z.AI latest-model documentation notes GLM-5.2 supports
high/maxreasoning options, which aligns with the Anthropic reasoning mode capabilities required here.Additional Notes
models/was added because this change is specific to the Z.AI Coding Plan wrapper.Closes #2276