Skip to content

Add ZAI Coding Plan GLM-5.2 with Anthropic provider model#2277

Merged
rekram1-node merged 4 commits into
anomalyco:devfrom
ririnto:feat/zai-coding-plan-glm-5-2-anthropic
Jun 13, 2026
Merged

Add ZAI Coding Plan GLM-5.2 with Anthropic provider model#2277
rekram1-node merged 4 commits into
anomalyco:devfrom
ririnto:feat/zai-coding-plan-glm-5-2-anthropic

Conversation

@ririnto

@ririnto ririnto commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add new model entry: providers/zai-coding-plan/models/glm-5.2.toml
  • Configure model metadata based on https://docs.z.ai/devpack/latest-model.md
    • name = "GLM-5.2"
    • reasoning = true
    • tool_call = true
    • interleaved.field = "reasoning_content"
    • limit.context = 1000000, limit.output = 131072
    • reasoning_options = [{ type = "effort", values = ["high", "max"] }]
  • Use provider override block for Coding Plan serving layer:
    • 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/max reasoning options, which aligns with the Anthropic reasoning mode capabilities required here.

Additional Notes

Closes #2276

@leszek3737

Copy link
Copy Markdown
Contributor

First create a model in the models/zhipuai folder and then refer to it according to the readme:

Model-only facts live in models/, using the same path-style IDs as provider models. For example, models/openai/gpt-5.toml defines metadata for the underlying GPT-5 model, while providers/openai/models/gpt-5.toml defines OpenAI-specific serving details such as pricing.

Use model metadata for provider-agnostic facts:

  • name, family, release_date, last_updated, knowledge
  • attachment, reasoning, tool_call, structured_output, temperature
  • [limit] defaults like context, input, and output token limits
  • [modalities] defaults
  • open_weights, license, links, weights, and benchmarks

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 and then keep only provider-specific fields or overrides:

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_000

Provider 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.
@ririnto

ririnto commented Jun 13, 2026

Copy link
Copy Markdown
Contributor Author

Split the entry into a provider-agnostic models/zhipuai/glm-5.2.toml and reference it from the provider TOML via base_model = "zhipuai/glm-5.2". The provider file now keeps only provider-specific fields (reasoning options, interleaved, cost, and the per-model Anthropic [provider] override). d210e45d

@mugnimaestra

Copy link
Copy Markdown
Contributor

LGTM, nice work adding both the provider-agnostic metadata and the Coding Plan entry. Hoping this gets merged soon!

@rekram1-node rekram1-node merged commit ead650e into anomalyco:dev Jun 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ZAI Coding Plan GLM-5.2 with Anthropic provider configuration

4 participants