discover

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeCatalogV1

func MergeCatalogV1(dst, src *catalog.CatalogV1) *catalog.CatalogV1

MergeCatalogV1 merges models, offerings, providers, deployments, and aliases from src into dst.

func MergeCatalogV1WithPolicy

func MergeCatalogV1WithPolicy(dst, src *catalog.CatalogV1, policy MergePolicy) *catalog.CatalogV1

MergeCatalogV1WithPolicy merges with live replacement for prefer-live providers.

func RefreshProvider

func RefreshProvider(ctx context.Context, providerID string, creds catalog.Credentials) (*catalog.RefreshResult, error)

RefreshProvider fetches live models for one provider, merges into the catalog cache, and returns the compiled catalog. Used after the user saves an API key in /config.

func Run

func Run(ctx context.Context, opts Options) (*catalog.RefreshResult, error)

Run loads the deployment-aware catalog, optionally refreshes the remote catalog, merges live provider model lists when API keys are supplied, writes the cache, and returns the compiled catalog.

Types

type MergePolicy

type MergePolicy struct {
	PreferLive                 bool
	PreferLiveProviders        []string
	ReplaceDeploymentOfferings []string
}

MergePolicy controls catalog merge behavior when enriching from live APIs.

type Options

type Options struct {
	catalog.LoadCatalogV1Options
	Credentials catalog.Credentials
}

Options configures catalog discovery: published catalog + live provider APIs via API keys.

Jump to

Keyboard shortcuts

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