feat: Add baseten support#205
Open
monsieurBoutte wants to merge 1 commit into
Open
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Adds Baseten as a fourth LLM/embedding provider (
provider: "baseten") across language-model workflows andgenerateEmbeddings. Baseten has no baked-in default model — callers must passmodelor setBASETEN_MODEL/BASETEN_EMBEDDING_MODEL. Language models can use Baseten Model APIs or a dedicated OpenAI-compatible/sync/v1deployment URL; embeddings require a dedicated/syncor/sync/v1URL. 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/SupportedEmbeddingProviderextended; Baseten client creation via@ai-sdk/baseten; URL resolution for dedicated deployments;getDefaultLanguageModel/getDefaultEmbeddingModelhelpers; 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.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.--provider basetenadded to CLI examples;DEFAULT_MODELSmadePartialwhere Baseten has no hardcoded default.Suggested review order
src/lib/providers.ts— Provider resolution, URL normalization, and model factory logic; this is the heart of the change.src/workflows/summarization.ts— Transcript-only path for Baseten and the validation/error when no transcript is available on video assets.tests/unit/providers-baseten.test.ts— Confirms expected resolution, eval filtering, and credential/URL behavior.src/env.ts,src/types.ts,src/lib/workflow-credentials.ts— Credential surface area and env var naming.scripts/post-evalite-results.ts— Eval exclusion guard.basetenadditions; spot-checkdocs/CREDENTIALS.mdand 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 andgenerateEmbeddings, wired through@ai-sdk/basetenwith new env vars, runtime credential fields, and URL resolution for Model APIs vs dedicated/sync//sync/v1deployments. Baseten has no library default model—callers must setmodelorBASETEN_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.