Skip to content

feat: add Baseten provider support#179

Closed
Joshalphonse wants to merge 2 commits into
muxinc:mainfrom
Joshalphonse:ja/baseten-provider
Closed

feat: add Baseten provider support#179
Joshalphonse wants to merge 2 commits into
muxinc:mainfrom
Joshalphonse:ja/baseten-provider

Conversation

@Joshalphonse

@Joshalphonse Joshalphonse commented Apr 20, 2026

Copy link
Copy Markdown

Summary

  • add Baseten as an OpenAI-compatible language and embedding provider, including env/runtime credential support and base URL normalization
  • reapply the provider work on top of the latest main changes and update docs/examples so Baseten support is reflected across the current codebase
  • add Baseten coverage in unit tests and fix small upstream SDK typing mismatches so the rebased branch typechecks cleanly

Testing

  • npm run typecheck
  • npm exec vitest run tests/unit/providers-baseten.test.ts tests/unit/language-codes.test.ts tests/unit/transcripts.test.ts tests/unit/shots.test.ts

Note

Medium Risk
Adds a new AI provider and updates core model/credential resolution paths, which can affect workflow execution and configuration. Most changes are additive with tests and documentation updates, but misconfiguration of Baseten base URLs/models could surface at runtime.

Overview
Adds Baseten as a first-class provider option for language and embedding workflows, implemented as an OpenAI-compatible backend with required BASETEN_* env/runtime credentials and base-URL normalization.

Updates provider/model resolution utilities to support Baseten defaults (BASETEN_MODEL / BASETEN_EMBEDDING_MODEL with fallbacks), adds Baseten API key handling in workflow credentials/types, and explicitly excludes Baseten from Evalite insights generation for now.

Refreshes docs, env examples, and CLI examples to advertise/select baseten, and adds unit coverage for Baseten model/default/baseURL behavior; also tweaks a few Mux SDK calls and transcript language confidence parsing to keep typechecking clean.

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

Bring the provider integration onto the latest upstream mux/ai changes so the OpenAI-compatible Baseten config, docs, and examples land cleanly on the current codebase.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@snyk-io

snyk-io Bot commented Apr 20, 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.

Comment thread scripts/post-evalite-results.ts

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 58074d7. Configure here.

Comment thread src/lib/providers.ts
const basetenBaseUrl = typeof record.basetenBaseUrl === "string" ? record.basetenBaseUrl : undefined;
const basetenEmbeddingBaseUrl = typeof record.basetenEmbeddingBaseUrl === "string" ? record.basetenEmbeddingBaseUrl : undefined;
const candidates = kind === "embedding" ?
[basetenEmbeddingBaseUrl, env.BASETEN_EMBEDDING_BASE_URL, basetenBaseUrl, env.BASETEN_BASE_URL] :

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Credential-over-env precedence broken for embedding base URL

Medium Severity

The embedding candidate array interleaves credential and env sources: [basetenEmbeddingBaseUrl, env.BASETEN_EMBEDDING_BASE_URL, basetenBaseUrl, env.BASETEN_BASE_URL]. Because candidates.find(Boolean) picks the first truthy value, env.BASETEN_EMBEDDING_BASE_URL can override a credential-provided basetenBaseUrl. This breaks the credential-over-env precedence pattern used everywhere else in the codebase (e.g., API key resolution always prefers credential values over env vars). The credential's generic basetenBaseUrl — intended as a fallback for all Baseten endpoints per the WorkflowCredentials type doc — loses to a stale or unrelated env var.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 58074d7. Configure here.

@monsieurBoutte

Copy link
Copy Markdown
Collaborator

thanks for starting this work! closing in favor of #205

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.

2 participants