Changeset 0.10.0 (#56)

This commit is contained in:
2026-02-24 14:50:53 +00:00
parent cdfd69bad3
commit ea03f956ca
31 changed files with 3303 additions and 167 deletions

View File

@@ -76,6 +76,17 @@ func syncProviderModels(ctx context.Context, stores store.Stores, cfg *models.Pr
return syncResult{}, fmt.Errorf("failed to sync: %w", err)
}
// Sync pricing from provider catalog (won't overwrite manual admin overrides)
if stores.Pricing != nil {
for _, m := range provModels {
if m.Pricing != nil {
if err := stores.Pricing.UpsertFromCatalog(ctx, cfg.ID, m.ID, m.Pricing); err != nil {
log.Printf("warn: pricing sync for %s/%s failed: %v", cfg.ID, m.ID, err)
}
}
}
}
return syncResult{Added: added, Updated: updated, Total: len(provModels)}, nil
}