Skip to content

Ralph/chore/update.from.main.0.31.0#1373

Closed
Crunchyman-ralph wants to merge 5 commits intonextfrom
ralph/chore/update.from.main.0.31.0
Closed

Ralph/chore/update.from.main.0.31.0#1373
Crunchyman-ralph wants to merge 5 commits intonextfrom
ralph/chore/update.from.main.0.31.0

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

  • New Features

    • Added Z.ai Coding Plan provider support for subscription-based routing with GLM models.
    • Improved auto-update flow: updates install automatically before CLI commands run with automatic restart.
    • Enhanced model selection display with improved provider-aware lookups.
  • Chores

    • Released stable v0.31.0.
    • Updated documentation with new model variants and provider information.

Crunchyman-ralph and others added 5 commits November 1, 2025 10:29
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
@changeset-bot
Copy link

changeset-bot bot commented Nov 1, 2025

🦋 Changeset detected

Latest commit: 64785ea

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

PR transitions version 0.31.0 from pre-release to stable, removes pre-release changesets, adds ZAI Coding provider as a separate endpoint for subscription-based routing, and implements auto-restart functionality after CLI updates to use the new version immediately.

Changes

Cohort / File(s) Summary
Pre-release cleanup
.changeset/pre.json, .changeset/dirty-walls-ask.md, .changeset/fix-metadata-nullable.md, .changeset/forty-squids-sell.md, .changeset/mighty-pens-ring.md, .changeset/nice-laws-help.md, .changeset/plain-animals-train.md, .changeset/tricky-bats-ring.md
Removed pre-release changesets and configuration; exits pre-release mode
Version stable release
package.json, apps/docs/package.json, packages/claude-code-plugin/package.json, apps/extension/package.json
Updated package versions; root bumped to 0.31.0, docs to 0.0.9, claude-code-plugin to 0.0.4, extension dependency loosened to wildcard
Changelog entries
CHANGELOG.md, apps/cli/CHANGELOG.md, apps/docs/CHANGELOG.md, apps/mcp/CHANGELOG.md, packages/build-config/CHANGELOG.md, packages/claude-code-plugin/CHANGELOG.md, packages/tm-bridge/CHANGELOG.md, packages/tm-core/CHANGELOG.md, packages/ai-sdk-provider-grok-cli/CHANGELOG.md
Added comprehensive release notes for 0.31.0 and 0.31.0-rc.0; added version entries across packages
ZAI Coding provider implementation
src/ai-providers/zai-coding.js, src/ai-providers/index.js, packages/tm-core/src/common/constants/providers.ts, scripts/modules/ai-services-unified.js, scripts/modules/supported-models.json, scripts/modules/config-manager.js, tests/unit/ai-providers/zai-coding.test.js, tests/unit/ai-services-unified.test.js
Added new ZAICodingProvider class for Z.ai Coding Plan endpoint; wired provider into constants, config, and tests; registered GLM models (4.6, 4.5, 4.5-air) with zero cost and expanded role access
Auto-update with restart
apps/cli/src/utils/auto-update.ts, apps/cli/src/index.ts, scripts/modules/commands.js
Introduced restartWithNewVersion() function and refactored CLI startup to check and apply updates before parsing commands; auto-restarts with new version on successful update
Model selection enhancements
apps/cli/src/commands/models/types.ts, apps/cli/src/commands/models/prompts.ts, scripts/modules/task-manager/models.js, docs/models.md
Added optional name field to ModelInfo; updated display logic to prefer model name over ID; enhanced provider-aware model lookup with multi-provider validation paths; updated model documentation to November 1, 2025 with zai-coding variants
Configuration updates
mcp-server/src/tools/models.js
Broadened baseURL parameter description from OpenAI-specific to generic provider support

Sequence Diagram

