Skip to content

Release 0.31.1#1372

Merged
Crunchyman-ralph merged 6 commits intomainfrom
next
Nov 1, 2025
Merged

Release 0.31.1#1372
Crunchyman-ralph merged 6 commits intomainfrom
next

Conversation

@Crunchyman-ralph
Copy link
Collaborator

@Crunchyman-ralph Crunchyman-ralph commented Nov 1, 2025

What type of PR is this?

  • 🐛 Bug fix
  • ✨ Feature
  • 🔌 Integration
  • 📝 Docs
  • 🧹 Refactor
  • Other:

Description

Related Issues

How to Test This

# Example commands or steps

Expected result:

Contributor Checklist

  • Created changeset: npm run changeset
  • Tests pass: npm test
  • Format check passes: npm run format-check (or npm run format to fix)
  • Addressed CodeRabbit comments (if any)
  • Linked related issues (if any)
  • Manually tested the changes

Changelog Entry


For Maintainers

  • PR title follows conventional commits
  • Target branch correct
  • Labels added
  • Milestone assigned (if applicable)

Summary by CodeRabbit

Release Notes

  • New Features

    • Added Z.ai Coding Plan provider with GLM models (glm-4.6, glm-4.5, glm-4.5-air) for specialized coding tasks
    • Improved auto-update experience—updates now run before CLI commands execute and automatically restart with the new version
  • Documentation

    • Updated model availability and pricing information

@changeset-bot
Copy link

changeset-bot bot commented Nov 1, 2025

🦋 Changeset detected

Latest commit: c52f14a

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 1, 2025

Walkthrough

This PR introduces a new ZAI (GLM) Coding Plan provider as a separate service option alongside the existing ZAI provider. Changes include new AI provider implementation, model configuration updates, CLI display enhancements for provider/model identification, and restructured auto-update logic with restart capability.

Changes

Cohort / File(s) Change Summary
New ZAI Coding Provider Implementation
src/ai-providers/zai-coding.js, tests/unit/ai-providers/zai-coding.test.js
New ZAICodingProvider class extending OpenAICompatibleProvider targeting Z.ai coding plan endpoint; includes unit tests for initialization, inheritance, API key handling, and authentication validation.
Provider Infrastructure & Registration
src/ai-providers/index.js, packages/tm-core/src/common/constants/providers.ts, scripts/modules/ai-services-unified.js, tests/unit/ai-services-unified.test.js
Adds ZAICodingProvider export to public API, registers 'zai-coding' in VALIDATED_PROVIDERS constant and PROVIDERS registry, includes mock export in unified services test.
Model Configuration & Access Control
scripts/modules/supported-models.json, scripts/modules/task-manager/models.js
Restructures ZAI models into separate 'zai' and 'zai-coding' sections; renames glm-4.5v to glm-4.5; adds glm-4.5-air model; resets costs to zero for coding variants; expands allowed_roles to include "research"; enhances model resolution logic with provider-hint matching and per-provider validation.
CLI Provider & Key Configuration
scripts/modules/config-manager.js, apps/cli/src/commands/models/types.ts, apps/cli/src/commands/models/prompts.ts
Adds zai and 'zai-coding' to API key and MCP config lookups; adds optional name field to ModelInfo interface; updates model display to prefer name over ID and show provider/displayName in short labels.
Auto-Update & Restart Flow
apps/cli/src/utils/auto-update.ts, apps/cli/src/index.ts, scripts/modules/commands.js
Removes user-facing restart prompt; exports new restartWithNewVersion() function that spawns new process with inherited stdio; restructures command initialization to perform update check before CLI parsing and invoke restart if update succeeds.
Documentation & Metadata
.changeset/light-clowns-hope.md, .changeset/polite-jokes-flash.md, docs/models.md, mcp-server/src/tools/models.js
Adds changesets documenting ZAI Coding Plan provider support and auto-update improvements; updates models.md with new provider entries and cost structure; generalizes MCP baseURL parameter description.

Sequence Diagram(s)

sequenceDiagram
    participant User as User/CLI
    participant CLI as Command Handler
    participant UpdateCheck as Update Check
    participant AutoUpdate as Auto-Update
    participant Restart as Restart Process
    
    User->>CLI: Run CLI command
    CLI->>UpdateCheck: checkForUpdate(currentVersion)
    
    alt Update Available
        UpdateCheck-->>CLI: updateInfo with new version
        CLI->>AutoUpdate: performAutoUpdate()
        AutoUpdate-->>CLI: Update complete
        CLI->>Restart: restartWithNewVersion(argv)
        Restart->>Restart: Spawn new process
        Restart-->>User: New version running
    else No Update
        UpdateCheck-->>CLI: No update
        CLI->>CLI: setupCLI and parse argv
        CLI-->>User: Execute command
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Attention areas:
    • scripts/modules/task-manager/models.js: Complex provider-hint matching logic with multiple provider-specific branches and baseURL handling; requires verification of edge cases and error paths.
    • scripts/modules/supported-models.json: Significant data restructuring with renamed models, cost adjustments, and access control changes; verify migration accuracy and cost implications.
    • scripts/modules/commands.js: Updated auto-update flow with synchronous-style awaiting; ensure correct error handling and fallback behavior if update fails.
    • src/ai-providers/zai-coding.js and provider registration: Verify ZAICodingProvider correctly extends OpenAICompatibleProvider and baseURL routing is correct.
    • Provider and model display integration: Confirm name/displayName fallback logic and provider/model pairing in UI is consistent across all flows.

Possibly related PRs

Suggested reviewers

  • eyaltoledano

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "Release 0.31.1" directly corresponds to the main objective of this pull request, which is to create a release by merging from the "next" branch to the "main" branch. The title clearly identifies the specific version being released (0.31.1), making it unambiguous what this PR represents. For release PRs, version-based titles are the standard convention and appropriately communicate the primary change, distinguishing this release from other releases in the repository's history. While the title does not enumerate the specific features or fixes included, that detail is captured in the changeset files and is not expected in a concise PR title.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch next

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between abf46b8 and c52f14a.

📒 Files selected for processing (1)
  • apps/cli/src/utils/auto-update.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/cli/src/utils/auto-update.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Test
  • GitHub Check: Test
  • GitHub Check: update-docs

Comment @coderabbitai help to get the list of available commands and usage tips.

eyaltoledano
eyaltoledano previously approved these changes Nov 1, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
scripts/modules/commands.js (1)

448-475: Consider the UX impact of synchronous update checks on every command.

The new flow makes update checking synchronous and blocking for ALL commands, which could degrade user experience:

  1. Performance concern: Every command invocation now waits for an update check (up to 3 seconds) before execution, even for quick operations like task-master list or task-master show.

  2. Frequent update overhead: If updates are available, the download/install process blocks command execution entirely, which may surprise users expecting immediate feedback.

  3. Potential improvements:

    • Implement rate limiting (e.g., check once per day via cached timestamp)
    • Skip update checks for read-only/query commands
    • Consider making auto-update opt-in or provide a --no-update-check flag for CI/scripting scenarios

The existing escape hatches (TASKMASTER_SKIP_AUTO_UPDATE, CI detection, 3s timeout) help, but users in normal workflows will experience this delay on every invocation.

Would you like me to propose a rate-limited update check implementation that only checks once per day?

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.

2 participants