generate_studio_providers

command
v0.18.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Command generate_studio_providers derives the STUDIO_PROVIDERS snapshot embedded in the studio bridge (sprout-studio/shared/studio-bridge.js) from the provider registry, eliminating the hand-maintained copy that had drifted from the real provider configs.

Sources of truth:

  • pkg/providercatalog/providers.json — UX metadata (display name, description, docs/signup URLs, API-key copy, recommended model + why). Parsed from disk into providercatalog.Catalog rather than read via providercatalog.Current(): Current() schedules an async refresh from the remote catalog in non-test binaries, so its output can differ run to run. A generator must be deterministic, so we read the checked-in file — which is exactly what go:embed compiles in anyway.
  • pkg/agent_providers/configs/*.json — auth (env var / requires-key), display name, and the model list (models.model_info when present, else the legacy models.available_models array).

Provider order follows the catalog order. Fields the sources don't carry are emitted as empty strings (never omitted) so consumers always see the full 14-field shape.

Usage:

go run ./cmd/generate_studio_providers -bridge ../sprout-studio/shared/studio-bridge.js
go run ./cmd/generate_studio_providers -o /tmp/studio-providers.json

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL