MCPcopy Index your code
hub / github.com/coder/coder / Seed

Function Seed

coderd/aibridge/prices/prices.go:38–40  ·  view source on GitHub ↗

Seed applies the embedded price seed to ai_model_prices table, replacing the price columns of any existing (provider, model) row and inserting new ones. Rows already in the table that no longer appear in the seed are left untouched, so historical entries persist across upstream model deprecations.

(ctx context.Context, db database.Store)

Source from the content-addressed store, hash-verified

36// Rows already in the table that no longer appear in the seed are left
37// untouched, so historical entries persist across upstream model deprecations.
38func Seed(ctx context.Context, db database.Store) error {
39 return SeedFromBytes(ctx, db, seedJSON)
40}
41
42// SeedFromBytes applies an arbitrary JSON seed. Most callers should use Seed,
43// which applies the seed embedded in this binary; SeedFromBytes is exposed

Callers 2

NewFunction · 0.92
TestSeedFunction · 0.92

Calls 1

SeedFromBytesFunction · 0.85

Tested by 1

TestSeedFunction · 0.74