feat(providers): add Nscale and Vultr presets - #937
Conversation
📝 WalkthroughWalkthroughThe PR adds Nscale and Vultr serverless inference providers with bounded, allowlisted model discovery. It adds registry metadata, fixtures, provider tests, parity coverage, directory metadata, and localized documentation updates. ChangesServerless provider presets
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant ProviderRegistry
participant ModelDiscovery
participant ProviderAPI
Client->>ProviderRegistry: Select Nscale or Vultr preset
ProviderRegistry->>ModelDiscovery: Apply provider discovery settings
ModelDiscovery->>ProviderAPI: Send authenticated /v1/models request
ProviderAPI-->>ModelDiscovery: Return provider model list
ModelDiscovery-->>Client: Return bounded allowlisted models
Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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. Comment |
|
Author update — current head The canonical-preset evidence requested by the umbrella workflow is now explicit in the PR description:
The previously reported validation remains green: 58 focused tests, full suite 7597 pass / 8 skip / 0 fail, typecheck, privacy scan, GUI build, docs build, and This PR remains Draft behind #870 and #872. After those batches land, I will perform the final restack and regenerate the sequential 75 / 64 provider totals. It relates to #572 and does not close the umbrella issue. |
|
Please update to latest branch. Then i will review. |
d717f77 to
5f44310
Compare
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Review readiness checklist
3/4 boxes ticked. Automatic draft conversion failed. Please convert this pull request to a draft manually until every box above is ticked. |
Maintainer rebase and merge preparation (2026-08-06)Rebased onto current Conflicts
Ten documentation conflicts, and one of them is worth flagging: the mechanical merge silently dropped this PR's "Nscale and Vultr discovery" prose paragraph in all five locales. The table rows survived, so a quick skim looked fine — the omission only showed up when grepping for Totals regenerated from the executed registryAll count sites now read 76 = 64 key + 8 OAuth + 3 local + 1 forward. The PR body's predicted "75 / 64" was computed against a 71-preset base that no longer exists. Verification on
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs-site/src/content/docs/guides/providers.md`:
- Line 220: Update docs-site/src/content/docs/guides/providers.md lines 220-220
to describe the catalog as 64 key-based, 8 OAuth, 3 local, and 1 forward preset;
update docs-site/src/content/docs/zh-cn/guides/providers.md lines 135-135
similarly, replacing the default wording with the forward preset wording.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: d0b11cf6-bb13-4c46-ac5f-0728b8db85f3
📒 Files selected for processing (16)
docs-site/src/content/docs/getting-started/quickstart.mddocs-site/src/content/docs/guides/providers.mddocs-site/src/content/docs/ja/getting-started/quickstart.mddocs-site/src/content/docs/ja/guides/providers.mddocs-site/src/content/docs/ko/getting-started/quickstart.mddocs-site/src/content/docs/ko/guides/providers.mddocs-site/src/content/docs/ru/getting-started/quickstart.mddocs-site/src/content/docs/ru/guides/providers.mddocs-site/src/content/docs/zh-cn/getting-started/quickstart.mddocs-site/src/content/docs/zh-cn/guides/providers.mdsrc/providers/free-directory.tssrc/providers/registry.tstests/fixtures/nscale-models.jsontests/fixtures/vultr-models.jsontests/nscale-vultr-provider.test.tstests/provider-registry-parity.test.ts
| ## 3. API-key catalog | ||
|
|
||
| opencodex ships 74 built-in presets: 62 key-based, eight OAuth, three local, and one default | ||
| opencodex ships 76 built-in presets: 64 key-based, eight OAuth, three local, and one default |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Use forward, not default, for the fourth preset category.
Both pages document the correct total but mislabel the fourth category. Replace the default-category wording with forward.
docs-site/src/content/docs/guides/providers.md#L220-L220: changeone defaulttoone forward.docs-site/src/content/docs/zh-cn/guides/providers.md#L135-L135: change1 个默认的to theforwardpreset wording.
As per path instructions, document the catalog as 64 key, 8 OAuth, 3 local, and 1 forward preset.
📍 Affects 2 files
docs-site/src/content/docs/guides/providers.md#L220-L220(this comment)docs-site/src/content/docs/zh-cn/guides/providers.md#L135-L135
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs-site/src/content/docs/guides/providers.md` at line 220, Update
docs-site/src/content/docs/guides/providers.md lines 220-220 to describe the
catalog as 64 key-based, 8 OAuth, 3 local, and 1 forward preset; update
docs-site/src/content/docs/zh-cn/guides/providers.md lines 135-135 similarly,
replacing the default wording with the forward preset wording.
Source: Path instructions
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5f44310059
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| authKind: "key", | ||
| dashboardUrl: "https://console.nscale.com", | ||
| defaultModel: "meta-llama/Llama-3.1-8B-Instruct", | ||
| models: ["meta-llama/Llama-3.1-8B-Instruct"], |
There was a problem hiding this comment.
Route the text-only presets through the vision sidecar
When a turn contains an image, both meta-llama/Llama-3.1-8B-Instruct and Vultr's kimi-k2-instruct are text-only, but neither new registry entry includes its model in noVisionModels. Because applyProviderConfigHints defaults these modality-less catalog rows to text-only and planVisionSidecar only activates for noVisionModels, Codex blocks attachments before the proxy can describe them, while clients that submit images directly send unsupported content upstream. Add both IDs to the registry classification and cover the sidecar/catalog behavior in the focused provider test.
AGENTS.md reference: src/AGENTS.md:L18-L18
Useful? React with 👍 / 👎.
|
Gate note: this PR does not change the gui, so no screenshot applies.
Verified before waiving. |
Roadmap unit for the four open provider-preset PRs under umbrella issue #572, produced by a docs-only PABCD cycle and hardened through five rounds of independent adversarial audit. - 000_plan.md: dependency-ordered work-phase map (#870 -> #872 -> #937, then #812), measured ground truth (dev registry = 70 presets: 58 key, 8 oauth, 3 local, 1 forward), the count-regeneration contract, and amendments A1-A8. - 010/020/030: diff-level rebase, verification, and merge docs per PR. - 040: the Apertis evidence gate and its resolved disposition. Findings that changed the plan: the OAuth narrative in all five locales states six-plus-Copilot while the registry has eight oauth rows including command-code (pre-existing defect, folded into WP1); the measured #870 rebase conflicts only in the ten locale docs while all code applies cleanly; deepinfra is destination-fallback-eligible with an absolute discovery URL, so the invariant is same-origin rather than same-URL; and #870's destination-fallback tests lack negative cases, which WP1 now builds rather than confirms. Refs #572, #870, #872, #937, #812.
Three PRs landed on dev: #870 (bbd82e7), #872 (e50f580), #937 (8ed03e7). The registry went 70 -> 76 presets, measured by executing the module. #812 (Apertis) is not merged and not closed. It meets four of the five canonical preset requirements and fails exactly the aggregator resale/routing authorization clause in MAINTAINERS.md. The prescribed free-directory fallback does not apply either, because that directory only admits free-access groups. Records what the process actually caught: the count contract stopped three real regressions (a stale OAuth number in the incoming diff, a pre-existing wrong OAuth narrative in five locales, and git rerere replaying a stale total), while a dropped documentation paragraph in WP3 was invisible to every automated gate and surfaced only from a grep.
Summary
nscaleandvultrAPI-key presets using their official OpenAI-compatible Chat Completions endpoints/v1/modelsrequests with 256 KiB / 256 raw-row ceilings and exact official tool-model allowlistsProvider evidence and scope
meta-llama/Llama-3.1-8B-Instruct, the exact model in the official tool-calling API example.kimi-k2-instruct, so other catalog rows remain hidden.Both presets use
Authorization: Bearer <key>, reject redirects during key validation, keepparallelToolCalls: false, and advertise no reasoning ladder until provider-specific tiers are documented. Maintenance owner: @olddonkey; no affiliation with either provider.Verification date: 2026-08-03.
Sequencing
This PR remains Draft behind #870 and #872. It is currently based on standalone
devtotals of 71 presets / 60 key presets; after those two batches land, a final restack will regenerate the sequential totals as 75 / 64.Security boundary
This PR adds two canonical credential destinations, so explicit maintainer security review is requested. Vultr's publicly linked legal terms are service-wide rather than a Serverless-Inference-specific addendum, so the contracting/routing evidence is stated explicitly above for maintainer judgment. Registry-only discovery and collision policy is not persisted into
config.json. Existing same-named custom providers retain their configured host and adapter, so a stored key cannot be silently redirected to either new endpoint.Validation
bun run typecheckbun test --isolate tests/nscale-vultr-provider.test.ts tests/provider-registry-parity.test.ts tests/provider-model-discovery-contract.test.ts— 58 pass, 0 failbun test --isolate tests— 7597 pass, 8 skip, 0 fail across 505 filesbun run privacy:scanbun run build:guicd docs-site && bun run buildgit diff --checkRelates to #572. This PR intentionally does not close the umbrella issue.
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit
New Features
Documentation