Skip to content

feat: Add baseten support#205

Open
monsieurBoutte wants to merge 1 commit into
mainfrom
vb/add-baseten-provider
Open

feat: Add baseten support#205
monsieurBoutte wants to merge 1 commit into
mainfrom
vb/add-baseten-provider

Conversation

@monsieurBoutte

@monsieurBoutte monsieurBoutte commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Overview

Adds Baseten as a fourth LLM/embedding provider (provider: "baseten") across language-model workflows and generateEmbeddings. Baseten has no baked-in default model — callers must pass model or set BASETEN_MODEL / BASETEN_EMBEDDING_MODEL. Language models can use Baseten Model APIs or a dedicated OpenAI-compatible /sync/v1 deployment URL; embeddings require a dedicated /sync or /sync/v1 URL. Baseten is wired for runtime use but excluded from eval runs for now. Summarization with Baseten is transcript-only (no storyboard frames), even for video assets.

What was changed

  • src/lib/providers.ts — Core integration: SupportedProvider / SupportedEmbeddingProvider extended; Baseten client creation via @ai-sdk/baseten; URL resolution for dedicated deployments; getDefaultLanguageModel / getDefaultEmbeddingModel helpers; eval model lists skip Baseten.
  • src/env.ts, src/types.ts, src/lib/workflow-credentials.ts — New Baseten env vars and per-request credential fields (basetenApiKey, basetenModelUrl, basetenEmbeddingModelUrl, etc.).
  • src/workflows/summarization.ts — Baseten forces transcript-only analysis; validates transcript is present for video assets; audio-only prompts generalized from "audio content" to "transcript content".
  • package.json — Adds @ai-sdk/baseten.
  • tests/unit/providers-baseten.test.ts — Unit tests for model resolution, eval exclusion, credential/URL wiring, and embedding defaults.
  • scripts/post-evalite-results.ts — Explicit error if Baseten is requested for eval insights.
  • Docs (README.md, docs/API.md, docs/CREDENTIALS.md, docs/EVALS.md, docs/WORKFLOWS.md) — Baseten listed as a supported provider; credential setup documented; eval exclusion noted.
  • Examples--provider baseten added to CLI examples; DEFAULT_MODELS made Partial where Baseten has no hardcoded default.

Suggested review order

  1. src/lib/providers.ts — Provider resolution, URL normalization, and model factory logic; this is the heart of the change.
  2. src/workflows/summarization.ts — Transcript-only path for Baseten and the validation/error when no transcript is available on video assets.
  3. tests/unit/providers-baseten.test.ts — Confirms expected resolution, eval filtering, and credential/URL behavior.
  4. src/env.ts, src/types.ts, src/lib/workflow-credentials.ts — Credential surface area and env var naming.
  5. scripts/post-evalite-results.ts — Eval exclusion guard.
  6. Docs and examples — Mostly mechanical baseten additions; spot-check docs/CREDENTIALS.md and README Baseten setup section for accuracy.

Note

Medium Risk
Touches core provider resolution and credential paths used by many workflows; Baseten summarization behavior change (transcript-only for video) and deployment URL requirements can surprise callers if misconfigured.

Overview
Adds Baseten as provider: "baseten" for language-model workflows and generateEmbeddings, wired through @ai-sdk/baseten with new env vars, runtime credential fields, and URL resolution for Model APIs vs dedicated /sync / /sync/v1 deployments. Baseten has no library default model—callers must set model or BASETEN_MODEL / BASETEN_EMBEDDING_MODEL; embeddings require a dedicated deployment URL.

Summarization with Baseten uses transcript-only analysis (no storyboard), including for video assets, and errors when no transcript is available. Audio-only summarization prompts are generalized from “audio content” to “transcript content.”

Baseten is excluded from eval model iteration (filtered from MUX_AI_EVAL_MODELS, not in default/all sets); post-eval insights reject Baseten explicitly. Docs, examples, and API types list Baseten alongside existing providers; unit tests cover model resolution, URL normalization, and eval filtering.

Reviewed by Cursor Bugbot for commit ac90125. Bugbot is set up for automated code reviews on this repo. Configure here.

@snyk-io

snyk-io Bot commented Jun 18, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

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