GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(providers): add NVIDIA NIM and Z.ai providers by waleedlatif1 · Pull Request #5560 · simstudioai/sim

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add NVIDIA NIM as a new BYOK provider — Nemotron model family (llama-3.1-nemotron-70b-instruct, llama-3.1-nemotron-ultra-253b-v1, llama-3.3-nemotron-super-49b-v1.5, nemotron-3-nano-30b-a3b, nemotron-3-super-120b-a12b, nemotron-3-ultra-550b-a55b) via NVIDIA's OpenAI-compatible NIM endpoint (integrate.api.nvidia.com)
  • Add Z.ai as a new hosted provider (Sim provides the key, same tier as openai/anthropic/google) — GLM model family (glm-5.2 down to glm-4-32b-0414-128k) via api.z.ai's OpenAI-compatible endpoint, bare glm-* model ids with no provider prefix, matching how openai/anthropic models are named
  • Z.ai's tool_choice is 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 API
  • Wired Z.ai into the hosted-key rotation system (ZAI_API_KEY_1/2/3) alongside the existing openai/anthropic/gemini/cohere rotation
  • Ran a full /validate-model-style audit against both providers' live docs before shipping — caught and fixed a duplicate recommended flag on each provider, a missing thinking capability on glm-5-turbo, a stale default model on nvidia, and the tool_choice mismatch above

Type of Change

  • New feature

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 errors
  • biome check — clean
  • Tested manually via the model dropdown/config wiring; no live API key exercised

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
waleedlatif1 and others added 30 commits April 3, 2026 23:30
@waleedlatif1
v0.6.23: MCP fixes, remove local state in favor of server state, moth…
0b9019d
…ership workflow edits via sockets, ui improvements
@waleedlatif1
v0.6.24: copilot feedback wiring, captcha fixes
a54dcbe
@waleedlatif1
v0.6.25: cloudwatch, cloudformation, live kb sync, linear fixes, post…
28af223
…hog upgrade
@waleedlatif1
v0.6.26: ui improvements, multiple response blocks, docx previews, ol…
d889f32
…lama fix
@waleedlatif1
v0.6.27: new triggers, mothership improvements, files archive, queuei…
316bc8c
…ng improvements, posthog, secrets mutations
@waleedlatif1
v0.6.28: new docs, delete confirmation standardization, dagster integ…
3f508e4
…ration, signup method feature flags, SSO improvements
@TheodoreSpeaks
v0.6.29: login improvements, posthog telemetry (#4026)
d6ec115
* feat(posthog): Add tracking on mothership abort (#4023)

Co-authored-by: Theodore Li <[email protected]>

* fix(login): fix captcha headers for manual login  (#4025)

* fix(signup): fix turnstile key loading

* fix(login): fix captcha header passing

* Catch user already exists, remove login form captcha
@waleedlatif1
v0.6.30: slack trigger enhancements, connectors performance improveme…
d7da35b
…nts, secrets performance, polling refactors, drag resources in mothership
@waleedlatif1
v0.6.31: elevenlabs voice, trigger.dev fixes, cloud whitelabeling for…
cf233bb
… enterprises
@waleedlatif1
v0.6.32: BYOK fixes, ui improvements, cloudwatch tools, jsm tools ext…
f8f3758
…ension
@waleedlatif1
v0.6.33: polling improvements, jsm forms tools, credentials reactquer…
3c8bb40
…y invalidation, HITL docs
@waleedlatif1
v0.6.34: trigger.dev fixes, CI speedup, atlassian error extractor
d33acf4
@waleedlatif1
v0.6.35: additional jira fields, HITL docs, logs cleanup efficiency
4f40c4c
@waleedlatif1
v0.6.36: new chunkers, sockets state machine, google sheets/drive/cal…
cbfab1c
…endar triggers, docs updates, integrations/models pages improvements
@waleedlatif1
v0.6.37: audit logs page, isolated-vm worker rotation, permission gro…
4309d06
…ups ui
@waleedlatif1
v0.6.38: models page
8b57476
@waleedlatif1
v0.6.39: billing fixes, tools audit, landing fix
e3d0e74
@waleedlatif1
v0.6.40: mothership tool loop, new skills, agiloft, STS, IAM integrat…
0ac0539
…ions, jira forms endpoints
@waleedlatif1
v0.6.41: webhooks fix, workers removal
3838b6e
@waleedlatif1
v0.6.42: mothership nested file reads, search modal improvements
fc07922
@waleedlatif1
v0.6.43: mothership billing idempotency, env var resolution fixes
3a1b1a8
@waleedlatif1
v0.6.44: streamdown, mothership intelligence, excel extension
46ffc49
@Sg312
v0.6.45: superagent, csp, brightdata integration, gemini response for…
010435c
…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)
@icecrasher321
Merge pull request #4190 from simstudioai/staging
c0bc62c
v0.6.46: mothership streaming fixes, brightdata integration
@waleedlatif1
v0.6.46: mothership queueing, web vitals
387cc97
@waleedlatif1
v0.6.47: files focusing, documentation, opus 4.7
2dbc7fd
@waleedlatif1
v0.6.48: import csv into tables, subflow fixes, CSP updates
8a50f18
@waleedlatif1
v0.6.49: deploy sockets event, resolver, logs improvements, monday.co…
dcf3302
…m integration, atlassian triggers
@icecrasher321
v0.6.50: ppt/doc/pdf worker isolation, docs, chat, sidebar improvements
bc09865
@waleedlatif1
v0.6.51: tables improvements, billing fixes, 404 pages, code hygiene
5f56e46
waleedlatif1 added 6 commits July 6, 2026 23:42
@waleedlatif1
v0.7.24: frontend perf improvements, md editor fixes, mailer fix, too…
62d3140
…ls audit
@waleedlatif1
v0.7.25: new tools, gmail send fixes, email lifecycle adjustments
21ee602
@waleedlatif1
v0.7.26: API block default headers fix, tables perf and correctness, …
9d44d42
…landing redesign
@waleedlatif1
v0.7.27: document tags improvements, grok 4.5, forking, custom blocks…
067d3b0
…, library, typescript 7, jupyter notebook, o11y, meta muse, gpt 5.6
@waleedlatif1
v0.7.28: rich markdown editor improvements, autosave in files, helm i…
e2fecc8
…mprovements
@waleedlatif1
feat(providers): add NVIDIA NIM and Z.ai providers
9037649
- 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
@vercel

vercel Bot commented Jul 10, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jul 10, 2026 4:08pm

Request Review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cursor

cursor Bot commented Jul 10, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

PR Summary

Medium Risk
Z.ai hosted keys and BYOK affect billing and credential paths for all GLM catalog models; the large new provider adapters touch core execution (tools, streaming, structured output) though they follow existing OpenAI-compatible patterns.

Overview
Adds NVIDIA NIM and Z.ai as first-class LLM providers, with catalog entries, icons, registry wiring, and OpenAI-compatible adapters (NIM at integrate.api.nvidia.com, Z.ai at api.z.ai).

NVIDIA ships six nvidia/* Nemotron models (pattern ^nvidia/), tool calling, streaming, and deferred json_schema when tools are active. Attachments are explicitly unsupported like other text-only adapters.

Z.ai ships twelve bare glm-* models with empty modelPatterns so self-hosted glm-* IDs are not misrouted. GLM models are added to getHostedModels() with ZAI_API_KEY_1/2/3 rotation, hosted-key resolution in providers/utils and BYOK (zai in contracts). The Z.ai adapter maps thinking / reasoning_effort, uses json_object instead of strict JSON schema, and always sends tool_choice: 'auto' (forced/none choices are ignored with a warning); post-tool streaming/format calls drop tools rather than using tool_choice: 'none'.

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@greptile-apps

greptile-apps Bot commented Jul 10, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds NVIDIA NIM and Z.ai as model providers. The main changes are:

  • New NVIDIA NIM and Z.ai provider adapters.
  • New Nemotron and GLM model catalog entries.
  • Z.ai hosted-key rotation and BYOK wiring.
  • Provider registry, icon, attachment, and tokenization updates.
  • Tests for provider definitions and model routing.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
apps/sim/providers/models.ts Adds NVIDIA and Z.ai model definitions and exact Z.ai catalog routing.
apps/sim/providers/zai/index.ts Adds the Z.ai request adapter with hosted GLM request handling and tool filtering.
apps/sim/providers/nvidia/index.ts Adds the NVIDIA NIM request adapter for Nemotron models.
apps/sim/lib/api-key/byok.ts Adds Z.ai to hosted-key and workspace BYOK lookup.
apps/sim/lib/core/config/api-keys.ts Adds Z.ai rotating-key support.

Reviews (4): Last reviewed commit: "fix(providers): route Z.ai through the w..." | Re-trigger Greptile

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

greptile-apps[bot]
greptile-apps Bot reviewed Jul 10, 2026
View reviewed changes
Comment thread apps/sim/providers/models.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1
fix(providers): scope zai model routing to the exact catalog
f6c0117
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.
@vercel
vercel Bot temporarily deployed to Preview July 10, 2026 15:33 Inactive
@waleedlatif1

waleedlatif1 commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator Author

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:

  • request.tools is passed through prepareToolsWithUsageControl, which filters OUT any tool whose usageControl === 'none' before returning filteredTools.
  • If every tool is disabled, filteredTools.length === 0 and the function takes its early-return branch, returning { tools: undefined, toolChoice: undefined, ... } — not an empty array.
  • zai/index.ts's guard is if (filteredTools?.length && toolChoice) — with filteredTools undefined, filteredTools?.length is undefined (falsy), so the block is skipped entirely and payload.tools is never set. Z.ai receives no tools field at all and has nothing to call.
  • If only some tools are disabled, the remaining (still-enabled) ones are sent with tool_choice: 'auto' — which is exactly the intended "let the model pick among the tools that are actually enabled" behavior, not a bypass of the disabled ones.

This filtering logic is unmodified shared code (prepareToolsWithUsageControl in providers/utils.ts), identical to how sakana/openai already handle usageControl: 'none' — my change only touches what tool_choice value gets sent for the tools that remain after filtering, not which tools are filtered. Happy to add a regression test here if useful, but wanted to flag the reasoning before making a speculative code change. Let me know if I'm missing a path where this actually triggers.

Fixed the P2 finding (/^glm/ overmatching unrelated self-hosted models) in f6c0117 — thread resolved.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1

waleedlatif1 commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator Author

@greptile

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1

waleedlatif1 commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator Author

@cursor review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Jul 10, 2026
View reviewed changes
Comment thread apps/sim/providers/zai/index.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1
fix(providers): wire thinking/reasoning_effort into Z.ai requests
24df698
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.
@vercel
vercel Bot temporarily deployed to Preview July 10, 2026 16:00 Inactive
@waleedlatif1

waleedlatif1 commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator Author

@greptile

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1

waleedlatif1 commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator Author

@cursor review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Jul 10, 2026
View reviewed changes
Comment thread apps/sim/providers/utils.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1
fix(providers): route Z.ai through the workspace BYOK resolver too
bb0a944
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.
@vercel
vercel Bot temporarily deployed to Preview July 10, 2026 16:08 Inactive
@waleedlatif1

waleedlatif1 commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator Author

@greptile

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1

waleedlatif1 commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator Author

@cursor review

cursor[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Jul 10, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

✅ 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@waleedlatif1
waleedlatif1 merged commit 2986362 into staging Jul 10, 2026
18 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1
waleedlatif1 deleted the worktree-nvidia-provider-research branch July 10, 2026 16:15
This was referenced Jul 10, 2026
v0.7.29: GLM, ui and ux improvements #5567
Merged
fix(providers): correct max-tokens param and add schema guidance for NVIDIA/Z.ai #5569
Merged

This branch was previously deployed

1 inactive deployment
Preview — bb0a9447 Deployed Jul 10, 2026 by vercel[bot]
View deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@greptile-apps greptile-apps[bot] greptile-apps[bot] left review comments
@cursor cursor[bot] cursor[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@waleedlatif1 @TheodoreSpeaks @Sg312 @icecrasher321
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.