Skip to content

feat(subconscious): add GLM-5.2#3060

Open
github-actions[bot] wants to merge 2 commits into
devfrom
issue-3059
Open

feat(subconscious): add GLM-5.2#3060
github-actions[bot] wants to merge 2 commits into
devfrom
issue-3059

Conversation

@github-actions

@github-actions github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

I've made the fix. Here's the review-ready summary:

Summary

Subconscious serves GLM-5.2 as subconscious/glm-5.2 but 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 existing zhipuai/glm-5.2 base-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 to subconscious/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), and modalities (text/text).
  • [cost]input = 1.4, output = 4.4, cache_read = 0.26 (USD per 1M tokens).
  • interleaved = true — reasoning streams inline within the content field for the OpenAI-compatible endpoint.
  • reasoning_options:
    • type = "toggle"chat_template_kwargs.enable_thinking (true | false).
    • type = "budget_tokens"thinking.budget_tokens via the Anthropic Messages format (bounds omitted; not documented).

Evidence

  • Subconscious Pricing — lists GLM-5.2 with model id subconscious/glm-5.2 and per-1M-token rates: cached $0.26, input $1.40, output $4.40. (TIM-Qwen3.6 27B also listed there.)
  • Subconscious Thinking Mode docs — documents the OpenAI-format toggle chat_template_kwargs.enable_thinking and the Anthropic-format thinking config (type: "enabled", budget_tokens) that "lets you cap reasoning with budget_tokens"; states reasoning streams inline in content wrapped in think tags, with streaming code reading delta.content.
  • Subconscious API reference (OpenAI-compatible) — confirms the OpenAI-compatible endpoint and chat_template_kwargs extension surface.
  • Base model models/zhipuai/glm-5.2.toml — confirms the provider-agnostic metadata (1M context, 131,072 output, text-only, reasoning, tool/structured-output support) inherited via base_model.

Validation

  • Verified base_model = "zhipuai/glm-5.2" resolves to the existing models/zhipuai/glm-5.2.toml (model id zhipuai/glm-5.2).
  • Manually checked the merged object against AuthoredModelShape: all required fields (name, description, attachment, reasoning, tool_call, release_date, last_updated, modalities, open_weights, limit with output) are inherited from the base model; reasoning_options is declared (satisfies the "must set reasoning_options when reasoning is true" refine); cost uses valid schema fields (input, output, cache_read).
  • Confirmed there is no sync module for subconscious, so the leading source-comment block and inline reasoning-option API comments are preserved (not stripped by re-serialization).
  • Did not run bun validate or any shell/API commands.

Review notes

  • The pre-existing Subconscious model subconscious/tim-qwen3.6-27b declares interleaved = { field = "reasoning_content" } and cost = { input = 0, output = 0 }. The Thinking Mode docs show reasoning inline in content (think tags) for the OpenAI format, so I used interleaved = true for 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 catalog cost = 0. Both are pre-existing discrepancies and were intentionally left out of scope.
  • budget_tokens is declared without min/max because Subconscious does not document bounds (the docs only show an example value of 2000); per the reasoning-options audit guidance, unverified bounds are omitted.
  • Context/output limits are inherited from the base model (1M / 131,072) since Subconscious does not publish separate per-model limits for GLM-5.2 and markets long-context inference; if Subconscious documents tighter limits, limit can be overridden later.

Closes #3059

Automated by the issue fixer: https://github.com/anomalyco/models.dev/actions/runs/28793474685

@kraplegit kraplegit left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add glm-5.2

@kraplegit kraplegit left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong code. reference https://github.com/anomalyco/models.dev/blob/dev/providers/subconscious/models/subconscious/tim-qwen3.6-27b.toml

@rekram1-node rekram1-node changed the title fix: GLM 5.2 on Subconscious, pls? and have bug... feat(subconscious): add GLM-5.2 Jul 6, 2026
@rekram1-node

Copy link
Copy Markdown
Collaborator

Follow-up in 645321823 removes the unsupported interleaved claim, aligns reasoning controls with the Anthropic Messages adapter from #3062, and adds Subconscious’s GLM-5.2 launch post as model-specific evidence for Messages support. Thinking is disabled by omitting thinking and enabled with thinking.type = "enabled" plus budget_tokens. bun validate and git diff --check pass.

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.

GLM 5.2 on Subconscious, pls?

2 participants