sequenceDiagram
    participant User
    participant CLI
    participant UpdateCheck
    participant AutoUpdate
    participant Restart

    User->>CLI: Run task-master command
    CLI->>UpdateCheck: Check for updates (before parse)
    UpdateCheck-->>CLI: Update available & autoUpdate enabled
    CLI->>AutoUpdate: performAutoUpdate()
    AutoUpdate-->>CLI: Success with new version
    CLI->>Restart: restartWithNewVersion(argv)
    Restart->>Restart: Spawn new process with inherited stdio
    Restart-->>User: New CLI process runs command
    Restart->>CLI: Exit current process
    
    Note over CLI,Restart: If no update available or update fails,<br/>continue with current version
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Areas requiring extra attention:
    • scripts/modules/task-manager/models.js — Provider-aware model lookup introduces multi-branch logic with different validation paths for each provider (OPENROUTER, OLLAMA, BEDROCK, CLAUDE_CODE, AZURE, VERTEX, GEMINI_CLI, CODEX_CLI, LMSTUDIO, OPENAI_COMPATIBLE); verify error handling and baseURL propagation for each provider path
    • scripts/modules/commands.js — Update check control flow now occurs before CLI setup/parse; verify that this reordering doesn't break dependency chains or cause initialization issues
    • src/ai-providers/zai-coding.js and provider wiring — New provider class and registration across multiple integration points; verify consistency across ai-services-unified, config-manager, and constants

Possibly related PRs

  • #1360 — Adds Z.ai/GLM and LMStudio providers with provider-hint model lookup and baseURL handling enhancements
  • #1370 — Implements ZAICodingProvider and wiring across provider index, ai-services-unified, supported-models, and config-manager
  • #1366 — Modifies AI provider system and CLI model setup with provider exports and model selection changes

Suggested reviewers

  • eyaltoledano

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The PR title "Ralph/chore/update.from.main.0.31.0" appears to be formatted as a branch name rather than a descriptive PR title. While the title references version 0.31.0, which is related to the actual changes (the PR bumps the version from 0.31.0-rc.0 to 0.31.0), the majority of the title uses vague and generic phrasing. Terms like "chore" and "update.from.main" do not clearly convey what is actually being changed or why. The title fails to explain that the PR includes significant features such as the addition of ZAI Coding Plan provider support, new auto-update restart functionality, and the finalization of the 0.31.0 release. Consider revising the PR title to be more descriptive of the primary changes and intent. A better title might be something like "Release v0.31.0: Add ZAI Coding Plan provider and improve auto-update flow" or "Finalize v0.31.0 release with ZAI Coding provider and auto-restart updates." This would make it clearer what this PR accomplishes and help maintainers quickly understand the scope when reviewing pull request history.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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 ralph/chore/update.from.main.0.31.0

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

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: 5

Caution

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

⚠️ Outside diff range comments (3)
packages/ai-sdk-provider-grok-cli/CHANGELOG.md (1)

1-11: Five consecutive duplicate "## null" headings violate MD024 linting and indicate changelog corruption.

This changelog contains five identical "## null" section headings with no meaningful content between them. This violates the markdownlint MD024 rule (no-duplicate-heading) and indicates a serious issue with changeset generation or manual editing.

The file should contain at most one changelog entry per version. Please regenerate changelogs using:

npx changeset version --no-commit

and verify the output before committing.

packages/tm-core/CHANGELOG.md (1)

3-14: Investigate multiple "## null" changelog entries.

The changelog contains six "## null" headings (lines 3, 5, 7, 9, 11, 13), which suggests an issue with the changeset automation process where version numbers are not being properly resolved. This could indicate:

  • Changesets not being consumed correctly during version bump
  • Version determination failing during changelog generation
  • Accumulated unresolved changelog entries from multiple releases

Please investigate the changelog generation process and ensure changesets are being properly consumed and version numbers are correctly determined.

scripts/modules/task-manager/models.js (1)

