catalog

package
v0.30.1 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeploymentCatalogSlug

func DeploymentCatalogSlug(model string) string

func SlugCandidates

func SlugCandidates(models ...string) []string

Types

type AuthField

type AuthField struct {
	Key         string        `json:"key"`
	Label       string        `json:"label"`
	Type        AuthFieldType `json:"type"`
	Description string        `json:"description,omitempty"`
	Required    bool          `json:"required,omitempty"`
	Secret      bool          `json:"secret,omitempty"`
	Default     any           `json:"default,omitempty"`
}

type AuthFieldType

type AuthFieldType string
const (
	AuthFieldTypeString  AuthFieldType = "string"
	AuthFieldTypeBoolean AuthFieldType = "boolean"
)

type AuthTypeOption

type AuthTypeOption struct {
	Type        string      `json:"type"`
	Variant     string      `json:"variant,omitempty"`
	Label       string      `json:"label"`
	Description string      `json:"description,omitempty"`
	Fields      []AuthField `json:"fields"`
}

func ProviderAuthOptions

func ProviderAuthOptions(code string) []AuthTypeOption

type MCPServerCatalog

type MCPServerCatalog interface {
	ListMCPServers() []domain.MCPServer
}

func NewMCPServerCatalog

func NewMCPServerCatalog() (MCPServerCatalog, error)

NewMCPServerCatalog loads the curated catalog of remote MCP servers embedded at build time. The embedded JSON is a validated build asset, so a parse failure is a programming error and surfaces at startup.

type OptionFieldType

type OptionFieldType string
const (
	OptionFieldTypeString OptionFieldType = "string"
	OptionFieldTypeEnum   OptionFieldType = "enum"
	OptionFieldTypeMap    OptionFieldType = "map"
)

type Pricing

type Pricing struct {
	ModelLabel  string
	InputPrice  float64
	OutputPrice float64
	Found       bool
}

type PricingResolver

type PricingResolver interface {
	Resolve(ctx context.Context, providerCode, slug string) Pricing
}

func NewPricingResolver

func NewPricingResolver(repo domain.Repository, manager *cache.TTLMapManager, logger *slog.Logger) PricingResolver

type ProviderOptionField

type ProviderOptionField struct {
	Key         string                  `json:"key"`
	Label       string                  `json:"label"`
	Type        OptionFieldType         `json:"type"`
	Description string                  `json:"description,omitempty"`
	Required    bool                    `json:"required,omitempty"`
	Default     any                     `json:"default,omitempty"`
	Enum        []appplugins.EnumOption `json:"enum,omitempty"`
}

func ProviderOptions

func ProviderOptions(code string) []ProviderOptionField

type ServerlessFilter added in v0.27.0

type ServerlessFilter interface {
	// Filter narrows models to the ones a registry's credentials can actually
	// invoke: serverless, in the registry's region, and with model access granted
	// to the account.
	//
	// It never returns an error. Any provider other than Bedrock, any non-AWS
	// auth, and any control plane failure yield the input unchanged, since a
	// too-long list degrades gracefully while a spuriously empty one does not.
	// A verified empty result, on the other hand, is passed through as empty.
	Filter(ctx context.Context, in ServerlessFilterInput) []domain.Model
}

func NewServerlessFilter added in v0.27.0

func NewServerlessFilter(
	finder appregistry.Finder,
	client controlplane.Client,
	logger *slog.Logger,
) ServerlessFilter

type ServerlessFilterInput added in v0.27.0

type ServerlessFilterInput struct {
	ProviderCode string
	GatewayID    ids.GatewayID
	RegistryID   ids.RegistryID
	Models       []domain.Model
}

ServerlessFilterInput carries what narrowing a catalog listing needs: the provider being listed, the registry whose credentials decide availability, and the models to narrow.

type Service

type Service interface {
	ListProviders(ctx context.Context) ([]domain.Provider, error)
	ListModels(ctx context.Context, providerCode string) ([]domain.Model, error)
}

func NewService

func NewService(repo domain.Repository) Service

type Syncer

type Syncer interface {
	Sync(ctx context.Context) error
}

func NewSyncer

func NewSyncer(repo domain.Repository, client *modelsdev.Client, logger *slog.Logger, signaler configsyncport.SnapshotSignaler) Syncer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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