feat(providers): add SambaNova and Nebius presets - #870
Conversation
|
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:
📝 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)
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. |
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— 7600 pass, 8 skip, 0 failbun run privacy:scancd docs-site && bun run buildgit diff --checkChecklist
MAINTAINERS.md).Summary by CodeRabbit
New Features
Documentation