448-654: Handle zai-coding provider hints
When setModel is called with the new zai-coding provider hint, execution falls through to the default branch and throws “Invalid provider hint”, so the freshly added provider cannot be selected through the CLI/MCP flows. Add a branch mirroring the other provider cases that sets determinedProvider = CUSTOM_PROVIDERS.ZAI_CODING (and optionally reuses the internal model metadata for maxTokens) so the hint is accepted instead of blowing up.

-		} else {
-			// Invalid provider hint - should not happen with our constants
-			throw new Error(`Invalid provider hint received: ${providerHint}`);
-		}
+		} else if (providerHint === CUSTOM_PROVIDERS.ZAI_CODING) {
+			determinedProvider = CUSTOM_PROVIDERS.ZAI_CODING;
+			const zaiModelData = availableModels.find(
+				(m) => m.provider === CUSTOM_PROVIDERS.ZAI_CODING && m.id === modelId
+			);
+			if (zaiModelData) {
+				modelData = zaiModelData;
+				report('info', `Setting Z.ai Coding model '${modelId}'.`);
+			} else {
+				warningMessage = `Warning: Z.ai Coding model '${modelId}' not found in supported models. Setting without validation.`;
+				report('warn', warningMessage);
+			}
+		} else {
+			// Invalid provider hint - should not happen with our constants
+			throw new Error(`Invalid provider hint received: ${providerHint}`);
+		}

Comment on lines +17 to +22
## null

### Patch Changes

- Updated dependencies []:
- @tm/core@null
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Malformed changelog with duplicate "## null" entries and invalid dependency versions.

The CHANGELOG.md contains duplicate "## null" sections with identical "Updated dependencies []: @tm/core@null" entries. Version strings should be concrete semantic versions (e.g., "0.31.1"), not "null". This pattern appears across multiple changelog files, suggesting a systematic issue with changeset generation.

Can you verify that the changeset generation process completed correctly? Consider running:

to inspect and potentially regenerate the changelogs with proper version strings. If this is intentional (e.g., pre-release artifact), please clarify in the PR description.


🏁 Script executed:

npx changeset version
npx changeset publish --dry-run

Length of output: 329


🏁 Script executed:

#!/bin/bash
# Check CHANGELOG.md to see the full context
echo "=== apps/mcp/CHANGELOG.md ===" 
cat apps/mcp/CHANGELOG.md | head -30

# Check if .changeset directory exists and list changesets
echo -e "\n=== .changeset directory ===" 
ls -la .changeset/ 2>/dev/null | head -20

# List recent changeset files
echo -e "\n=== Recent changesets ===" 
find .changeset -name "*.md" -type f 2>/dev/null | xargs cat 2>/dev/null | head -50

# Check apps/mcp package.json for version
echo -e "\n=== apps/mcp/package.json version ===" 
grep -A2 '"version"' apps/mcp/package.json 2>/dev/null | head -5

# Check @tm/core package.json for version
echo -e "\n=== packages/tm-core/package.json version ===" 
grep -A2 '"version"' packages/tm-core/package.json 2>/dev/null | head -5

Length of output: 2537


🏁 Script executed:

#!/bin/bash
# Read the actual changeset files
echo "=== light-clowns-hope.md ===" 
cat .changeset/light-clowns-hope.md

echo -e "\n=== polite-jokes-flash.md ===" 
cat .changeset/polite-jokes-flash.md

# Check .changesetrc or config
echo -e "\n=== .changeset/config.json ===" 
cat .changeset/config.json

# Check git status to see what was modified
echo -e "\n=== git diff apps/mcp/CHANGELOG.md (first 50 lines) ===" 
git diff apps/mcp/CHANGELOG.md 2>/dev/null | head -50

Length of output: 1305


🏁 Script executed:

#!/bin/bash
# Check if there are other CHANGELOG files with similar issues
echo "=== CHANGELOGs with 'null' ===" 
find . -name "CHANGELOG.md" -type f ! -path "./node_modules/*" ! -path "./.git/*" \
  -exec sh -c 'if grep -q "## null" "$1"; then echo "$1"; fi' _ {} \;

