feat(providers): add SambaNova and Nebius presets - #870
Conversation
📝 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: 🚥 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
| **SambaNova discovery.** The preset reads SambaCloud's public `/v1/models` list from the fixed API | ||
| host, preserves provider-native ids, and caps discovery at 128 KiB and 128 raw rows. Chat requests | ||
| use the configured Bearer key and disable parallel function calls, which SambaNova does not yet | ||
| support. Private SambaStudio deployment endpoints are out of scope. Create keys in | ||
| [SambaCloud](https://cloud.sambanova.ai/apis). |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Use one canonical name for the SambaNova provider.
The registry and provider tables use SambaNova Cloud, but each discovery paragraph uses SambaCloud. This inconsistency can make the discovery text appear to describe a different provider.
docs-site/src/content/docs/guides/providers.md#L263-L267: useSambaNova Cloudin the English discovery paragraph.docs-site/src/content/docs/ja/guides/providers.md#L186-L190: useSambaNova Cloudin the Japanese discovery paragraph.docs-site/src/content/docs/ko/guides/providers.md#L185-L188: useSambaNova Cloudin the Korean discovery paragraph.docs-site/src/content/docs/ru/guides/providers.md#L195-L199: useSambaNova Cloudin the Russian discovery paragraph.docs-site/src/content/docs/zh-cn/guides/providers.md#L174-L177: useSambaNova Cloudin the Chinese discovery paragraph.
📍 Affects 5 files
docs-site/src/content/docs/guides/providers.md#L263-L267(this comment)docs-site/src/content/docs/ja/guides/providers.md#L186-L190docs-site/src/content/docs/ko/guides/providers.md#L185-L188docs-site/src/content/docs/ru/guides/providers.md#L195-L199docs-site/src/content/docs/zh-cn/guides/providers.md#L174-L177
🤖 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` around lines 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.
Sources: Path instructions, Linters/SAST tools
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".
| modelDiscovery: { | ||
| path: "models", |
There was a problem hiding this comment.
Do not mark public SambaNova probes as valid keys
Because SambaNova's /v1/models endpoint is public, this discovery path returns HTTP 200 even when the supplied Bearer key is invalid. validateApiKey treats every successful models response as true, so ocx login sambanova prints valid and persists typoed or revoked keys, which only fail later on the first chat request. Special-case this public catalog to return "unknown", or validate against an endpoint that actually authenticates the key.
AGENTS.md reference: src/AGENTS.md:L20-L20
Useful? React with 👍 / 👎.
| preserveCustomDestination: true, | ||
| // The public tools guide documents single function selection, not parallel tool calls. | ||
| parallelToolCalls: false, | ||
| modelDiscovery: { |
There was a problem hiding this comment.
Disable unverified reasoning controls for live models
When either new live catalog returns a row without reasoning metadata—as the committed Llama and Qwen fixtures do—catalogHintsFromModelsApiItem leaves reasoningEfforts undefined. applyReasoningLevels interprets that as the full Codex ladder with a medium default, and mapReasoningEffort consequently sends reasoning_effort to these non-reasoning models; this advertises a control the upstream catalog never reported and can make strict OpenAI-compatible endpoints reject otherwise valid requests. Set a provider-wide reasoningEfforts: [] default and opt in only model IDs with verified wire support.
AGENTS.md reference: src/AGENTS.md:L18-L18
Useful? React with 👍 / 👎.
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.
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.
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.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— 6874 pass, 8 skip, 0 failbun run privacy:scancd docs-site && bun run buildgit diff --checkChecklist
MAINTAINERS.md).Summary by CodeRabbit
New Features
Documentation