modeldocs

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const SourceNote = "" /* 273-byte string literal not displayed */

Variables

This section is empty.

Functions

func NormalizeModelNameKey

func NormalizeModelNameKey(s string) string

func SDKTokenPricingIOSummary added in v0.2.0

func SDKTokenPricingIOSummary(pricing *SDKTokenPricing) string

Types

type ClientAvailability

type ClientAvailability struct {
	Dotcom    bool `json:"dotcom" yaml:"dotcom"`
	CLI       bool `json:"cli" yaml:"cli"`
	VSCode    bool `json:"vscode" yaml:"vscode"`
	VS        bool `json:"vs" yaml:"vs"`
	Eclipse   bool `json:"eclipse" yaml:"eclipse"`
	Xcode     bool `json:"xcode" yaml:"xcode"`
	JetBrains bool `json:"jetbrains" yaml:"jetbrains"`
}

func (ClientAvailability) SupportedClientNames

func (c ClientAvailability) SupportedClientNames() []string

type Comparison

type Comparison struct {
	TaskArea       string `json:"taskArea,omitempty" yaml:"taskArea,omitempty"`
	ExcelsAt       string `json:"excelsAt,omitempty" yaml:"excelsAt,omitempty"`
	FurtherReading string `json:"furtherReading,omitempty" yaml:"furtherReading,omitempty"`
}

type DocsModel

type DocsModel struct {
	Name          string             `json:"name" yaml:"name"`
	Provider      string             `json:"provider" yaml:"provider"`
	ReleaseStatus string             `json:"releaseStatus" yaml:"releaseStatus"`
	Modes         ModeAvailability   `json:"modes" yaml:"modes"`
	Clients       ClientAvailability `json:"clients" yaml:"clients"`
	Plans         PlanAvailability   `json:"plans" yaml:"plans"`
	Comparison    *Comparison        `json:"comparison,omitempty" yaml:"comparison,omitempty"`
}

type JoinedModel

type JoinedModel struct {
	Name          string             `json:"name" yaml:"name"`
	Provider      string             `json:"provider" yaml:"provider"`
	ReleaseStatus string             `json:"releaseStatus" yaml:"releaseStatus"`
	Modes         ModeAvailability   `json:"modes" yaml:"modes"`
	Clients       ClientAvailability `json:"clients" yaml:"clients"`
	Plans         PlanAvailability   `json:"plans" yaml:"plans"`
	Comparison    *Comparison        `json:"comparison,omitempty" yaml:"comparison,omitempty"`
	VisibleNow    bool               `json:"visibleNow" yaml:"visibleNow"`
	LiveModels    []LiveMatch        `json:"liveModels,omitempty" yaml:"liveModels,omitempty"`
}

type LiveMatch

type LiveMatch struct {
	ID           string           `json:"id" yaml:"id"`
	Name         string           `json:"name" yaml:"name"`
	PolicyState  string           `json:"policyState,omitempty" yaml:"policyState,omitempty"`
	TokenPricing *SDKTokenPricing `json:"tokenPricing,omitempty" yaml:"tokenPricing,omitempty"`
}

type ModeAvailability added in v0.1.8

type ModeAvailability struct {
	Agent bool `json:"agent" yaml:"agent"`
	Ask   bool `json:"ask" yaml:"ask"`
	Edit  bool `json:"edit" yaml:"edit"`
}

type PlanAvailability

type PlanAvailability struct {
	Pro        bool `json:"pro" yaml:"pro"`
	ProPlus    bool `json:"proPlus" yaml:"proPlus"`
	Max        bool `json:"max" yaml:"max"`
	Business   bool `json:"business" yaml:"business"`
	Enterprise bool `json:"enterprise" yaml:"enterprise"`
}

func (PlanAvailability) SupportedPlanNames

func (p PlanAvailability) SupportedPlanNames() []string

type RetiredModel

type RetiredModel struct {
	Name                 string `json:"name" yaml:"name"`
	RetirementDate       string `json:"retirementDate" yaml:"retirementDate"`
	SuggestedAlternative string `json:"suggestedAlternative" yaml:"suggestedAlternative"`
}

type SDKTokenPricing added in v0.2.0

type SDKTokenPricing struct {
	InputUSDPerMTok       *float64 `json:"inputUsdPerMToken,omitempty" yaml:"inputUsdPerMToken,omitempty"`
	CachedInputUSDPerMTok *float64 `json:"cachedInputUsdPerMToken,omitempty" yaml:"cachedInputUsdPerMToken,omitempty"`
	CacheWriteUSDPerMTok  *float64 `json:"cacheWriteUsdPerMToken,omitempty" yaml:"cacheWriteUsdPerMToken,omitempty"`
	OutputUSDPerMTok      *float64 `json:"outputUsdPerMToken,omitempty" yaml:"outputUsdPerMToken,omitempty"`
}

SDKTokenPricing is USD-per-million-token pricing from Copilot SDK ListModels billing.tokenPrices.

func SDKTokenPricingFromModel added in v0.2.0

func SDKTokenPricingFromModel(model copilot.ModelInfo) *SDKTokenPricing

func SDKTokenPricingFromRPC added in v0.2.0

func SDKTokenPricingFromRPC(tokenPrices *rpc.ModelBillingTokenPrices) *SDKTokenPricing

type Snapshot

type Snapshot struct {
	CatalogVersion        string         `json:"catalogVersion" yaml:"catalogVersion"`
	SourceNote            string         `json:"sourceNote" yaml:"sourceNote"`
	Sources               Sources        `json:"sources" yaml:"sources"`
	LoadedFrom            string         `json:"loadedFrom" yaml:"loadedFrom"`
	LoadWarnings          []string       `json:"loadWarnings,omitempty" yaml:"loadWarnings,omitempty"`
	Models                []JoinedModel  `json:"models" yaml:"models"`
	RetiredModels         []RetiredModel `json:"retiredModels" yaml:"retiredModels"`
	LiveModelsWithoutDocs []LiveMatch    `json:"liveModelsWithoutDocs,omitempty" yaml:"liveModelsWithoutDocs,omitempty"`
}

func BuildSnapshot

func BuildSnapshot(live []copilot.ModelInfo) Snapshot

func BuildSnapshotWithOptions

func BuildSnapshotWithOptions(ctx context.Context, live []copilot.ModelInfo, options SnapshotOptions) (Snapshot, error)

type SnapshotOptions

type SnapshotOptions struct {
	PreferLatest bool
}

type Sources

type Sources struct {
	ReleaseStatus       string `json:"releaseStatus" yaml:"releaseStatus"`
	SupportedClients    string `json:"supportedClients" yaml:"supportedClients"`
	SupportedPlans      string `json:"supportedPlans" yaml:"supportedPlans"`
	ModelComparison     string `json:"modelComparison" yaml:"modelComparison"`
	DeprecationHistory  string `json:"deprecationHistory" yaml:"deprecationHistory"`
	EmbeddedRepo        string `json:"embeddedRepo,omitempty" yaml:"embeddedRepo,omitempty"`
	EmbeddedRef         string `json:"embeddedRef,omitempty" yaml:"embeddedRef,omitempty"`
	EmbeddedCommit      string `json:"embeddedCommit,omitempty" yaml:"embeddedCommit,omitempty"`
	EmbeddedSnapshotDir string `json:"embeddedSnapshotDir,omitempty" yaml:"embeddedSnapshotDir,omitempty"`
}

Jump to

Keyboard shortcuts

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