Skip to content

feat(aionrs): expose GLM-5.2 thinking mode#628

Draft
GodfatherPacino wants to merge 3 commits into
iOfficeAI:mainfrom
GodfatherPacino:codex/glm-5-2-thinking-mode
Draft

feat(aionrs): expose GLM-5.2 thinking mode#628
GodfatherPacino wants to merge 3 commits into
iOfficeAI:mainfrom
GodfatherPacino:codex/glm-5-2-thinking-mode

Conversation

@GodfatherPacino

@GodfatherPacino GodfatherPacino commented Jul 16, 2026

Copy link
Copy Markdown

Description

Adds request-level GLM-5.2 thinking-mode support to the Aionrs runtime and fixes explicit disabling for Anthropic-compatible endpoints.

  • Detects bare and provider-qualified GLM-5.2 model IDs and defaults thinking to enabled.
  • Exposes thinking as a runtime thought_level configuration option with enabled and disabled values.
  • Applies configuration updates to subsequent Aionrs requests without restarting the conversation.
  • Enables explicit {"thinking":{"type":"disabled"}} serialization for Anthropic-compatible GLM-5.2 providers, where omitting the field leaves thinking enabled by default.
  • Keeps OpenAI-compatible GLM-5.2 behavior and third-party ACP runtimes unchanged.
  • Adds focused coverage for model detection, protocol scoping, defaults, option discovery, runtime updates, and validation.

This is the backend counterpart of iOfficeAI/AionUi#3597 and currently depends on iOfficeAI/aionrs#228.

Dependency note: while the Aionrs PR is under review, this draft pins the exact fork commit d91f2b2. It should be switched to the merged upstream revision or release before this PR is marked ready.

Related Issues

No linked issue.

Type of Change

  • feat: New feature
  • fix: Bug fix
  • refactor: Code change that neither fixes a bug nor adds a feature
  • docs: Documentation only
  • test: Tests only
  • chore: Maintenance

Verification

  • Migration immutability check
  • Formatting check
  • Clippy with warnings denied
  • Affected crate tests: 624 unit tests passed; 33 integration tests passed; 12 ignored by repository configuration
  • Full workspace suite via just push: 6,778 passed; 18 skipped
  • Aionrs projector regression tests verify the exact disabled Anthropic request block and default omission behavior

Additional Context

Manual testing of the previous package confirmed that the UI and runtime state changed to disabled, but the GLM-5.2 Anthropic request still produced thinking output. The root cause was the Anthropic projector omitting the disabled block. The linked Aionrs fix makes that serialization opt-in so providers and models that rely on omission remain unaffected.

Official references:

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.

1 participant