# Check git status of CHANGELOG files
echo -e "\n=== Git status of CHANGELOG.md files ===" 
git status --porcelain 2>/dev/null | grep CHANGELOG

# Show full CHANGELOG.md to see all duplicates
echo -e "\n=== Full apps/mcp/CHANGELOG.md ===" 
wc -l apps/mcp/CHANGELOG.md
cat apps/mcp/CHANGELOG.md

Length of output: 565


Fix corrupted CHANGELOGs: 6 files contain duplicate "## null" entries from improper changeset version handling.

This is a systematic issue affecting multiple packages:

  • apps/cli/CHANGELOG.md
  • apps/mcp/CHANGELOG.md
  • packages/ai-sdk-provider-grok-cli/CHANGELOG.md
  • packages/build-config/CHANGELOG.md
  • packages/tm-bridge/CHANGELOG.md
  • packages/tm-core/CHANGELOG.md

Each has duplicate "## null" sections with invalid @tm/core@null dependency entries. The root cause: packages with empty version strings ("version": "" in package.json) are not ignored by changesets, so the version command converts empty strings to "null" and creates entries on repeated runs.

Required action: Either add internal packages (@tm/mcp, @tm/core, etc.) to .changeset/config.json ignore list, or assign proper semantic versions. Then regenerate the CHANGELOGs by removing these files and re-running changeset version once.

🤖 Prompt for AI Agents
In apps/mcp/CHANGELOG.md around lines 17-22 there is a duplicated "## null"
entry and an invalid dependency line (`@tm/core@null`) caused by packages with
empty version strings being processed by changesets; fix it by (1) updating
.changeset/config.json to add the internal packages with empty versions (e.g.,
@tm/mcp, @tm/core, and other listed packages) to the "ignore" array OR set
proper semantic versions in their package.json files, (2) delete the corrupted
CHANGELOG.md files listed in the review (apps/cli, apps/mcp,
packages/ai-sdk-provider-grok-cli, packages/build-config, packages/tm-bridge,
packages/tm-core), and (3) re-run the changesets version command once to
regenerate clean changelogs.

