feat(providers): add SambaNova and Nebius presets - #870
Conversation
|
Caution Review failedThe pull request is closed. Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (19)
📝 WalkthroughWalkthroughAdded SambaNova Cloud and Nebius Token Factory provider presets with live model discovery, filtering, routing, authentication, modality handling, tests, and localized documentation. ChangesProvider support
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant Client
participant ProviderRegistry
participant ModelDiscovery
participant ProviderAPI
Client->>ProviderRegistry: select SambaNova or Nebius
ProviderRegistry->>ModelDiscovery: apply endpoint and filtering rules
ModelDiscovery->>ProviderAPI: fetch provider model catalog
ProviderAPI-->>ModelDiscovery: return model metadata
ModelDiscovery-->>ProviderRegistry: return filtered models and modalities
ProviderRegistry-->>Client: route requests with provider credentials
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 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 |
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`:
- Around line 263-267: Use the canonical provider name “SambaNova Cloud” in the
discovery paragraphs at docs-site/src/content/docs/guides/providers.md:263-267,
docs-site/src/content/docs/ja/guides/providers.md:186-190,
docs-site/src/content/docs/ko/guides/providers.md:185-188,
docs-site/src/content/docs/ru/guides/providers.md:195-199, and
docs-site/src/content/docs/zh-cn/guides/providers.md:174-177, replacing
“SambaCloud” while preserving the surrounding content.
🪄 Autofix (Beta)
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: 166f3977-fc25-44f9-a43f-bacb1df2498e
📒 Files selected for processing (18)
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/codex/catalog/provider-fetch.tssrc/providers/free-directory.tssrc/providers/registry.tstests/fixtures/nebius-models.jsontests/fixtures/sambanova-models.jsontests/provider-model-discovery-contract.test.tstests/provider-registry-parity.test.tstests/sambanova-nebius-provider.test.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 42d08ac5a0
ℹ️ 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".
42d08ac to
0c41341
Compare
0c41341 to
1213c09
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/ja/getting-started/quickstart.md`:
- Around line 16-17: Update the Japanese setup step in the quickstart so it uses
“71 個の組み込みレジストリプリセット” and places “ベース URL とアダプター” before “入力します”, preserving the
English source meaning and natural Japanese grammar.
In `@src/providers/free-directory.ts`:
- Line 135: Add a modelsUrl property to the nebius entry in the provider
directory, using the discovery URL
https://api.tokenfactory.nebius.com/v1/models?verbose=true with the required
verbose=true query parameter, consistent with the modelDiscovery configuration
and the SambaNova entry.
🪄 Autofix (Beta)
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: a06896d4-b5e7-47ee-a497-c59b14199378
📒 Files selected for processing (18)
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/codex/catalog/provider-fetch.tssrc/providers/free-directory.tssrc/providers/registry.tstests/fixtures/nebius-models.jsontests/fixtures/sambanova-models.jsontests/provider-model-discovery-contract.test.tstests/provider-registry-parity.test.tstests/sambanova-nebius-provider.test.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1213c092b9
ℹ️ 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".
51cb9d1 to
7baee6e
Compare
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 `@src/providers/model-discovery.ts`:
- Around line 128-134: Restrict the fallback in model-discovery.ts around
getProviderRegistryEntry and registryEntryForProviderDestination so
destination-based discovery is used only when the provider name is unknown;
known names with a transport mismatch must return no registry discovery spec.
Add focused regression coverage in tests/sambanova-nebius-provider.test.ts at
lines 278-303 using a sambanova-named Nebius-endpoint configuration and assert
it does not inherit Nebius discovery metadata.
🪄 Autofix (Beta)
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: d9fce4c7-3b48-4578-aac3-a7442cc34a80
📒 Files selected for processing (5)
docs-site/src/content/docs/ja/getting-started/quickstart.mdsrc/providers/free-directory.tssrc/providers/model-discovery.tstests/provider-model-discovery-contract.test.tstests/sambanova-nebius-provider.test.ts
7baee6e to
b454bba
Compare
|
Author update — current head All review feedback received through this revision has been addressed:
Validation: This PR is Ready for review. Explicit maintainer security sign-off remains requested because it adds canonical credential destinations. It relates to #572 and does not close the umbrella issue. |
[GD] Verdict: changes-requestedPR: Semantic propagation
Linked: none (relates to UsefulnessReal value: two widely used first-party providers become canonical key presets with registry-owned discovery, correct key-validation semantics, conservative reasoning/parallel-tool defaults, and documentation parity across five locales. Matches the next same-shape batch under #572. Bugs / correctness
Security
Spec / standards
Reviews
Base / CI
Simplification (for the PR owner)Nothing structural worth changing. Optional micro-candidates (behavior-preserving; not applied - foreign PR):
Gatenone (not draft/WIP) Bottom lineUseful, well-tested, security-sound preset batch. Ship after: (1) update from latest |
b454bba to
59d551c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 59d551c0ad
ℹ️ 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".
| const namedEntry = getProviderRegistryEntry(providerName); | ||
| const entry = namedEntry | ||
| ? (providerMatchesRegistryTransport(providerName, provider) ? namedEntry : undefined) | ||
| : registryEntryForProviderDestination(provider); |
There was a problem hiding this comment.
Apply defaults to renamed fixed presets
Although this recovers the registry-owned discovery URL/filter for a renamed SambaNova or Nebius row, the same destination-resolved entry is not used by the POST enrichment or by routeModel, both of which still key off the saved provider name. When the dashboard preset is saved as nebius-team, the row gets the verbose filtered catalog but does not inherit reasoningEfforts: [] or parallelToolCalls: false, so the catalog/request path falls back to advertising reasoning/parallel tools and the OpenAI chat adapter can send reasoning_effort and parallel_tool_calls: true to the exact provider this preset says cannot use them. Reuse the destination-resolved registry entry for the non-discovery defaults as well, or persist those defaults when saving a renamed preset.
Useful? React with 👍 / 👎.
| preserveCustomDestination: true, | ||
| apiKeyValidation: "unknown", | ||
| // SambaNova documents this request field but does not yet support parallel function calls. | ||
| parallelToolCalls: false, |
There was a problem hiding this comment.
Preserve tool-call opt-out in key-login configs
When a user runs ocx login sambanova or ocx login nebius before a proxy is already running, providerConfigFromKeyLoginProvider writes the key-login DTO directly to disk and never passes through the POST enrichment path; that DTO carries reasoningEfforts: [] but does not include parallelToolCalls. The saved canonical provider still routes requests with the registry opt-out, but gatherRoutedModels reads the un-enriched config and applyProviderConfigHints defaults openai-chat rows to parallelToolCalls: true, so the Codex catalog advertises an unsupported tool capability until the provider is re-added through a path that seeds the full registry config. Add parallelToolCalls to the key-login derivation/copy path for registry presets that set it.
Useful? React with 👍 / 👎.
|
Please update to latest branch. Then i will review. |
The destination fallback added here lets a canonical preset saved under an unknown name recover its registry-owned discovery policy by transport. The existing coverage proved only that a renamed row picks up a path and query; it never asserted the filter, and it had no negative cases at all. Adds five tests, each driven red once against a real sabotage: - recovers path, query AND filter (literal expectations, not a re-read of the same registry row \u2014 the first formulation compared the spec against itself and stayed green when the filter was replaced) - refuses a name that matches a registry entry whose transport does not - refuses OAuth destinations reached by an unknown name - refuses non-key auth modes, templated base URLs, and overridable destinations - keeps every fallback-eligible absolute discovery URL same-origin with its own base URL The last one closes a real gap: an absolute spec.url overrides the configured base, so a cross-origin one on a fallback-eligible row would send a user's key to an origin they never configured. DeepInfra is the current instance (base /v1/openai, discovery /v1/models, same origin) and the test pins that invariant. Also corrects the OAuth narrative in all five locales: it said six presets plus Copilot while the registry has eight OAuth rows, and the command list omitted ocx login command-code. Pre-existing on dev, corrected here because this change rewrites the surrounding preset counts.
59d551c to
4c9c64b
Compare
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. This pull request is already Ready for Review. |
|
✅ Deterministic PR hygiene checks passed. |
Maintainer rebase and merge preparation (2026-08-06)Rebased onto current Preset totals were regenerated from the executed registry, not from this PR's bodyThis mattered. The incoming diff wrote Two corrections folded in
Verification on
|
|
|
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
Tip For best results, initiate chat on the files or code changes.
You are interacting with an AI system. |
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
GET https://api.sambanova.ai/v1/models, 128 KiB / 128 raw rows.GET https://api.tokenfactory.nebius.com/v1/models?verbose=true, 512 KiB / 512 raw rows, retaining onlyarchitecture.modalityvalues that produce text.Relates to #572. This PR intentionally does not close the umbrella issue.
Canonical preset evidence
Maintenance owner: @olddonkey. No affiliation with either provider.
Verification date: 2026-08-02.
SambaNova's models catalog is currently public: the key-login probe verifies the canonical endpoint/catalog is reachable, but that public response alone cannot prove a supplied key is valid. Chat requests still authenticate with the configured Bearer key.
The shared
apiKeyValidation: "unknown"contract is inherited from merged PR #923; this PR only opts the SambaNova registry entry into that policy and retains the provider regression test.Security and compatibility
config.jsonor the key-login map.preserveCustomDestinationprevents an existing same-named custom provider from silently sending its stored key to a newly canonical host.baseUrl+ adapter match; custom endpoints, OAuth rows, templates, and overridable destinations do not inherit it.Verification
bun run typecheckbun test tests/sambanova-nebius-provider.test.ts tests/provider-model-discovery-contract.test.ts tests/provider-registry-parity.test.tsbun run test— 8343 pass, 8 skip, 0 failbun run privacy:scancd docs-site && bun run buildgit diff --checkChecklist
MAINTAINERS.md).Summary by CodeRabbit
New Features
Documentation
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.