feat(providers): add NVIDIA NIM and Z.ai providers#5560
Conversation
…ership workflow edits via sockets, ui improvements
…ng improvements, posthog, secrets mutations
…ration, signup method feature flags, SSO improvements
…nts, secrets performance, polling refactors, drag resources in mothership
…y invalidation, HITL docs
…endar triggers, docs updates, integrations/models pages improvements
…ions, jira forms endpoints
…mat, logs performance improvements fix(csp): add missing analytics domains, remove unsafe-eval, fix workspace CSP gap (#4179) fix(landing): return 404 for invalid dynamic route slugs (#4182) improvement(seo): optimize sitemaps, robots.txt, and core web vitals across sim and docs (#4170) fix(gemini): support structured output with tools on Gemini 3 models (#4184) feat(brightdata): add Bright Data integration with 8 tools (#4183) fix(mothership): fix superagent credentials (#4185) fix(logs): close sidebar when selected log disappears from filtered list; cleanup (#4186)
v0.6.46: mothership streaming fixes, brightdata integration
…m integration, atlassian triggers
…, library, typescript 7, jupyter notebook, o11y, meta muse, gpt 5.6
- NVIDIA NIM (BYOK): Nemotron model family (70B/Ultra-253B/Super-49B v1.5, Nemotron-3 Nano/Super/Ultra) via integrate.api.nvidia.com's OpenAI-compatible API - Z.ai (hosted): GLM model family (5.2 down to 4-32B) via api.z.ai's OpenAI-compatible API, bare glm-* model ids with no provider prefix, Sim-provided key rotation (ZAI_API_KEY_1/2/3) matching openai/anthropic/google - Z.ai tool_choice is forced to 'auto' since the API only documents auto support; forced/none tool_choice from prepareToolsWithUsageControl is ignored with a warning log instead of being sent to the API
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview NVIDIA ships six Z.ai ships twelve bare Shared plumbing updates tokenization heuristics, attachment provider lists, and tests for both catalogs plus Z.ai hosted routing. Reviewed by Cursor Bugbot for commit bb0a944. Configure here. |
Greptile SummaryThis PR adds NVIDIA NIM and Z.ai as model providers. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (4): Last reviewed commit: "fix(providers): route Z.ai through the w..." | Re-trigger Greptile |
Drop the /^glm/ fallback pattern - it would overmatch any unrelated self-hosted "glm-*" model (e.g. a custom vLLM/LiteLLM deployment) and misroute it to Z.ai's hosted, Sim-billed key. Routing now relies solely on the exact model-id match against zai's static catalog.
|
Re: Greptile's P1 "Disabled Tools Become Auto" finding (flagged outside the diff, in the summary) — traced this through and don't think it reproduces:
This filtering logic is unmodified shared code ( Fixed the P2 finding ( |
|
@cursor review |
request.thinkingLevel and request.reasoningEffort were computed but never mapped onto the Z.ai payload, so the thinking toggle and GLM-5.2's reasoning_effort control silently no-op'd and always ran on Z.ai's server-side default instead of the user's selection.
|
@cursor review |
getApiKeyWithBYOK (the resolver actually used by workspace provider runs, per providers/index.ts) only rotated server keys for openai/anthropic/google/mistral, so GLM calls without a user apiKey failed even with ZAI_API_KEY_1/2/3 configured — getApiKey in providers/utils.ts had zai wired but that's not the codepath workspace runs go through. Add zai to the hosted-check condition, and register it as a BYOKProviderId so a workspace can also bring its own Z.ai key.
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit bb0a944. Configure here.
Summary
glm-*model ids with no provider prefix, matching how openai/anthropic models are namedtool_choiceis forced to'auto'since the API only documents auto support (forcing a specific function or'none'is rejected) — force/none from the tool-usage-control UI is ignored with a warning log instead of erroring against the live APIZAI_API_KEY_1/2/3) alongside the existing openai/anthropic/gemini/cohere rotation/validate-model-style audit against both providers' live docs before shipping — caught and fixed a duplicaterecommendedflag on each provider, a missingthinkingcapability on glm-5-turbo, a stale default model on nvidia, and the tool_choice mismatch aboveType of Change
Testing
bunx vitest run providers/models.test.ts— 18/18 passing (added coverage for both new providers, including hosted-model + routing assertions for zai)tsc --noEmit— zero new type errorsbiome check— cleanChecklist