Comment on lines +60 to +64
**How to use:**
1. Download and install [LM Studio](https://lmstudio.ai/)
2. Launch LM Studio and download a model (e.g., Llama 3.2, Mistral, Qwen)
3. Optional: Add api key to mcp.json or .env (LMSTUDIO_API_KEY)
4. Go to the "Local Server" tab and click "Start Server"
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Capitalize “API key” for consistency.

Elsewhere you use “API key”. Align this line.

-  3. Optional: Add api key to mcp.json or .env (LMSTUDIO_API_KEY)
+  3. Optional: Add API key to mcp.json or .env (LMSTUDIO_API_KEY)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
**How to use:**
1. Download and install [LM Studio](https://lmstudio.ai/)
2. Launch LM Studio and download a model (e.g., Llama 3.2, Mistral, Qwen)
3. Optional: Add api key to mcp.json or .env (LMSTUDIO_API_KEY)
4. Go to the "Local Server" tab and click "Start Server"
**How to use:**
1. Download and install [LM Studio](https://lmstudio.ai/)
2. Launch LM Studio and download a model (e.g., Llama 3.2, Mistral, Qwen)
3. Optional: Add API key to mcp.json or .env (LMSTUDIO_API_KEY)
4. Go to the "Local Server" tab and click "Start Server"
🤖 Prompt for AI Agents
In CHANGELOG.md around lines 60 to 64, the phrase "api key" is not capitalized
consistently with the rest of the document; change "api key" to "API key" (e.g.,
"Optional: Add API key to mcp.json or .env (LMSTUDIO_API_KEY)") to match the
existing capitalization elsewhere.

Comment on lines +79 to +81
- [#1362](https://github.com/eyaltoledano/claude-task-master/pull/1362) [`3e70edf`](https://github.com/eyaltoledano/claude-task-master/commit/3e70edfa3a1f47bd8a6d2d2a30c20c72f5758b9b) Thanks [@Crunchyman-ralph](https://github.com/Crunchyman-ralph)! - Improve parse PRD schema for better llm model compatiblity
- Fixes #1353

Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Typo: “compatiblity” → “compatibility”.

Fix spelling in the Patch Changes bullet.

- Improve parse PRD schema for better llm model compatiblity
+ Improve parse PRD schema for better LLM model compatibility
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- [#1362](https://github.com/eyaltoledano/claude-task-master/pull/1362) [`3e70edf`](https://github.com/eyaltoledano/claude-task-master/commit/3e70edfa3a1f47bd8a6d2d2a30c20c72f5758b9b) Thanks [@Crunchyman-ralph](https://github.com/Crunchyman-ralph)! - Improve parse PRD schema for better llm model compatiblity
- Fixes #1353
- [#1362](https://github.com/eyaltoledano/claude-task-master/pull/1362) [`3e70edf`](https://github.com/eyaltoledano/claude-task-master/commit/3e70edfa3a1f47bd8a6d2d2a30c20c72f5758b9b) Thanks [@Crunchyman-ralph](https://github.com/Crunchyman-ralph)! - Improve parse PRD schema for better LLM model compatibility
- Fixes #1353
🤖 Prompt for AI Agents
In CHANGELOG.md around lines 79 to 81, the word “compatiblity” in the Patch
Changes bullet is misspelled; update it to “compatibility” so the line reads
“…Improve parse PRD schema for better llm model compatibility”. Ensure only the
spelling is corrected and punctuation/formatting of the bullet remains
unchanged.

Comment on lines 5 to 7
## 0.0.3

## 0.0.3
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Remove duplicate "## 0.0.3" changelog entry.

The changelog contains "## 0.0.3" twice (lines 5 and 7). Deduplicate to keep only one entry.

Apply this diff to remove the duplicate:

 ## 0.0.4

 ## 0.0.3
-
-## 0.0.3

 ## 0.0.2
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## 0.0.3
## 0.0.3
## 0.0.4
## 0.0.3
## 0.0.2
🧰 Tools
🪛 LanguageTool

[grammar] ~5-~5: Hier könnte ein Fehler sein.
Context: ...m/claude-code-plugin ## 0.0.4 ## 0.0.3 ## 0.0.3 ## 0.0.2

(QB_NEW_DE)


[grammar] ~7-~7: Hier könnte ein Fehler sein.
Context: ...ode-plugin ## 0.0.4 ## 0.0.3 ## 0.0.3 ## 0.0.2

(QB_NEW_DE)

🤖 Prompt for AI Agents
In packages/claude-code-plugin/CHANGELOG.md around lines 5 to 7, there is a
duplicated "## 0.0.3" header; remove the extra duplicate so the changelog
contains only a single "## 0.0.3" entry and adjust surrounding blank lines if
needed to keep consistent formatting.

Comment on lines +10 to +15
## null

### Patch Changes

- Updated dependencies []:
- @tm/core@null
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Remove duplicate "## null" Patch Changes block.

The changelog has two identical "## null" sections with the same "Updated dependencies [@tm/core@null]" content. Keep only one entry and remove the duplicate.

Apply this diff to consolidate:

 ## null

 ### Patch Changes

 - Updated dependencies []:
   - @tm/core@null
-
-## null
-
-### Patch Changes
-
-- Updated dependencies []:
-  - @tm/core@null

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

10-10: Multiple headings with the same content

(MD024, no-duplicate-heading)

🤖 Prompt for AI Agents
packages/tm-bridge/CHANGELOG.md lines 10-15: there are duplicate "## null" Patch
Changes sections both listing "Updated dependencies []: - @tm/core@null"; remove
the duplicate block so only one "## null" section remains, ensuring surrounding
headings and spacing remain consistent and that no other content is lost or
reordered.

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