Compendium.Adapters.ZAi.Glm 1.1.0-preview.6

This is a prerelease version of Compendium.Adapters.ZAi.Glm.
dotnet add package Compendium.Adapters.ZAi.Glm --version 1.1.0-preview.6
                    
NuGet\Install-Package Compendium.Adapters.ZAi.Glm -Version 1.1.0-preview.6
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Compendium.Adapters.ZAi.Glm" Version="1.1.0-preview.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Compendium.Adapters.ZAi.Glm" Version="1.1.0-preview.6" />
                    
Directory.Packages.props
<PackageReference Include="Compendium.Adapters.ZAi.Glm" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Compendium.Adapters.ZAi.Glm --version 1.1.0-preview.6
                    
#r "nuget: Compendium.Adapters.ZAi.Glm, 1.1.0-preview.6"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Compendium.Adapters.ZAi.Glm@1.1.0-preview.6
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Compendium.Adapters.ZAi.Glm&version=1.1.0-preview.6&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Compendium.Adapters.ZAi.Glm&version=1.1.0-preview.6&prerelease
                    
Install as a Cake Tool

Compendium.Adapters.ZAi.Glm

The GLM dialect of the Compendium AI adapters: what a GLM model (Z.ai's open-weight family) is and how a request to it is shaped, whatever host serves it. Pure logic — no HTTP, no endpoint, no IAIProvider — depending on Compendium.Abstractions.AI only.

It is used by Compendium.Adapters.ZAi (Z.ai's own API), Compendium.Adapters.Mistral (zai-glm-*) and Compendium.Adapters.OpenRouter (z-ai/glm-*). Each of them keeps its own wire format and asks the dialect what the GLM family needs. Why it is a package of its own, and the wire formats it sits beside: docs/adr/0001-glm-dialect.md.

What it knows

Recognition GlmDialect.Recognise("zai-glm-5-3"), "glm-5.3", "z-ai/glm-5.3:batch", "~z-ai/glm-latest", "zai-org/GLM-5.3" → a GlmModel; anything else → null. Mistral's zai-glm-5 and the latest aliases are GLM 5.3.
Capabilities AlwaysReasons (5.3+), ReasonsByDefault (4.5+), TakesReasoningEffort (5.2+), ContextWindow (1 048 576 for 5.2+), MaxOutputTokens (131 072 for 5.2+), Vision (v models, 5.3 Flash / FlashX).
Effort GlmDialect.EffortFor(model, reasoning, hostTakesMax = true): from GLM 5.3 on, low → low, medium and high → high, xhigh and max → max, or high on a host that does not take max (hostTakesMax: false, which the Mistral adapter passes: Mistral's enum has no max); for GLM 5.2, low, medium and high → high, xhigh and max → xhigh on every host (5.2 has no low, OpenRouter lists only xhigh / high / none for it, Mistral's enum has no max); nothing when no effort is asked, nothing for a GLM before 5.2, never none.
max_tokens GlmDialect.MaxTokens(model, requested, reasoning, adapterDefault, hostTakesMax = true): the answer's room plus room for the reasoning (the caller's BudgetTokens, else 4 096 / 16 384 / 32 768 for the effort actually sent, low / high / max or xhigh — max when unset), capped at the model's output limit. With or without ReasoningOptions: a GLM reasons unasked (a deliberate exception, for GLM only, to "unset, the request is the one it was").
Normalisation GlmDialect.Chunk(...): the answer alone in ContentDelta, the reasoning in ReasoningDelta only when asked for, null for a delta with nothing to pass on. Surface, MapFinishReason (sensitive, model_context_window_exceeded, network_error, model_length), Describe (fills a host's AIModel where it left values unset).

The values are the family's, read from Z.ai's, Mistral's and OpenRouter's public documentation on 2026-10-20; a host's own catalog wins where it says otherwise.

License

MIT — same as Compendium itself.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Compendium.Adapters.ZAi.Glm:

Package Downloads
Compendium.Adapters.OpenRouter

OpenRouter AI provider adapter for Compendium Framework. Implements IAIProvider for access to 100+ LLM models including Claude, GPT-4, Llama, Mistral, and more.

Compendium.Adapters.Mistral

Mistral AI direct API adapter for Compendium Framework. Implements IAIProvider against Mistral's "la Plateforme" REST API — EU-hosted (France) for GDPR-friendly chat completions, streaming, embeddings, tool calling, structured outputs, and Pixtral vision.

Compendium.Adapters.ZAi

Z.ai direct API adapter for Compendium Framework. Implements IAIProvider against Z.ai's OpenAI-compatible chat completions API (GLM 5.3, 5.2, 5.1, 5, 4.7, 4.6): streaming, reasoning (thinking, reasoning_effort, reasoning_content apart from the answer), native tool calling, usage. Built on the GLM dialect shared with the Mistral and OpenRouter adapters.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0-preview.6 588 10/31/2026