Skip to content

feat(providers): add SambaNova as an OpenAI-compatible model provider - #358

Draft
snova-kwasia wants to merge 3 commits into
andrewyng:mainfrom
snova-kwasia:sambanova-complete
Draft

feat(providers): add SambaNova as an OpenAI-compatible model provider#358
snova-kwasia wants to merge 3 commits into
andrewyng:mainfrom
snova-kwasia:sambanova-complete

Conversation

@snova-kwasia

Copy link
Copy Markdown

Why

Add SambaNova Cloud as a first-class model provider in OpenWorker, matching the existing pattern for other OpenAI-compatible vendors (Together AI, Fireworks, OpenRouter).

Root cause

SambaNova was not yet registered as a provider, so users with SambaNova accounts could not configure it in OpenWorker.

Fix

  • registry.py: adds a _compat() descriptor for sambanova using the OpenAI-compatible API at https://api.sambanova.ai/v1 (verified live). Reads key from SAMBANOVA_API_KEY env var; recommended model: Llama 3.3 70B.
  • matrix.py: 9 curated model entries — 6 from the live API catalog (Llama 3.3 70B, DeepSeek V3.1/V3.2, MiniMax M2.7, Gemma 4 31B, GPT-OSS 120B) plus 3 from the official model list (Llama 4 Maverick, Qwen3 72B, DeepSeek V3). All entries tagged _AGENTIC (tool calling + streaming).
  • logos/sambanova.svg: brand SVG mark (indigo-purple gradient circle + SN monogram, matching lobe-icons style).
  • logos.ts: registers the SVG import and adds sambanova to PROVIDER_ORDER.
  • ProviderSetup.tsx: adds console.sambanova.cloud key help URL to the form.

Tests

  • uv run python3 -m pytest tests/test_providers.py tests/test_provider_verify.py tests/test_provider_router.py -x → 75 passed
  • uv run python3 -m pytest tests/ (959 passed, 1 skipped — bedrock test skipped due to missing botocore)
  • ✅ Live API probe: GET https://api.sambanova.ai/v1/models with a real key returns model list correctly
  • ✅ Registry descriptor resolves sambanova by name; build_provider_client("sambanova", ...) returns an OpenAIProvider
  • ✅ Matrix lookup for sambanova:* ids returns correct ModelEntry with _AGENTIC capabilities

Confidence

High — the endpoint was verified live, the implementation follows the exact same _compat pattern as every other OpenAI-compatible vendor, and all existing tests pass.

Authored by a SambaChat managed agent — draft, awaiting human review.

snova-kwasia and others added 3 commits July 30, 2026 16:07
- Added sambanova to registry.py via _compat() helper (OpenAI-compatible API)
- Added 6 SambaNova models to matrix.py (Llama 3.3 70B, DeepSeek V3.1/V3.2, MiniMax M2.7, Gemma 4 31B, GPT-OSS 120B)
- Uses official endpoint https://api.sambanova.ai/v1 with SAMBANOVA_API_KEY env var
Adds SambaNova Cloud as a first-class model provider, using their
OpenAI-compatible API endpoint (api.sambanova.cloud.com/v1). Follows
the same _compat pattern as Together AI, Fireworks AI, and OpenRouter.

Changes:
- registry.py: add _compat() descriptor for sambanova (env: SAMBANOVA_API_KEY,
  recommended model: Llama 4 Maverick)
- matrix.py: add 3 curated SambaNova model entries (Llama 4 Maverick 1M,
  Qwen3 72B, DeepSeek V3)
- logos/sambanova.svg: brand SVG mark (indigo-purple circle + SN monogram)
- logos.ts: register the SVG import and add to PROVIDER_ORDER
- ProviderSetup.tsx: add console.sambanova.cloud key help URL

Users can now connect SambaNova in Settings ▸ Models, just like other
OpenAI-compatible resellers.
…ge fix)

Removes the duplicate _compat() entry for 'sambanova' that was introduced
by a conflicting cherry-pick, keeping the correct .ai endpoint.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant