feat(subconscious): add GLM-5.2#3060
Open
github-actions[bot] wants to merge 2 commits into
Open
Conversation
kraplegit
suggested changes
Jul 6, 2026
Collaborator
|
Follow-up in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've made the fix. Here's the review-ready summary:
Summary
Subconscious serves GLM-5.2 as
subconscious/glm-5.2but the model was missing from the catalog, so tools that read models.dev data (e.g. opencode) could not resolve the model on the Subconscious provider. This adds a provider model entry that inherits provider-agnostic facts from the existingzhipuai/glm-5.2base-model metadata and declares only the provider-specific pricing, reasoning controls, and reasoning delivery format.Changes
New file
providers/subconscious/models/subconscious/glm-5.2.toml(model id resolves tosubconscious/glm-5.2):base_model = "zhipuai/glm-5.2"— inherits name, description, family,attachment=false,reasoning=true,temperature=true,tool_call=true,structured_output=true,open_weights=true,release_date/last_updated,limit(context 1,000,000; output 131,072), andmodalities(text/text).[cost]—input = 1.4,output = 4.4,cache_read = 0.26(USD per 1M tokens).interleaved = true— reasoning streams inline within thecontentfield for the OpenAI-compatible endpoint.reasoning_options:type = "toggle"—chat_template_kwargs.enable_thinking(true | false).type = "budget_tokens"—thinking.budget_tokensvia the Anthropic Messages format (bounds omitted; not documented).Evidence
subconscious/glm-5.2and per-1M-token rates: cached $0.26, input $1.40, output $4.40. (TIM-Qwen3.6 27B also listed there.)chat_template_kwargs.enable_thinkingand the Anthropic-formatthinkingconfig (type: "enabled",budget_tokens) that "lets you cap reasoning withbudget_tokens"; states reasoning streams inline incontentwrapped in think tags, with streaming code readingdelta.content.chat_template_kwargsextension surface.models/zhipuai/glm-5.2.toml— confirms the provider-agnostic metadata (1M context, 131,072 output, text-only, reasoning, tool/structured-output support) inherited viabase_model.Validation
base_model = "zhipuai/glm-5.2"resolves to the existingmodels/zhipuai/glm-5.2.toml(model idzhipuai/glm-5.2).AuthoredModelShape: all required fields (name,description,attachment,reasoning,tool_call,release_date,last_updated,modalities,open_weights,limitwithoutput) are inherited from the base model;reasoning_optionsis declared (satisfies the "must set reasoning_options when reasoning is true" refine);costuses valid schema fields (input,output,cache_read).subconscious, so the leading source-comment block and inline reasoning-option API comments are preserved (not stripped by re-serialization).bun validateor any shell/API commands.Review notes
subconscious/tim-qwen3.6-27bdeclaresinterleaved = { field = "reasoning_content" }andcost = { input = 0, output = 0 }. The Thinking Mode docs show reasoning inline incontent(think tags) for the OpenAI format, so I usedinterleaved = truefor GLM-5.2 to match the documented behavior. The TIM-Qwen pricing on the pricing page ($0.15/$0.30/$3.00) also differs from its catalogcost = 0. Both are pre-existing discrepancies and were intentionally left out of scope.budget_tokensis declared withoutmin/maxbecause Subconscious does not document bounds (the docs only show an example value of 2000); per the reasoning-options audit guidance, unverified bounds are omitted.limitcan be overridden later.Closes #3059
Automated by the issue fixer: https://github.com/anomalyco/models.dev/actions/runs/28793474685