Skip to content

fix: add provider prefix to zai-coding-plan default model#456

Merged
jamiepine merged 1 commit into
spacedriveapp:mainfrom
tomasmach:fix/zai-coding-plan-default-model
Mar 20, 2026
Merged

fix: add provider prefix to zai-coding-plan default model#456
jamiepine merged 1 commit into
spacedriveapp:mainfrom
tomasmach:fix/zai-coding-plan-default-model

Conversation

@tomasmach

@tomasmach tomasmach commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The Z.AI Coding Plan defaultModel in the frontend provider list was "glm-5" instead of "zai-coding-plan/glm-5"
  • This caused model_matches_provider to fail because provider_from_model("glm-5") returns "anthropic" (the default when there's no / separator), not "zai-coding-plan"
  • The provider test endpoint rejected the request before ever hitting the Z.AI API, causing a 500 when trying to save the key in the UI
  • Every other provider already uses the correct prefixed format

Test plan

  • Open Settings, add a Z.AI Coding Plan API key, and verify the model test passes
  • Verify the key saves successfully after passing the test

@coderabbitai

coderabbitai Bot commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 81b4af17-fd55-4033-84d0-016799f1d081

📥 Commits

Reviewing files that changed from the base of the PR and between b195e7d and 99382c2.

📒 Files selected for processing (1)
  • interface/src/routes/Settings.tsx

Walkthrough

Updated the default model identifier for the zai-coding-plan provider in Settings from the unqualified "glm-5" to the fully-qualified "zai-coding-plan/glm-5", affecting the initial model selection displayed when adding or editing this provider.

Changes

Cohort / File(s) Summary
Settings UI Configuration
interface/src/routes/Settings.tsx
Updated defaultModel value for the zai-coding-plan provider from "glm-5" to "zai-coding-plan/glm-5" to use the fully-qualified model identifier.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and accurately summarizes the main change: adding a provider prefix to the zai-coding-plan default model identifier.
Description check ✅ Passed The description provides relevant context about the bug, its root cause, and includes a test plan demonstrating verification of the fix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@jamiepine jamiepine merged commit 462bf6c into spacedriveapp:main Mar 20, 2026
5 checks passed
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