Documentation
¶
Overview ¶
Package modellink downloads, verifies, caches and parses the versioned ModelLink catalog for Go applications.
The zero-value Options use the domestic npmmirror registry and a shared, cross-platform file cache:
client, err := modellink.New(modellink.Options{})
snapshot, err := client.Load(ctx)
model, ok := snapshot.ProviderModel("deepseek", "deepseek-v4-pro")
Load prefers the active verified cache and only calls LoadLatest when no usable cache exists. LoadCached never accesses the registry; LoadLatest always checks it and prevents automatic downgrade. LoadVersion reads an explicit version without activating it, while SwitchVersion deliberately changes the active version. Use NewFileCache to customize local retention, or implement Cache to connect Redis or another shared backend. Compatibility warnings are available from Snapshot.Warnings and Options.OnWarning.
Index ¶
- Constants
- Variables
- func Schema() []byte
- type Cache
- type CacheEntry
- type CachePruner
- type CacheStore
- type Catalog
- type Client
- func (client *Client) ActivateVersion(ctx context.Context, version string) error
- func (client *Client) CheckLatest(ctx context.Context) (UpdateStatus, error)
- func (client *Client) CurrentVersion(ctx context.Context) (string, error)
- func (client *Client) FindLatest(ctx context.Context) (string, error)
- func (client *Client) Load(ctx context.Context) (*Snapshot, error)
- func (client *Client) LoadCached(ctx context.Context) (*Snapshot, error)
- func (client *Client) LoadLatest(ctx context.Context) (*Snapshot, error)
- func (client *Client) LoadVersion(ctx context.Context, version string) (*Snapshot, error)
- func (client *Client) SwitchVersion(ctx context.Context, version string) error
- type DataFile
- type FileCache
- func (cache *FileCache) Current(ctx context.Context) (string, error)
- func (cache *FileCache) Directory() string
- func (cache *FileCache) Get(ctx context.Context, version string) (*CacheEntry, error)
- func (cache *FileCache) Lock(ctx context.Context, key string) (Lock, error)
- func (cache *FileCache) Prune(ctx context.Context, protected ...string) error
- func (cache *FileCache) Put(ctx context.Context, entry *CacheEntry) error
- func (cache *FileCache) SetCurrent(ctx context.Context, version string) error
- type FileCacheOptions
- type Interleaved
- type JSONValue
- type Lock
- type Locker
- type Manifest
- type ManifestFile
- type ManifestFiles
- type ManifestSource
- type ModelMetadata
- type ModelMetadataBenchmarksElem
- type ModelMetadataFamily
- type ModelMetadataLimit
- type ModelMetadataLinksElem
- type ModelMetadataLinksElemType
- type ModelMetadataModalities
- type ModelMetadataModalitiesInputElem
- type ModelMetadataModalitiesOutputElem
- type ModelMetadataWeightsElem
- type Models
- type Options
- type Protocol
- type Provider
- type ProviderCreditsCN
- type ProviderEndpoint
- type ProviderLinks
- type ProviderModel
- type ProviderModelCost
- type ProviderModelCostCN
- type ProviderModelCostCNContextOver200K
- type ProviderModelCostCNContextOver200KThinking
- type ProviderModelCostCNThinking
- type ProviderModelCostCNTiersElem
- type ProviderModelCostCNTiersElemThinking
- type ProviderModelCostCNTiersElemTier
- type ProviderModelCostCNTiersElemTier_0
- type ProviderModelCostCNTiersElemTier_1
- type ProviderModelCostCNTiersElemTier_1Input
- type ProviderModelCostCNTiersElemTier_1Output
- type ProviderModelCostCNTiersElemTier_1Time
- type ProviderModelCostCNTiersElemTier_1TimeWindowsElem
- type ProviderModelCostCNTiersElemTier_1TimeWindowsElemDaysElem
- type ProviderModelCostContextOver200K
- type ProviderModelCostPoints
- type ProviderModelCostPointsPeakWindow
- type ProviderModelCostPointsPeakWindowDaysElem
- type ProviderModelCostPointsTiersElem
- type ProviderModelCostPointsTiersElemTier
- type ProviderModelCostPointsTiersElemTier_0
- type ProviderModelCostPointsTiersElemTier_1
- type ProviderModelCostPointsTiersElemTier_1Input
- type ProviderModelCostPointsTiersElemTier_1Output
- type ProviderModelCostPointsTiersElemTier_1Time
- type ProviderModelCostPointsTiersElemTier_1TimeWindowsElem
- type ProviderModelCostPointsTiersElemTier_1TimeWindowsElemDaysElem
- type ProviderModelCostTiersElem
- type ProviderModelCostTiersElemTier
- type ProviderModelCostTiersElemTier_0
- type ProviderModelCostTiersElemTier_1
- type ProviderModelCostTiersElemTier_1Input
- type ProviderModelCostTiersElemTier_1Output
- type ProviderModelCostTiersElemTier_1Time
- type ProviderModelCostTiersElemTier_1TimeWindowsElem
- type ProviderModelCostTiersElemTier_1TimeWindowsElemDaysElem
- type ProviderModelExperimental
- type ProviderModelExperimentalModes
- type ProviderModelExperimentalModesValueCost
- type ProviderModelExperimentalModesValueCostCN
- type ProviderModelExperimentalModesValueProvider
- type ProviderModelExperimentalModesValueProviderBody
- type ProviderModelExperimentalModesValueProviderHeaders
- type ProviderModelFamily
- type ProviderModelInterleaved_1
- type ProviderModelInterleaved_1Field
- type ProviderModelLimit
- type ProviderModelModalities
- type ProviderModelModalitiesInputElem
- type ProviderModelModalitiesOutputElem
- type ProviderModelProvider
- type ProviderModelProviderBody
- type ProviderModelProviderHeaders
- type ProviderModelProviderShape
- type ProviderModelStatus
- type ProviderModels
- type ProviderPlansCNElem
- type ProviderProtocol
- type Providers
- type ReasoningOption
- type ReasoningOption_0
- type ReasoningOption_1
- type ReasoningOption_1Default_0
- type ReasoningOption_1ValuesElem_0
- type ReasoningOption_2
- type SchemaMetadata
- type Snapshot
- func (snapshot *Snapshot) File(name DataFile) ([]byte, bool)
- func (snapshot *Snapshot) Model(id string) (ModelMetadata, bool)
- func (snapshot *Snapshot) Provider(id string) (Provider, bool)
- func (snapshot *Snapshot) ProviderModel(providerID string, modelID string) (ProviderModel, bool)
- func (snapshot *Snapshot) Schema() []byte
- func (snapshot *Snapshot) Warnings() []Warning
- type UpdateStatus
- type Warning
- type WarningCode
Constants ¶
const SupportedSchemaVersion = 2
Variables ¶
Functions ¶
Types ¶
type Cache ¶
type Cache interface {
CacheStore
Locker
}
Cache combines storage and update coordination. Most users only configure this interface; the smaller interfaces allow advanced backend composition.
type CacheEntry ¶
CacheEntry is one immutable, versioned ModelLink data package. Files contain the verified JSON bytes published in @modellink/data.
type CachePruner ¶
CachePruner is an optional cache capability used after successful package operations. Custom caches may omit it and manage retention independently.
type CacheStore ¶
type CacheStore interface {
Current(ctx context.Context) (string, error)
Get(ctx context.Context, version string) (*CacheEntry, error)
Put(ctx context.Context, entry *CacheEntry) error
SetCurrent(ctx context.Context, version string) error
}
CacheStore persists versioned packages and the currently active version. Put must publish an entry atomically: readers must never observe partial data.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client loads verified, versioned ModelLink snapshots.
func (*Client) ActivateVersion ¶
ActivateVersion makes an already cached version active without accessing the registry. It returns ErrNoCachedData when that version is not cached.
func (*Client) CheckLatest ¶
func (client *Client) CheckLatest(ctx context.Context) (UpdateStatus, error)
CheckLatest compares the active local version with the registry latest version without downloading data or changing the cache.
func (*Client) CurrentVersion ¶
CurrentVersion returns the active local version without accessing the registry. It returns ErrNoCachedData when no version has been activated.
func (*Client) FindLatest ¶
FindLatest queries the registry for its latest package version. It does not download data, write the cache or change the active version.
func (*Client) Load ¶
Load returns the active verified cache without checking the registry. When no valid cache is available, it blocks while loading the safe latest version.
func (*Client) LoadCached ¶
LoadCached returns the active verified local snapshot without accessing the registry. It returns ErrNoCachedData when no version has been activated.
func (*Client) LoadLatest ¶
LoadLatest checks the registry, prevents automatic downgrade, activates the safe latest version and returns the active verified snapshot.
func (*Client) LoadVersion ¶
LoadVersion returns a verified explicit version without changing the active version. It downloads and caches the version when necessary.
type FileCache ¶
type FileCache struct {
// contains filtered or unexported fields
}
FileCache is the default persistent cache. It uses atomic filesystem updates and kernel-backed file locks, so independent processes can safely share it.
func NewFileCache ¶
func NewFileCache(options FileCacheOptions) (*FileCache, error)
NewFileCache creates a filesystem cache. Zero options use the same defaults as New(Options{}).
type FileCacheOptions ¶
type FileCacheOptions struct {
// Directory is the cache root. Empty uses os.UserCacheDir()/modellink.
Directory string
// MaxVersions is the total number of versions to retain. Zero defaults to
// two; -1 disables automatic cleanup. Positive values must be at least two.
MaxVersions int
}
FileCacheOptions configures the default filesystem cache.
type Interleaved ¶
type Interleaved struct {
Field string
}
func (Interleaved) MarshalJSON ¶
func (value Interleaved) MarshalJSON() ([]byte, error)
func (*Interleaved) UnmarshalJSON ¶
func (value *Interleaved) UnmarshalJSON(data []byte) error
type Locker ¶
Locker coordinates a complete update operation across all clients sharing a cache. Implementations must honor cancellation while waiting for a lock.
type Manifest ¶
type Manifest struct {
// Files corresponds to the JSON schema field "files".
Files ManifestFiles `json:"files"`
// GeneratedAt corresponds to the JSON schema field "generated_at".
GeneratedAt time.Time `json:"generated_at"`
// SchemaVersion corresponds to the JSON schema field "schema_version".
SchemaVersion int `json:"schema_version"`
// Source corresponds to the JSON schema field "source".
Source ManifestSource `json:"source"`
// Version corresponds to the JSON schema field "version".
Version string `json:"version"`
}
type ManifestFile ¶
type ManifestFiles ¶
type ManifestFiles struct {
// APIJSON corresponds to the JSON schema field "api.json".
APIJSON ManifestFile `json:"api.json"`
// CatalogJSON corresponds to the JSON schema field "catalog.json".
CatalogJSON ManifestFile `json:"catalog.json"`
// ModelsJSON corresponds to the JSON schema field "models.json".
ModelsJSON ManifestFile `json:"models.json"`
// SchemaJSON corresponds to the JSON schema field "schema.json".
SchemaJSON ManifestFile `json:"schema.json"`
}
type ManifestSource ¶
type ModelMetadata ¶
type ModelMetadata struct {
// Whether attachments are supported. Missing on optional metadata means unknown.
Attachment *bool `json:"attachment,omitempty"`
// Benchmarks corresponds to the JSON schema field "benchmarks".
Benchmarks []ModelMetadataBenchmarksElem `json:"benchmarks,omitempty"`
// Description corresponds to the JSON schema field "description".
Description string `json:"description"`
// Family corresponds to the JSON schema field "family".
Family *ModelMetadataFamily `json:"family,omitempty"`
// ID corresponds to the JSON schema field "id".
ID string `json:"id"`
// Knowledge corresponds to the JSON schema field "knowledge".
Knowledge *string `json:"knowledge,omitempty"`
// LastUpdated corresponds to the JSON schema field "last_updated".
LastUpdated *string `json:"last_updated,omitempty"`
// License corresponds to the JSON schema field "license".
License *string `json:"license,omitempty"`
// Token limits published for the base model.
Limit *ModelMetadataLimit `json:"limit,omitempty"`
// Links corresponds to the JSON schema field "links".
Links []ModelMetadataLinksElem `json:"links,omitempty"`
// Input and output modalities exposed by this model endpoint.
Modalities *ModelMetadataModalities `json:"modalities,omitempty"`
// Name corresponds to the JSON schema field "name".
Name string `json:"name"`
// OpenWeights corresponds to the JSON schema field "open_weights".
OpenWeights *bool `json:"open_weights,omitempty"`
// Whether reasoning is supported. Missing means unknown; false means explicitly
// unsupported.
Reasoning *bool `json:"reasoning,omitempty"`
// ReleaseDate corresponds to the JSON schema field "release_date".
ReleaseDate *string `json:"release_date,omitempty"`
// Series corresponds to the JSON schema field "series".
Series *string `json:"series,omitempty"`
// Whether structured output is supported. Missing means unknown; false means
// explicitly unsupported.
StructuredOutput *bool `json:"structured_output,omitempty"`
// Whether temperature is explicitly adjustable. Missing means unknown; false
// means fixed or unsupported.
Temperature *bool `json:"temperature,omitempty"`
// Whether tool calling is supported. Missing means unknown; false means
// explicitly unsupported.
ToolCall *bool `json:"tool_call,omitempty"`
// Weights corresponds to the JSON schema field "weights".
Weights []ModelMetadataWeightsElem `json:"weights,omitempty"`
}
type ModelMetadataBenchmarksElem ¶
type ModelMetadataBenchmarksElem struct {
// Dataset corresponds to the JSON schema field "dataset".
Dataset *string `json:"dataset,omitempty"`
// Date corresponds to the JSON schema field "date".
Date *string `json:"date,omitempty"`
// Harness corresponds to the JSON schema field "harness".
Harness *string `json:"harness,omitempty"`
// Metric corresponds to the JSON schema field "metric".
Metric *string `json:"metric,omitempty"`
// Name corresponds to the JSON schema field "name".
Name string `json:"name"`
// Score corresponds to the JSON schema field "score".
Score interface{} `json:"score"`
// Source corresponds to the JSON schema field "source".
Source *string `json:"source,omitempty"`
// Variant corresponds to the JSON schema field "variant".
Variant *string `json:"variant,omitempty"`
// Version corresponds to the JSON schema field "version".
Version *string `json:"version,omitempty"`
}
type ModelMetadataFamily ¶
type ModelMetadataFamily string
const ModelMetadataFamilyAgi ModelMetadataFamily = "agi"
const ModelMetadataFamilyAllam ModelMetadataFamily = "allam"
const ModelMetadataFamilyAllenai ModelMetadataFamily = "allenai"
const ModelMetadataFamilyAlpha ModelMetadataFamily = "alpha"
const ModelMetadataFamilyAura ModelMetadataFamily = "aura"
const ModelMetadataFamilyAuto ModelMetadataFamily = "auto"
const ModelMetadataFamilyBaichuan ModelMetadataFamily = "baichuan"
const ModelMetadataFamilyBart ModelMetadataFamily = "bart"
const ModelMetadataFamilyBge ModelMetadataFamily = "bge"
const ModelMetadataFamilyBigPickle ModelMetadataFamily = "big-pickle"
const ModelMetadataFamilyCanopylabs ModelMetadataFamily = "canopylabs"
const ModelMetadataFamilyChutesai ModelMetadataFamily = "chutesai"
const ModelMetadataFamilyClaude ModelMetadataFamily = "claude"
const ModelMetadataFamilyClaudeFable ModelMetadataFamily = "claude-fable"
const ModelMetadataFamilyClaudeHaiku ModelMetadataFamily = "claude-haiku"
const ModelMetadataFamilyClaudeOpus ModelMetadataFamily = "claude-opus"
const ModelMetadataFamilyClaudeSonnet ModelMetadataFamily = "claude-sonnet"
const ModelMetadataFamilyCodestral ModelMetadataFamily = "codestral"
const ModelMetadataFamilyCodestralEmbed ModelMetadataFamily = "codestral-embed"
const ModelMetadataFamilyCogito ModelMetadataFamily = "cogito"
const ModelMetadataFamilyCohereEmbed ModelMetadataFamily = "cohere-embed"
const ModelMetadataFamilyCommand ModelMetadataFamily = "command"
const ModelMetadataFamilyCommandA ModelMetadataFamily = "command-a"
const ModelMetadataFamilyCommandLight ModelMetadataFamily = "command-light"
const ModelMetadataFamilyCommandR ModelMetadataFamily = "command-r"
const ModelMetadataFamilyDallE ModelMetadataFamily = "dall-e"
const ModelMetadataFamilyDeepseek ModelMetadataFamily = "deepseek"
const ModelMetadataFamilyDeepseekFlash ModelMetadataFamily = "deepseek-flash"
const ModelMetadataFamilyDeepseekFlashFree ModelMetadataFamily = "deepseek-flash-free"
const ModelMetadataFamilyDeepseekFlashThink ModelMetadataFamily = "deepseek-flash-think"
const ModelMetadataFamilyDeepseekThinking ModelMetadataFamily = "deepseek-thinking"
const ModelMetadataFamilyDevstral ModelMetadataFamily = "devstral"
const ModelMetadataFamilyDiscolm ModelMetadataFamily = "discolm"
const ModelMetadataFamilyDistilbert ModelMetadataFamily = "distilbert"
const ModelMetadataFamilyDoubaoSeed ModelMetadataFamily = "doubao-seed"
const ModelMetadataFamilyDreamMachine ModelMetadataFamily = "dream-machine"
const ModelMetadataFamilyDreamshaper ModelMetadataFamily = "dreamshaper"
const ModelMetadataFamilyElephant ModelMetadataFamily = "elephant"
const ModelMetadataFamilyElevenlabs ModelMetadataFamily = "elevenlabs"
const ModelMetadataFamilyErnie ModelMetadataFamily = "ernie"
const ModelMetadataFamilyFalcon ModelMetadataFamily = "falcon"
const ModelMetadataFamilyFlux ModelMetadataFamily = "flux"
const ModelMetadataFamilyFugu ModelMetadataFamily = "fugu"
const ModelMetadataFamilyGemini ModelMetadataFamily = "gemini"
const ModelMetadataFamilyGeminiEmbedding ModelMetadataFamily = "gemini-embedding"
const ModelMetadataFamilyGeminiFlash ModelMetadataFamily = "gemini-flash"
const ModelMetadataFamilyGeminiFlashLite ModelMetadataFamily = "gemini-flash-lite"
const ModelMetadataFamilyGeminiPro ModelMetadataFamily = "gemini-pro"
const ModelMetadataFamilyGemma ModelMetadataFamily = "gemma"
const ModelMetadataFamilyGlm ModelMetadataFamily = "glm"
const ModelMetadataFamilyGlmAir ModelMetadataFamily = "glm-air"
const ModelMetadataFamilyGlmFlash ModelMetadataFamily = "glm-flash"
const ModelMetadataFamilyGlmFree ModelMetadataFamily = "glm-free"
const ModelMetadataFamilyGlmZ ModelMetadataFamily = "glm-z"
const ModelMetadataFamilyGlmv ModelMetadataFamily = "glmv"
const ModelMetadataFamilyGpt ModelMetadataFamily = "gpt"
const ModelMetadataFamilyGptCodex ModelMetadataFamily = "gpt-codex"
const ModelMetadataFamilyGptCodexMini ModelMetadataFamily = "gpt-codex-mini"
const ModelMetadataFamilyGptCodexSpark ModelMetadataFamily = "gpt-codex-spark"
const ModelMetadataFamilyGptImage ModelMetadataFamily = "gpt-image"
const ModelMetadataFamilyGptLuna ModelMetadataFamily = "gpt-luna"
const ModelMetadataFamilyGptMini ModelMetadataFamily = "gpt-mini"
const ModelMetadataFamilyGptNano ModelMetadataFamily = "gpt-nano"
const ModelMetadataFamilyGptOss ModelMetadataFamily = "gpt-oss"
const ModelMetadataFamilyGptPro ModelMetadataFamily = "gpt-pro"
const ModelMetadataFamilyGptSol ModelMetadataFamily = "gpt-sol"
const ModelMetadataFamilyGptTerra ModelMetadataFamily = "gpt-terra"
const ModelMetadataFamilyGranite ModelMetadataFamily = "granite"
const ModelMetadataFamilyGrok ModelMetadataFamily = "grok"
const ModelMetadataFamilyGrokBeta ModelMetadataFamily = "grok-beta"
const ModelMetadataFamilyGrokBuild ModelMetadataFamily = "grok-build"
const ModelMetadataFamilyGrokVision ModelMetadataFamily = "grok-vision"
const ModelMetadataFamilyGroq ModelMetadataFamily = "groq"
const ModelMetadataFamilyHermes ModelMetadataFamily = "hermes"
const ModelMetadataFamilyHunyuan ModelMetadataFamily = "hunyuan"
const ModelMetadataFamilyHy ModelMetadataFamily = "Hy"
const ModelMetadataFamilyHy3 ModelMetadataFamily = "hy3"
const ModelMetadataFamilyHy3Free ModelMetadataFamily = "hy3-free"
const ModelMetadataFamilyIdeogram ModelMetadataFamily = "ideogram"
const ModelMetadataFamilyImagen ModelMetadataFamily = "imagen"
const ModelMetadataFamilyIndictrans ModelMetadataFamily = "indictrans"
const ModelMetadataFamilyIntellect ModelMetadataFamily = "intellect"
const ModelMetadataFamilyInternS ModelMetadataFamily = "intern-s"
const ModelMetadataFamilyInternvl ModelMetadataFamily = "internvl"
const ModelMetadataFamilyJais ModelMetadataFamily = "jais"
const ModelMetadataFamilyJamba ModelMetadataFamily = "jamba"
const ModelMetadataFamilyJoyai ModelMetadataFamily = "joyai"
const ModelMetadataFamilyKatCoder ModelMetadataFamily = "kat-coder"
const ModelMetadataFamilyKimi ModelMetadataFamily = "kimi"
const ModelMetadataFamilyKimiFree ModelMetadataFamily = "kimi-free"
const ModelMetadataFamilyKimiK2 ModelMetadataFamily = "kimi-k2"
const ModelMetadataFamilyKimiK3 ModelMetadataFamily = "kimi-k3"
const ModelMetadataFamilyKimiThinking ModelMetadataFamily = "kimi-thinking"
const ModelMetadataFamilyLaguna ModelMetadataFamily = "laguna"
const ModelMetadataFamilyLagunaS ModelMetadataFamily = "laguna-s"
const ModelMetadataFamilyLing ModelMetadataFamily = "ling"
const ModelMetadataFamilyLingFlashFree ModelMetadataFamily = "ling-flash-free"
const ModelMetadataFamilyLiquid ModelMetadataFamily = "liquid"
const ModelMetadataFamilyLlama ModelMetadataFamily = "llama"
const ModelMetadataFamilyLlava ModelMetadataFamily = "llava"
const ModelMetadataFamilyLongcat ModelMetadataFamily = "longcat"
const ModelMetadataFamilyLucid ModelMetadataFamily = "lucid"
const ModelMetadataFamilyLyria ModelMetadataFamily = "lyria"
const ModelMetadataFamilyM2M ModelMetadataFamily = "m2m"
const ModelMetadataFamilyMagistral ModelMetadataFamily = "magistral"
const ModelMetadataFamilyMagistralMedium ModelMetadataFamily = "magistral-medium"
const ModelMetadataFamilyMagistralSmall ModelMetadataFamily = "magistral-small"
const ModelMetadataFamilyMai ModelMetadataFamily = "mai"
const ModelMetadataFamilyMelotts ModelMetadataFamily = "melotts"
const ModelMetadataFamilyMercury ModelMetadataFamily = "mercury"
const ModelMetadataFamilyMimo ModelMetadataFamily = "mimo"
const ModelMetadataFamilyMimoFlashFree ModelMetadataFamily = "mimo-flash-free"
const ModelMetadataFamilyMimoOmni ModelMetadataFamily = "mimo-omni"
const ModelMetadataFamilyMimoOmniFree ModelMetadataFamily = "mimo-omni-free"
const ModelMetadataFamilyMimoPro ModelMetadataFamily = "mimo-pro"
const ModelMetadataFamilyMimoProFree ModelMetadataFamily = "mimo-pro-free"
const ModelMetadataFamilyMimoV25 ModelMetadataFamily = "mimo-v2.5"
const ModelMetadataFamilyMimoV25Free ModelMetadataFamily = "mimo-v2.5-free"
const ModelMetadataFamilyMimoV25Pro ModelMetadataFamily = "mimo-v2.5-pro"
const ModelMetadataFamilyMimoV2Omni ModelMetadataFamily = "mimo-v2-omni"
const ModelMetadataFamilyMimoV2Pro ModelMetadataFamily = "mimo-v2-pro"
const ModelMetadataFamilyMinimax ModelMetadataFamily = "minimax"
const ModelMetadataFamilyMinimaxFree ModelMetadataFamily = "minimax-free"
const ModelMetadataFamilyMinimaxM2 ModelMetadataFamily = "minimax-m2"
const ModelMetadataFamilyMinimaxM21 ModelMetadataFamily = "minimax-m2.1"
const ModelMetadataFamilyMinimaxM25 ModelMetadataFamily = "minimax-m2.5"
const ModelMetadataFamilyMinimaxM27 ModelMetadataFamily = "minimax-m2.7"
const ModelMetadataFamilyMinimaxM3 ModelMetadataFamily = "minimax-m3"
const ModelMetadataFamilyMinimaxM3Free ModelMetadataFamily = "minimax-m3-free"
const ModelMetadataFamilyMinistral ModelMetadataFamily = "ministral"
const ModelMetadataFamilyMistral ModelMetadataFamily = "mistral"
const ModelMetadataFamilyMistralEmbed ModelMetadataFamily = "mistral-embed"
const ModelMetadataFamilyMistralLarge ModelMetadataFamily = "mistral-large"
const ModelMetadataFamilyMistralMedium ModelMetadataFamily = "mistral-medium"
const ModelMetadataFamilyMistralNemo ModelMetadataFamily = "mistral-nemo"
const ModelMetadataFamilyMistralSmall ModelMetadataFamily = "mistral-small"
const ModelMetadataFamilyMixtral ModelMetadataFamily = "mixtral"
const ModelMetadataFamilyMmPoly ModelMetadataFamily = "mm-poly"
const ModelMetadataFamilyModelRouter ModelMetadataFamily = "model-router"
const ModelMetadataFamilyMorph ModelMetadataFamily = "morph"
const ModelMetadataFamilyMuse ModelMetadataFamily = "muse"
const ModelMetadataFamilyNanoBanana ModelMetadataFamily = "nano-banana"
const ModelMetadataFamilyNemoretriever ModelMetadataFamily = "nemoretriever"
const ModelMetadataFamilyNemotron ModelMetadataFamily = "nemotron"
const ModelMetadataFamilyNemotronFree ModelMetadataFamily = "nemotron-free"
const ModelMetadataFamilyNeuralChat ModelMetadataFamily = "neural-chat"
const ModelMetadataFamilyNexN2 ModelMetadataFamily = "nex-n2"
const ModelMetadataFamilyNorth ModelMetadataFamily = "north"
const ModelMetadataFamilyNorthFree ModelMetadataFamily = "north-free"
const ModelMetadataFamilyNousresearch ModelMetadataFamily = "nousresearch"
const ModelMetadataFamilyNova ModelMetadataFamily = "nova"
const ModelMetadataFamilyNovaLite ModelMetadataFamily = "nova-lite"
const ModelMetadataFamilyNovaMicro ModelMetadataFamily = "nova-micro"
const ModelMetadataFamilyNovaPro ModelMetadataFamily = "nova-pro"
const ModelMetadataFamilyO ModelMetadataFamily = "o"
const ModelMetadataFamilyOMini ModelMetadataFamily = "o-mini"
const ModelMetadataFamilyOPro ModelMetadataFamily = "o-pro"
const ModelMetadataFamilyOpenchat ModelMetadataFamily = "openchat"
const ModelMetadataFamilyOpengvlab ModelMetadataFamily = "opengvlab"
const ModelMetadataFamilyOpenpangu ModelMetadataFamily = "openpangu"
const ModelMetadataFamilyOrnith ModelMetadataFamily = "ornith"
const ModelMetadataFamilyOsmosis ModelMetadataFamily = "osmosis"
const ModelMetadataFamilyOswe ModelMetadataFamily = "oswe"
const ModelMetadataFamilyPalmyra ModelMetadataFamily = "palmyra"
const ModelMetadataFamilyPangu ModelMetadataFamily = "pangu"
const ModelMetadataFamilyParakeet ModelMetadataFamily = "parakeet"
const ModelMetadataFamilyPhi ModelMetadataFamily = "phi"
const ModelMetadataFamilyPhoenix ModelMetadataFamily = "phoenix"
const ModelMetadataFamilyPixtral ModelMetadataFamily = "pixtral"
const ModelMetadataFamilyPlamo ModelMetadataFamily = "plamo"
const ModelMetadataFamilyPony ModelMetadataFamily = "pony"
const ModelMetadataFamilyQvq ModelMetadataFamily = "qvq"
const ModelMetadataFamilyQwen ModelMetadataFamily = "qwen"
const ModelMetadataFamilyQwen35 ModelMetadataFamily = "qwen3.5"
const ModelMetadataFamilyQwen36 ModelMetadataFamily = "qwen3.6"
const ModelMetadataFamilyQwen37Flash ModelMetadataFamily = "qwen3.7-flash"
const ModelMetadataFamilyQwen37Max ModelMetadataFamily = "qwen3.7-max"
const ModelMetadataFamilyQwen37Plus ModelMetadataFamily = "qwen3.7-plus"
const ModelMetadataFamilyQwen38Max ModelMetadataFamily = "qwen3.8-max"
const ModelMetadataFamilyQwenFree ModelMetadataFamily = "qwen-free"
const ModelMetadataFamilyQwerky ModelMetadataFamily = "qwerky"
const ModelMetadataFamilyRay ModelMetadataFamily = "ray"
const ModelMetadataFamilyRecraft ModelMetadataFamily = "recraft"
const ModelMetadataFamilyRednote ModelMetadataFamily = "rednote"
const ModelMetadataFamilyReka ModelMetadataFamily = "reka"
const ModelMetadataFamilyResnet ModelMetadataFamily = "resnet"
const ModelMetadataFamilyRing ModelMetadataFamily = "ring"
const ModelMetadataFamilyRing1TFree ModelMetadataFamily = "ring-1t-free"
const ModelMetadataFamilyRnj ModelMetadataFamily = "rnj"
const ModelMetadataFamilyRunway ModelMetadataFamily = "runway"
const ModelMetadataFamilySarvam ModelMetadataFamily = "sarvam"
const ModelMetadataFamilySeed ModelMetadataFamily = "seed"
const ModelMetadataFamilySensenova ModelMetadataFamily = "sensenova"
const ModelMetadataFamilySherlock ModelMetadataFamily = "sherlock"
const ModelMetadataFamilySkywork ModelMetadataFamily = "skywork"
const ModelMetadataFamilySmartTurn ModelMetadataFamily = "smart-turn"
const ModelMetadataFamilySolar ModelMetadataFamily = "solar"
const ModelMetadataFamilySolarMini ModelMetadataFamily = "solar-mini"
const ModelMetadataFamilySolarPro ModelMetadataFamily = "solar-pro"
const ModelMetadataFamilySonar ModelMetadataFamily = "sonar"
const ModelMetadataFamilySonarDeepResearch ModelMetadataFamily = "sonar-deep-research"
const ModelMetadataFamilySonarPro ModelMetadataFamily = "sonar-pro"
const ModelMetadataFamilySonarReasoning ModelMetadataFamily = "sonar-reasoning"
const ModelMetadataFamilySora ModelMetadataFamily = "sora"
const ModelMetadataFamilySourceful ModelMetadataFamily = "sourceful"
const ModelMetadataFamilySparkX2 ModelMetadataFamily = "spark-x2"
const ModelMetadataFamilySqlcoder ModelMetadataFamily = "sqlcoder"
const ModelMetadataFamilyStableDiffusion ModelMetadataFamily = "stable-diffusion"
const ModelMetadataFamilyStarling ModelMetadataFamily = "starling"
const ModelMetadataFamilyStep ModelMetadataFamily = "step"
const ModelMetadataFamilyTako ModelMetadataFamily = "tako"
const ModelMetadataFamilyTextEmbedding ModelMetadataFamily = "text-embedding"
const ModelMetadataFamilyTitan ModelMetadataFamily = "titan"
const ModelMetadataFamilyTitanEmbed ModelMetadataFamily = "titan-embed"
const ModelMetadataFamilyTngtech ModelMetadataFamily = "tngtech"
const ModelMetadataFamilyTopazlabs ModelMetadataFamily = "topazlabs"
const ModelMetadataFamilyTrinity ModelMetadataFamily = "trinity"
const ModelMetadataFamilyTrinityMini ModelMetadataFamily = "trinity-mini"
const ModelMetadataFamilyTstars ModelMetadataFamily = "tstars"
const ModelMetadataFamilyUnaCybertron ModelMetadataFamily = "una-cybertron"
const ModelMetadataFamilyUnsloth ModelMetadataFamily = "unsloth"
const ModelMetadataFamilyV0 ModelMetadataFamily = "v0"
const ModelMetadataFamilyVenice ModelMetadataFamily = "venice"
const ModelMetadataFamilyVeo ModelMetadataFamily = "veo"
const ModelMetadataFamilyVoxtral ModelMetadataFamily = "voxtral"
const ModelMetadataFamilyVoyage ModelMetadataFamily = "voyage"
const ModelMetadataFamilyWhisper ModelMetadataFamily = "whisper"
const ModelMetadataFamilyYi ModelMetadataFamily = "yi"
const ModelMetadataFamilyZephyr ModelMetadataFamily = "zephyr"
type ModelMetadataLimit ¶
type ModelMetadataLimit struct {
// Maximum context window in tokens.
Context int `json:"context"`
// Maximum input length in tokens when separately documented.
Input *int `json:"input,omitempty"`
// Maximum output length in tokens when documented.
Output *int `json:"output,omitempty"`
}
Token limits published for the base model.
type ModelMetadataLinksElem ¶
type ModelMetadataLinksElem struct {
// Label corresponds to the JSON schema field "label".
Label *string `json:"label,omitempty"`
// Type corresponds to the JSON schema field "type".
Type *ModelMetadataLinksElemType `json:"type,omitempty"`
// URL corresponds to the JSON schema field "url".
URL string `json:"url"`
}
type ModelMetadataLinksElemType ¶
type ModelMetadataLinksElemType string
const ModelMetadataLinksElemTypeAnnouncement ModelMetadataLinksElemType = "announcement"
const ModelMetadataLinksElemTypeBlog ModelMetadataLinksElemType = "blog"
const ModelMetadataLinksElemTypeDocs ModelMetadataLinksElemType = "docs"
const ModelMetadataLinksElemTypeLicense ModelMetadataLinksElemType = "license"
const ModelMetadataLinksElemTypeModelCard ModelMetadataLinksElemType = "model_card"
const ModelMetadataLinksElemTypeOther ModelMetadataLinksElemType = "other"
const ModelMetadataLinksElemTypePaper ModelMetadataLinksElemType = "paper"
const ModelMetadataLinksElemTypeWeights ModelMetadataLinksElemType = "weights"
type ModelMetadataModalities ¶
type ModelMetadataModalities struct {
// Input modalities accepted by the model.
Input []ModelMetadataModalitiesInputElem `json:"input"`
// Output modalities produced by the model.
Output []ModelMetadataModalitiesOutputElem `json:"output"`
}
Input and output modalities exposed by this model endpoint.
type ModelMetadataModalitiesInputElem ¶
type ModelMetadataModalitiesInputElem string
const ModelMetadataModalitiesInputElemAudio ModelMetadataModalitiesInputElem = "audio"
const ModelMetadataModalitiesInputElemImage ModelMetadataModalitiesInputElem = "image"
const ModelMetadataModalitiesInputElemPdf ModelMetadataModalitiesInputElem = "pdf"
const ModelMetadataModalitiesInputElemText ModelMetadataModalitiesInputElem = "text"
const ModelMetadataModalitiesInputElemVideo ModelMetadataModalitiesInputElem = "video"
type ModelMetadataModalitiesOutputElem ¶
type ModelMetadataModalitiesOutputElem string
const ModelMetadataModalitiesOutputElemAudio ModelMetadataModalitiesOutputElem = "audio"
const ModelMetadataModalitiesOutputElemImage ModelMetadataModalitiesOutputElem = "image"
const ModelMetadataModalitiesOutputElemPdf ModelMetadataModalitiesOutputElem = "pdf"
const ModelMetadataModalitiesOutputElemText ModelMetadataModalitiesOutputElem = "text"
const ModelMetadataModalitiesOutputElemVideo ModelMetadataModalitiesOutputElem = "video"
type ModelMetadataWeightsElem ¶
type ModelMetadataWeightsElem struct {
// Format corresponds to the JSON schema field "format".
Format *string `json:"format,omitempty"`
// Label corresponds to the JSON schema field "label".
Label *string `json:"label,omitempty"`
// Quantization corresponds to the JSON schema field "quantization".
Quantization *string `json:"quantization,omitempty"`
// URL corresponds to the JSON schema field "url".
URL string `json:"url"`
}
type Models ¶
type Models map[string]ModelMetadata
type Options ¶
type Options struct {
// Registry is an npm-compatible registry URL. Empty uses npmmirror.
Registry string
// Cache stores and coordinates packages. Empty uses the default FileCache.
Cache Cache
// OnWarning receives each distinct non-fatal warning once per Client. Nil
// keeps the client silent; warnings remain available from Snapshot.Warnings.
OnWarning func(Warning)
}
Options configures a Client. Its zero value uses npmmirror and the default cross-platform file cache.
type Protocol ¶
type Protocol string
const ProtocolAnthropicCompatible Protocol = "anthropic-compatible"
const ProtocolOpenaiCompatible Protocol = "openai-compatible"
const ProtocolOpenaiResponses Protocol = "openai-responses"
type Provider ¶
type Provider struct {
// Base API URL for the default endpoint.
API *string `json:"api,omitempty"`
// CreditsCN corresponds to the JSON schema field "credits_cn".
CreditsCN *ProviderCreditsCN `json:"credits_cn,omitempty"`
// Doc corresponds to the JSON schema field "doc".
Doc string `json:"doc"`
// All protocol-specific endpoints exposed by this provider.
Endpoints []ProviderEndpoint `json:"endpoints,omitempty"`
// Env corresponds to the JSON schema field "env".
Env []string `json:"env"`
// ID corresponds to the JSON schema field "id".
ID string `json:"id"`
// Purpose-specific official links for integrating with this provider.
Links *ProviderLinks `json:"links,omitempty"`
// Models corresponds to the JSON schema field "models".
Models ProviderModels `json:"models"`
// Name corresponds to the JSON schema field "name".
Name string `json:"name"`
// NPM corresponds to the JSON schema field "npm".
NPM string `json:"npm"`
// Subscription plans published for users in China.
PlansCN []ProviderPlansCNElem `json:"plans_cn,omitempty"`
// Default protocol used by this provider.
Protocol ProviderProtocol `json:"protocol"`
}
type ProviderCreditsCN ¶
type ProviderCreditsCN struct {
// Cny corresponds to the JSON schema field "cny".
Cny float64 `json:"cny"`
// Points corresponds to the JSON schema field "points".
Points int `json:"points"`
// ValidDays corresponds to the JSON schema field "valid_days".
ValidDays *int `json:"valid_days,omitempty"`
}
type ProviderEndpoint ¶
type ProviderEndpoint struct {
// Base API URL for this endpoint.
API string `json:"api"`
// Marks the endpoint represented by the provider-level protocol and API fields.
Default *bool `json:"default,omitempty"`
// Stable endpoint ID referenced by provider models.
ID string `json:"id"`
// Protocol corresponds to the JSON schema field "protocol".
Protocol Protocol `json:"protocol"`
}
A protocol-specific API endpoint exposed by a provider.
type ProviderLinks ¶ added in v0.2.0
type ProviderLinks struct {
// Official instructions for applying for and configuring an API key.
APIKey *string `json:"api_key,omitempty"`
// Official console used to manage API keys and the provider account.
Console *string `json:"console,omitempty"`
// Official catalog of models available from this provider.
Models *string `json:"models,omitempty"`
// Official pricing, subscription plan, or purchase page.
Pricing *string `json:"pricing,omitempty"`
}
Purpose-specific official links for integrating with this provider.
type ProviderModel ¶
type ProviderModel struct {
// Whether attachments are supported. Missing on optional metadata means unknown.
Attachment bool `json:"attachment"`
// Prices in USD per million tokens.
Cost *ProviderModelCost `json:"cost,omitempty"`
// Prices in CNY per million tokens.
CostCN *ProviderModelCostCN `json:"cost_cn,omitempty"`
// Plan point consumption per the number of tokens declared by per_tokens.
CostPoints *ProviderModelCostPoints `json:"cost_points,omitempty"`
// Description corresponds to the JSON schema field "description".
Description string `json:"description"`
// Doc corresponds to the JSON schema field "doc".
Doc *string `json:"doc,omitempty"`
// Provider endpoint IDs enabled for this model; missing means the provider
// default endpoint.
Endpoints []string `json:"endpoints,omitempty"`
// Experimental corresponds to the JSON schema field "experimental".
Experimental *ProviderModelExperimental `json:"experimental,omitempty"`
// Family corresponds to the JSON schema field "family".
Family *ProviderModelFamily `json:"family,omitempty"`
// ID corresponds to the JSON schema field "id".
ID string `json:"id"`
// Whether reasoning content is returned alongside output, optionally naming its
// response field.
Interleaved *Interleaved `json:"interleaved,omitempty"`
// Knowledge corresponds to the JSON schema field "knowledge".
Knowledge *string `json:"knowledge,omitempty"`
// LastUpdated corresponds to the JSON schema field "last_updated".
LastUpdated string `json:"last_updated"`
// Token limits exposed by this provider model endpoint.
Limit ProviderModelLimit `json:"limit"`
// Input and output modalities exposed by this model endpoint.
Modalities ProviderModelModalities `json:"modalities"`
// Name corresponds to the JSON schema field "name".
Name string `json:"name"`
// OpenWeights corresponds to the JSON schema field "open_weights".
OpenWeights bool `json:"open_weights"`
// Provider corresponds to the JSON schema field "provider".
Provider *ProviderModelProvider `json:"provider,omitempty"`
// Whether reasoning is supported. Missing means unknown; false means explicitly
// unsupported.
Reasoning *bool `json:"reasoning,omitempty"`
// Provider-specific controls for enabling or configuring reasoning.
ReasoningOptions []ReasoningOption `json:"reasoning_options,omitempty"`
// ReleaseDate corresponds to the JSON schema field "release_date".
ReleaseDate string `json:"release_date"`
// Series corresponds to the JSON schema field "series".
Series *string `json:"series,omitempty"`
// Status corresponds to the JSON schema field "status".
Status *ProviderModelStatus `json:"status,omitempty"`
// Whether structured output is supported. Missing means unknown; false means
// explicitly unsupported.
StructuredOutput *bool `json:"structured_output,omitempty"`
// Whether temperature is explicitly adjustable. Missing means unknown; false
// means fixed or unsupported.
Temperature *bool `json:"temperature,omitempty"`
// Whether tool calling is supported. Missing means unknown; false means
// explicitly unsupported.
ToolCall *bool `json:"tool_call,omitempty"`
}
type ProviderModelCost ¶
type ProviderModelCost struct {
// CacheRead corresponds to the JSON schema field "cache_read".
CacheRead *float64 `json:"cache_read,omitempty"`
// CacheWrite corresponds to the JSON schema field "cache_write".
CacheWrite *float64 `json:"cache_write,omitempty"`
// ContextOver200K corresponds to the JSON schema field "context_over_200k".
ContextOver200K *ProviderModelCostContextOver200K `json:"context_over_200k,omitempty"`
// Input corresponds to the JSON schema field "input".
Input float64 `json:"input"`
// InputAudio corresponds to the JSON schema field "input_audio".
InputAudio *float64 `json:"input_audio,omitempty"`
// Output corresponds to the JSON schema field "output".
Output float64 `json:"output"`
// OutputAudio corresponds to the JSON schema field "output_audio".
OutputAudio *float64 `json:"output_audio,omitempty"`
// Reasoning corresponds to the JSON schema field "reasoning".
Reasoning *float64 `json:"reasoning,omitempty"`
// Tiers corresponds to the JSON schema field "tiers".
Tiers []ProviderModelCostTiersElem `json:"tiers,omitempty"`
}
Prices in USD per million tokens.
type ProviderModelCostCN ¶
type ProviderModelCostCN struct {
// CacheRead corresponds to the JSON schema field "cache_read".
CacheRead *float64 `json:"cache_read,omitempty"`
// CacheWrite corresponds to the JSON schema field "cache_write".
CacheWrite *float64 `json:"cache_write,omitempty"`
// ContextOver200K corresponds to the JSON schema field "context_over_200k".
ContextOver200K *ProviderModelCostCNContextOver200K `json:"context_over_200k,omitempty"`
// Input corresponds to the JSON schema field "input".
Input float64 `json:"input"`
// InputAudio corresponds to the JSON schema field "input_audio".
InputAudio *float64 `json:"input_audio,omitempty"`
// Output corresponds to the JSON schema field "output".
Output float64 `json:"output"`
// OutputAudio corresponds to the JSON schema field "output_audio".
OutputAudio *float64 `json:"output_audio,omitempty"`
// Reasoning corresponds to the JSON schema field "reasoning".
Reasoning *float64 `json:"reasoning,omitempty"`
// Thinking corresponds to the JSON schema field "thinking".
Thinking *ProviderModelCostCNThinking `json:"thinking,omitempty"`
// Tiers corresponds to the JSON schema field "tiers".
Tiers []ProviderModelCostCNTiersElem `json:"tiers,omitempty"`
}
Prices in CNY per million tokens.
type ProviderModelCostCNContextOver200K ¶
type ProviderModelCostCNContextOver200K struct {
// CacheRead corresponds to the JSON schema field "cache_read".
CacheRead *float64 `json:"cache_read,omitempty"`
// CacheWrite corresponds to the JSON schema field "cache_write".
CacheWrite *float64 `json:"cache_write,omitempty"`
// Input corresponds to the JSON schema field "input".
Input float64 `json:"input"`
// InputAudio corresponds to the JSON schema field "input_audio".
InputAudio *float64 `json:"input_audio,omitempty"`
// Output corresponds to the JSON schema field "output".
Output float64 `json:"output"`
// OutputAudio corresponds to the JSON schema field "output_audio".
OutputAudio *float64 `json:"output_audio,omitempty"`
// Reasoning corresponds to the JSON schema field "reasoning".
Reasoning *float64 `json:"reasoning,omitempty"`
// Thinking corresponds to the JSON schema field "thinking".
Thinking *ProviderModelCostCNContextOver200KThinking `json:"thinking,omitempty"`
}
type ProviderModelCostCNContextOver200KThinking ¶
type ProviderModelCostCNContextOver200KThinking struct {
// CacheRead corresponds to the JSON schema field "cache_read".
CacheRead *float64 `json:"cache_read,omitempty"`
// CacheWrite corresponds to the JSON schema field "cache_write".
CacheWrite *float64 `json:"cache_write,omitempty"`
// Input corresponds to the JSON schema field "input".
Input float64 `json:"input"`
// InputAudio corresponds to the JSON schema field "input_audio".
InputAudio *float64 `json:"input_audio,omitempty"`
// Output corresponds to the JSON schema field "output".
Output float64 `json:"output"`
// OutputAudio corresponds to the JSON schema field "output_audio".
OutputAudio *float64 `json:"output_audio,omitempty"`
}
type ProviderModelCostCNThinking ¶
type ProviderModelCostCNThinking struct {
// CacheRead corresponds to the JSON schema field "cache_read".
CacheRead *float64 `json:"cache_read,omitempty"`
// CacheWrite corresponds to the JSON schema field "cache_write".
CacheWrite *float64 `json:"cache_write,omitempty"`
// Input corresponds to the JSON schema field "input".
Input float64 `json:"input"`
// InputAudio corresponds to the JSON schema field "input_audio".
InputAudio *float64 `json:"input_audio,omitempty"`
// Output corresponds to the JSON schema field "output".
Output float64 `json:"output"`
// OutputAudio corresponds to the JSON schema field "output_audio".
OutputAudio *float64 `json:"output_audio,omitempty"`
}
type ProviderModelCostCNTiersElem ¶
type ProviderModelCostCNTiersElem struct {
// CacheRead corresponds to the JSON schema field "cache_read".
CacheRead *float64 `json:"cache_read,omitempty"`
// CacheWrite corresponds to the JSON schema field "cache_write".
CacheWrite *float64 `json:"cache_write,omitempty"`
// Input corresponds to the JSON schema field "input".
Input float64 `json:"input"`
// InputAudio corresponds to the JSON schema field "input_audio".
InputAudio *float64 `json:"input_audio,omitempty"`
// Output corresponds to the JSON schema field "output".
Output float64 `json:"output"`
// OutputAudio corresponds to the JSON schema field "output_audio".
OutputAudio *float64 `json:"output_audio,omitempty"`
// Reasoning corresponds to the JSON schema field "reasoning".
Reasoning *float64 `json:"reasoning,omitempty"`
// Thinking corresponds to the JSON schema field "thinking".
Thinking *ProviderModelCostCNTiersElemThinking `json:"thinking,omitempty"`
// Tier corresponds to the JSON schema field "tier".
Tier ProviderModelCostCNTiersElemTier `json:"tier"`
}
type ProviderModelCostCNTiersElemThinking ¶
type ProviderModelCostCNTiersElemThinking struct {
// CacheRead corresponds to the JSON schema field "cache_read".
CacheRead *float64 `json:"cache_read,omitempty"`
// CacheWrite corresponds to the JSON schema field "cache_write".
CacheWrite *float64 `json:"cache_write,omitempty"`
// Input corresponds to the JSON schema field "input".
Input float64 `json:"input"`
// InputAudio corresponds to the JSON schema field "input_audio".
InputAudio *float64 `json:"input_audio,omitempty"`
// Output corresponds to the JSON schema field "output".
Output float64 `json:"output"`
// OutputAudio corresponds to the JSON schema field "output_audio".
OutputAudio *float64 `json:"output_audio,omitempty"`
}
type ProviderModelCostCNTiersElemTier ¶
type ProviderModelCostCNTiersElemTier struct {
// Input corresponds to the JSON schema field "input".
Input *ProviderModelCostCNTiersElemTier_1Input `json:"input,omitempty"`
// Label corresponds to the JSON schema field "label".
Label *string `json:"label,omitempty"`
// Output corresponds to the JSON schema field "output".
Output *ProviderModelCostCNTiersElemTier_1Output `json:"output,omitempty"`
// Size corresponds to the JSON schema field "size".
Size *int `json:"size,omitempty"`
// Time corresponds to the JSON schema field "time".
Time *ProviderModelCostCNTiersElemTier_1Time `json:"time,omitempty"`
// Type corresponds to the JSON schema field "type".
Type string `json:"type"`
}
type ProviderModelCostCNTiersElemTier_1 ¶
type ProviderModelCostCNTiersElemTier_1 struct {
// Input corresponds to the JSON schema field "input".
Input *ProviderModelCostCNTiersElemTier_1Input `json:"input,omitempty"`
// Label corresponds to the JSON schema field "label".
Label *string `json:"label,omitempty"`
// Output corresponds to the JSON schema field "output".
Output *ProviderModelCostCNTiersElemTier_1Output `json:"output,omitempty"`
// Time corresponds to the JSON schema field "time".
Time *ProviderModelCostCNTiersElemTier_1Time `json:"time,omitempty"`
// Type corresponds to the JSON schema field "type".
Type string `json:"type"`
}
type ProviderModelCostCNTiersElemTier_1Input ¶
type ProviderModelCostCNTiersElemTier_1Input struct {
// Gt corresponds to the JSON schema field "gt".
Gt *int `json:"gt,omitempty"`
// Gte corresponds to the JSON schema field "gte".
Gte *int `json:"gte,omitempty"`
// Lt corresponds to the JSON schema field "lt".
Lt *int `json:"lt,omitempty"`
// Lte corresponds to the JSON schema field "lte".
Lte *int `json:"lte,omitempty"`
}
type ProviderModelCostCNTiersElemTier_1Output ¶
type ProviderModelCostCNTiersElemTier_1Output struct {
// Gt corresponds to the JSON schema field "gt".
Gt *int `json:"gt,omitempty"`
// Gte corresponds to the JSON schema field "gte".
Gte *int `json:"gte,omitempty"`
// Lt corresponds to the JSON schema field "lt".
Lt *int `json:"lt,omitempty"`
// Lte corresponds to the JSON schema field "lte".
Lte *int `json:"lte,omitempty"`
}
type ProviderModelCostCNTiersElemTier_1Time ¶
type ProviderModelCostCNTiersElemTier_1Time struct {
// Timezone corresponds to the JSON schema field "timezone".
Timezone string `json:"timezone"`
// Windows corresponds to the JSON schema field "windows".
Windows []ProviderModelCostCNTiersElemTier_1TimeWindowsElem `json:"windows"`
}
type ProviderModelCostCNTiersElemTier_1TimeWindowsElem ¶
type ProviderModelCostCNTiersElemTier_1TimeWindowsElem struct {
// Days corresponds to the JSON schema field "days".
Days []ProviderModelCostCNTiersElemTier_1TimeWindowsElemDaysElem `json:"days,omitempty"`
// End corresponds to the JSON schema field "end".
End string `json:"end"`
// Start corresponds to the JSON schema field "start".
Start string `json:"start"`
}
type ProviderModelCostCNTiersElemTier_1TimeWindowsElemDaysElem ¶
type ProviderModelCostCNTiersElemTier_1TimeWindowsElemDaysElem string
const ProviderModelCostCNTiersElemTier_1TimeWindowsElemDaysElemFriday ProviderModelCostCNTiersElemTier_1TimeWindowsElemDaysElem = "friday"
const ProviderModelCostCNTiersElemTier_1TimeWindowsElemDaysElemMonday ProviderModelCostCNTiersElemTier_1TimeWindowsElemDaysElem = "monday"
const ProviderModelCostCNTiersElemTier_1TimeWindowsElemDaysElemSaturday ProviderModelCostCNTiersElemTier_1TimeWindowsElemDaysElem = "saturday"
const ProviderModelCostCNTiersElemTier_1TimeWindowsElemDaysElemSunday ProviderModelCostCNTiersElemTier_1TimeWindowsElemDaysElem = "sunday"
const ProviderModelCostCNTiersElemTier_1TimeWindowsElemDaysElemThursday ProviderModelCostCNTiersElemTier_1TimeWindowsElemDaysElem = "thursday"
const ProviderModelCostCNTiersElemTier_1TimeWindowsElemDaysElemTuesday ProviderModelCostCNTiersElemTier_1TimeWindowsElemDaysElem = "tuesday"
const ProviderModelCostCNTiersElemTier_1TimeWindowsElemDaysElemWednesday ProviderModelCostCNTiersElemTier_1TimeWindowsElemDaysElem = "wednesday"
type ProviderModelCostContextOver200K ¶
type ProviderModelCostContextOver200K struct {
// CacheRead corresponds to the JSON schema field "cache_read".
CacheRead *float64 `json:"cache_read,omitempty"`
// CacheWrite corresponds to the JSON schema field "cache_write".
CacheWrite *float64 `json:"cache_write,omitempty"`
// Input corresponds to the JSON schema field "input".
Input float64 `json:"input"`
// InputAudio corresponds to the JSON schema field "input_audio".
InputAudio *float64 `json:"input_audio,omitempty"`
// Output corresponds to the JSON schema field "output".
Output float64 `json:"output"`
// OutputAudio corresponds to the JSON schema field "output_audio".
OutputAudio *float64 `json:"output_audio,omitempty"`
// Reasoning corresponds to the JSON schema field "reasoning".
Reasoning *float64 `json:"reasoning,omitempty"`
}
type ProviderModelCostPoints ¶
type ProviderModelCostPoints struct {
// CacheRead corresponds to the JSON schema field "cache_read".
CacheRead *float64 `json:"cache_read,omitempty"`
// Input corresponds to the JSON schema field "input".
Input float64 `json:"input"`
// OffPeakMultiplier corresponds to the JSON schema field "off_peak_multiplier".
OffPeakMultiplier *float64 `json:"off_peak_multiplier,omitempty"`
// Output corresponds to the JSON schema field "output".
Output float64 `json:"output"`
// PeakWindow corresponds to the JSON schema field "peak_window".
PeakWindow *ProviderModelCostPointsPeakWindow `json:"peak_window,omitempty"`
// PerTokens corresponds to the JSON schema field "per_tokens".
PerTokens int `json:"per_tokens"`
// Tiers corresponds to the JSON schema field "tiers".
Tiers []ProviderModelCostPointsTiersElem `json:"tiers,omitempty"`
}
Plan point consumption per the number of tokens declared by per_tokens.
type ProviderModelCostPointsPeakWindow ¶
type ProviderModelCostPointsPeakWindow struct {
// Days corresponds to the JSON schema field "days".
Days []ProviderModelCostPointsPeakWindowDaysElem `json:"days"`
// End corresponds to the JSON schema field "end".
End string `json:"end"`
// Start corresponds to the JSON schema field "start".
Start string `json:"start"`
// Timezone corresponds to the JSON schema field "timezone".
Timezone string `json:"timezone"`
}
type ProviderModelCostPointsPeakWindowDaysElem ¶
type ProviderModelCostPointsPeakWindowDaysElem string
const ProviderModelCostPointsPeakWindowDaysElemFriday ProviderModelCostPointsPeakWindowDaysElem = "friday"
const ProviderModelCostPointsPeakWindowDaysElemMonday ProviderModelCostPointsPeakWindowDaysElem = "monday"
const ProviderModelCostPointsPeakWindowDaysElemSaturday ProviderModelCostPointsPeakWindowDaysElem = "saturday"
const ProviderModelCostPointsPeakWindowDaysElemSunday ProviderModelCostPointsPeakWindowDaysElem = "sunday"
const ProviderModelCostPointsPeakWindowDaysElemThursday ProviderModelCostPointsPeakWindowDaysElem = "thursday"
const ProviderModelCostPointsPeakWindowDaysElemTuesday ProviderModelCostPointsPeakWindowDaysElem = "tuesday"
const ProviderModelCostPointsPeakWindowDaysElemWednesday ProviderModelCostPointsPeakWindowDaysElem = "wednesday"
type ProviderModelCostPointsTiersElem ¶
type ProviderModelCostPointsTiersElem struct {
// CacheRead corresponds to the JSON schema field "cache_read".
CacheRead *float64 `json:"cache_read,omitempty"`
// Input corresponds to the JSON schema field "input".
Input float64 `json:"input"`
// Output corresponds to the JSON schema field "output".
Output float64 `json:"output"`
// Tier corresponds to the JSON schema field "tier".
Tier ProviderModelCostPointsTiersElemTier `json:"tier"`
}
type ProviderModelCostPointsTiersElemTier ¶
type ProviderModelCostPointsTiersElemTier struct {
// Input corresponds to the JSON schema field "input".
Input *ProviderModelCostPointsTiersElemTier_1Input `json:"input,omitempty"`
// Label corresponds to the JSON schema field "label".
Label *string `json:"label,omitempty"`
// Output corresponds to the JSON schema field "output".
Output *ProviderModelCostPointsTiersElemTier_1Output `json:"output,omitempty"`
// Size corresponds to the JSON schema field "size".
Size *int `json:"size,omitempty"`
// Time corresponds to the JSON schema field "time".
Time *ProviderModelCostPointsTiersElemTier_1Time `json:"time,omitempty"`
// Type corresponds to the JSON schema field "type".
Type string `json:"type"`
}
type ProviderModelCostPointsTiersElemTier_1 ¶
type ProviderModelCostPointsTiersElemTier_1 struct {
// Input corresponds to the JSON schema field "input".
Input *ProviderModelCostPointsTiersElemTier_1Input `json:"input,omitempty"`
// Label corresponds to the JSON schema field "label".
Label *string `json:"label,omitempty"`
// Output corresponds to the JSON schema field "output".
Output *ProviderModelCostPointsTiersElemTier_1Output `json:"output,omitempty"`
// Time corresponds to the JSON schema field "time".
Time *ProviderModelCostPointsTiersElemTier_1Time `json:"time,omitempty"`
// Type corresponds to the JSON schema field "type".
Type string `json:"type"`
}
type ProviderModelCostPointsTiersElemTier_1Input ¶
type ProviderModelCostPointsTiersElemTier_1Input struct {
// Gt corresponds to the JSON schema field "gt".
Gt *int `json:"gt,omitempty"`
// Gte corresponds to the JSON schema field "gte".
Gte *int `json:"gte,omitempty"`
// Lt corresponds to the JSON schema field "lt".
Lt *int `json:"lt,omitempty"`
// Lte corresponds to the JSON schema field "lte".
Lte *int `json:"lte,omitempty"`
}
type ProviderModelCostPointsTiersElemTier_1Output ¶
type ProviderModelCostPointsTiersElemTier_1Output struct {
// Gt corresponds to the JSON schema field "gt".
Gt *int `json:"gt,omitempty"`
// Gte corresponds to the JSON schema field "gte".
Gte *int `json:"gte,omitempty"`
// Lt corresponds to the JSON schema field "lt".
Lt *int `json:"lt,omitempty"`
// Lte corresponds to the JSON schema field "lte".
Lte *int `json:"lte,omitempty"`
}
type ProviderModelCostPointsTiersElemTier_1Time ¶
type ProviderModelCostPointsTiersElemTier_1Time struct {
// Timezone corresponds to the JSON schema field "timezone".
Timezone string `json:"timezone"`
// Windows corresponds to the JSON schema field "windows".
Windows []ProviderModelCostPointsTiersElemTier_1TimeWindowsElem `json:"windows"`
}
type ProviderModelCostPointsTiersElemTier_1TimeWindowsElem ¶
type ProviderModelCostPointsTiersElemTier_1TimeWindowsElem struct {
// Days corresponds to the JSON schema field "days".
Days []ProviderModelCostPointsTiersElemTier_1TimeWindowsElemDaysElem `json:"days,omitempty"`
// End corresponds to the JSON schema field "end".
End string `json:"end"`
// Start corresponds to the JSON schema field "start".
Start string `json:"start"`
}
type ProviderModelCostPointsTiersElemTier_1TimeWindowsElemDaysElem ¶
type ProviderModelCostPointsTiersElemTier_1TimeWindowsElemDaysElem string
const ProviderModelCostPointsTiersElemTier_1TimeWindowsElemDaysElemFriday ProviderModelCostPointsTiersElemTier_1TimeWindowsElemDaysElem = "friday"
const ProviderModelCostPointsTiersElemTier_1TimeWindowsElemDaysElemMonday ProviderModelCostPointsTiersElemTier_1TimeWindowsElemDaysElem = "monday"
const ProviderModelCostPointsTiersElemTier_1TimeWindowsElemDaysElemSaturday ProviderModelCostPointsTiersElemTier_1TimeWindowsElemDaysElem = "saturday"
const ProviderModelCostPointsTiersElemTier_1TimeWindowsElemDaysElemSunday ProviderModelCostPointsTiersElemTier_1TimeWindowsElemDaysElem = "sunday"
const ProviderModelCostPointsTiersElemTier_1TimeWindowsElemDaysElemThursday ProviderModelCostPointsTiersElemTier_1TimeWindowsElemDaysElem = "thursday"
const ProviderModelCostPointsTiersElemTier_1TimeWindowsElemDaysElemTuesday ProviderModelCostPointsTiersElemTier_1TimeWindowsElemDaysElem = "tuesday"
const ProviderModelCostPointsTiersElemTier_1TimeWindowsElemDaysElemWednesday ProviderModelCostPointsTiersElemTier_1TimeWindowsElemDaysElem = "wednesday"
type ProviderModelCostTiersElem ¶
type ProviderModelCostTiersElem struct {
// CacheRead corresponds to the JSON schema field "cache_read".
CacheRead *float64 `json:"cache_read,omitempty"`
// CacheWrite corresponds to the JSON schema field "cache_write".
CacheWrite *float64 `json:"cache_write,omitempty"`
// Input corresponds to the JSON schema field "input".
Input float64 `json:"input"`
// InputAudio corresponds to the JSON schema field "input_audio".
InputAudio *float64 `json:"input_audio,omitempty"`
// Output corresponds to the JSON schema field "output".
Output float64 `json:"output"`
// OutputAudio corresponds to the JSON schema field "output_audio".
OutputAudio *float64 `json:"output_audio,omitempty"`
// Reasoning corresponds to the JSON schema field "reasoning".
Reasoning *float64 `json:"reasoning,omitempty"`
// Tier corresponds to the JSON schema field "tier".
Tier ProviderModelCostTiersElemTier `json:"tier"`
}
type ProviderModelCostTiersElemTier ¶
type ProviderModelCostTiersElemTier struct {
// Input corresponds to the JSON schema field "input".
Input *ProviderModelCostTiersElemTier_1Input `json:"input,omitempty"`
// Label corresponds to the JSON schema field "label".
Label *string `json:"label,omitempty"`
// Output corresponds to the JSON schema field "output".
Output *ProviderModelCostTiersElemTier_1Output `json:"output,omitempty"`
// Size corresponds to the JSON schema field "size".
Size *int `json:"size,omitempty"`
// Time corresponds to the JSON schema field "time".
Time *ProviderModelCostTiersElemTier_1Time `json:"time,omitempty"`
// Type corresponds to the JSON schema field "type".
Type string `json:"type"`
}
type ProviderModelCostTiersElemTier_1 ¶
type ProviderModelCostTiersElemTier_1 struct {
// Input corresponds to the JSON schema field "input".
Input *ProviderModelCostTiersElemTier_1Input `json:"input,omitempty"`
// Label corresponds to the JSON schema field "label".
Label *string `json:"label,omitempty"`
// Output corresponds to the JSON schema field "output".
Output *ProviderModelCostTiersElemTier_1Output `json:"output,omitempty"`
// Time corresponds to the JSON schema field "time".
Time *ProviderModelCostTiersElemTier_1Time `json:"time,omitempty"`
// Type corresponds to the JSON schema field "type".
Type string `json:"type"`
}
type ProviderModelCostTiersElemTier_1Input ¶
type ProviderModelCostTiersElemTier_1Input struct {
// Gt corresponds to the JSON schema field "gt".
Gt *int `json:"gt,omitempty"`
// Gte corresponds to the JSON schema field "gte".
Gte *int `json:"gte,omitempty"`
// Lt corresponds to the JSON schema field "lt".
Lt *int `json:"lt,omitempty"`
// Lte corresponds to the JSON schema field "lte".
Lte *int `json:"lte,omitempty"`
}
type ProviderModelCostTiersElemTier_1Output ¶
type ProviderModelCostTiersElemTier_1Output struct {
// Gt corresponds to the JSON schema field "gt".
Gt *int `json:"gt,omitempty"`
// Gte corresponds to the JSON schema field "gte".
Gte *int `json:"gte,omitempty"`
// Lt corresponds to the JSON schema field "lt".
Lt *int `json:"lt,omitempty"`
// Lte corresponds to the JSON schema field "lte".
Lte *int `json:"lte,omitempty"`
}
type ProviderModelCostTiersElemTier_1Time ¶
type ProviderModelCostTiersElemTier_1Time struct {
// Timezone corresponds to the JSON schema field "timezone".
Timezone string `json:"timezone"`
// Windows corresponds to the JSON schema field "windows".
Windows []ProviderModelCostTiersElemTier_1TimeWindowsElem `json:"windows"`
}
type ProviderModelCostTiersElemTier_1TimeWindowsElem ¶
type ProviderModelCostTiersElemTier_1TimeWindowsElem struct {
// Days corresponds to the JSON schema field "days".
Days []ProviderModelCostTiersElemTier_1TimeWindowsElemDaysElem `json:"days,omitempty"`
// End corresponds to the JSON schema field "end".
End string `json:"end"`
// Start corresponds to the JSON schema field "start".
Start string `json:"start"`
}
type ProviderModelCostTiersElemTier_1TimeWindowsElemDaysElem ¶
type ProviderModelCostTiersElemTier_1TimeWindowsElemDaysElem string
const ProviderModelCostTiersElemTier_1TimeWindowsElemDaysElemFriday ProviderModelCostTiersElemTier_1TimeWindowsElemDaysElem = "friday"
const ProviderModelCostTiersElemTier_1TimeWindowsElemDaysElemMonday ProviderModelCostTiersElemTier_1TimeWindowsElemDaysElem = "monday"
const ProviderModelCostTiersElemTier_1TimeWindowsElemDaysElemSaturday ProviderModelCostTiersElemTier_1TimeWindowsElemDaysElem = "saturday"
const ProviderModelCostTiersElemTier_1TimeWindowsElemDaysElemSunday ProviderModelCostTiersElemTier_1TimeWindowsElemDaysElem = "sunday"
const ProviderModelCostTiersElemTier_1TimeWindowsElemDaysElemThursday ProviderModelCostTiersElemTier_1TimeWindowsElemDaysElem = "thursday"
const ProviderModelCostTiersElemTier_1TimeWindowsElemDaysElemTuesday ProviderModelCostTiersElemTier_1TimeWindowsElemDaysElem = "tuesday"
const ProviderModelCostTiersElemTier_1TimeWindowsElemDaysElemWednesday ProviderModelCostTiersElemTier_1TimeWindowsElemDaysElem = "wednesday"
type ProviderModelExperimental ¶
type ProviderModelExperimental struct {
// Modes corresponds to the JSON schema field "modes".
Modes ProviderModelExperimentalModes `json:"modes,omitempty"`
}
type ProviderModelExperimentalModes ¶
type ProviderModelExperimentalModes map[string]struct { // Cost corresponds to the JSON schema field "cost". Cost *ProviderModelExperimentalModesValueCost `json:"cost,omitempty"` // CostCN corresponds to the JSON schema field "cost_cn". CostCN *ProviderModelExperimentalModesValueCostCN `json:"cost_cn,omitempty"` // Provider corresponds to the JSON schema field "provider". Provider *ProviderModelExperimentalModesValueProvider `json:"provider,omitempty"` }
type ProviderModelExperimentalModesValueCost ¶
type ProviderModelExperimentalModesValueCost struct {
// CacheRead corresponds to the JSON schema field "cache_read".
CacheRead *float64 `json:"cache_read,omitempty"`
// CacheWrite corresponds to the JSON schema field "cache_write".
CacheWrite *float64 `json:"cache_write,omitempty"`
// Input corresponds to the JSON schema field "input".
Input float64 `json:"input"`
// InputAudio corresponds to the JSON schema field "input_audio".
InputAudio *float64 `json:"input_audio,omitempty"`
// Output corresponds to the JSON schema field "output".
Output float64 `json:"output"`
// OutputAudio corresponds to the JSON schema field "output_audio".
OutputAudio *float64 `json:"output_audio,omitempty"`
// Reasoning corresponds to the JSON schema field "reasoning".
Reasoning *float64 `json:"reasoning,omitempty"`
}
type ProviderModelExperimentalModesValueCostCN ¶
type ProviderModelExperimentalModesValueCostCN struct {
// CacheRead corresponds to the JSON schema field "cache_read".
CacheRead *float64 `json:"cache_read,omitempty"`
// CacheWrite corresponds to the JSON schema field "cache_write".
CacheWrite *float64 `json:"cache_write,omitempty"`
// Input corresponds to the JSON schema field "input".
Input float64 `json:"input"`
// InputAudio corresponds to the JSON schema field "input_audio".
InputAudio *float64 `json:"input_audio,omitempty"`
// Output corresponds to the JSON schema field "output".
Output float64 `json:"output"`
// OutputAudio corresponds to the JSON schema field "output_audio".
OutputAudio *float64 `json:"output_audio,omitempty"`
// Reasoning corresponds to the JSON schema field "reasoning".
Reasoning *float64 `json:"reasoning,omitempty"`
}
type ProviderModelExperimentalModesValueProvider ¶
type ProviderModelExperimentalModesValueProvider struct {
// Body corresponds to the JSON schema field "body".
Body ProviderModelExperimentalModesValueProviderBody `json:"body,omitempty"`
// Headers corresponds to the JSON schema field "headers".
Headers ProviderModelExperimentalModesValueProviderHeaders `json:"headers,omitempty"`
}
type ProviderModelFamily ¶
type ProviderModelFamily string
const ProviderModelFamilyAgi ProviderModelFamily = "agi"
const ProviderModelFamilyAllam ProviderModelFamily = "allam"
const ProviderModelFamilyAllenai ProviderModelFamily = "allenai"
const ProviderModelFamilyAlpha ProviderModelFamily = "alpha"
const ProviderModelFamilyAura ProviderModelFamily = "aura"
const ProviderModelFamilyAuto ProviderModelFamily = "auto"
const ProviderModelFamilyBaichuan ProviderModelFamily = "baichuan"
const ProviderModelFamilyBart ProviderModelFamily = "bart"
const ProviderModelFamilyBge ProviderModelFamily = "bge"
const ProviderModelFamilyBigPickle ProviderModelFamily = "big-pickle"
const ProviderModelFamilyCanopylabs ProviderModelFamily = "canopylabs"
const ProviderModelFamilyChutesai ProviderModelFamily = "chutesai"
const ProviderModelFamilyClaude ProviderModelFamily = "claude"
const ProviderModelFamilyClaudeFable ProviderModelFamily = "claude-fable"
const ProviderModelFamilyClaudeHaiku ProviderModelFamily = "claude-haiku"
const ProviderModelFamilyClaudeOpus ProviderModelFamily = "claude-opus"
const ProviderModelFamilyClaudeSonnet ProviderModelFamily = "claude-sonnet"
const ProviderModelFamilyCodestral ProviderModelFamily = "codestral"
const ProviderModelFamilyCodestralEmbed ProviderModelFamily = "codestral-embed"
const ProviderModelFamilyCogito ProviderModelFamily = "cogito"
const ProviderModelFamilyCohereEmbed ProviderModelFamily = "cohere-embed"
const ProviderModelFamilyCommand ProviderModelFamily = "command"
const ProviderModelFamilyCommandA ProviderModelFamily = "command-a"
const ProviderModelFamilyCommandLight ProviderModelFamily = "command-light"
const ProviderModelFamilyCommandR ProviderModelFamily = "command-r"
const ProviderModelFamilyDallE ProviderModelFamily = "dall-e"
const ProviderModelFamilyDeepseek ProviderModelFamily = "deepseek"
const ProviderModelFamilyDeepseekFlash ProviderModelFamily = "deepseek-flash"
const ProviderModelFamilyDeepseekFlashFree ProviderModelFamily = "deepseek-flash-free"
const ProviderModelFamilyDeepseekFlashThink ProviderModelFamily = "deepseek-flash-think"
const ProviderModelFamilyDeepseekThinking ProviderModelFamily = "deepseek-thinking"
const ProviderModelFamilyDevstral ProviderModelFamily = "devstral"
const ProviderModelFamilyDiscolm ProviderModelFamily = "discolm"
const ProviderModelFamilyDistilbert ProviderModelFamily = "distilbert"
const ProviderModelFamilyDoubaoSeed ProviderModelFamily = "doubao-seed"
const ProviderModelFamilyDreamMachine ProviderModelFamily = "dream-machine"
const ProviderModelFamilyDreamshaper ProviderModelFamily = "dreamshaper"
const ProviderModelFamilyElephant ProviderModelFamily = "elephant"
const ProviderModelFamilyElevenlabs ProviderModelFamily = "elevenlabs"
const ProviderModelFamilyErnie ProviderModelFamily = "ernie"
const ProviderModelFamilyFalcon ProviderModelFamily = "falcon"
const ProviderModelFamilyFlux ProviderModelFamily = "flux"
const ProviderModelFamilyFugu ProviderModelFamily = "fugu"
const ProviderModelFamilyGemini ProviderModelFamily = "gemini"
const ProviderModelFamilyGeminiEmbedding ProviderModelFamily = "gemini-embedding"
const ProviderModelFamilyGeminiFlash ProviderModelFamily = "gemini-flash"
const ProviderModelFamilyGeminiFlashLite ProviderModelFamily = "gemini-flash-lite"
const ProviderModelFamilyGeminiPro ProviderModelFamily = "gemini-pro"
const ProviderModelFamilyGemma ProviderModelFamily = "gemma"
const ProviderModelFamilyGlm ProviderModelFamily = "glm"
const ProviderModelFamilyGlmAir ProviderModelFamily = "glm-air"
const ProviderModelFamilyGlmFlash ProviderModelFamily = "glm-flash"
const ProviderModelFamilyGlmFree ProviderModelFamily = "glm-free"
const ProviderModelFamilyGlmZ ProviderModelFamily = "glm-z"
const ProviderModelFamilyGlmv ProviderModelFamily = "glmv"
const ProviderModelFamilyGpt ProviderModelFamily = "gpt"
const ProviderModelFamilyGptCodex ProviderModelFamily = "gpt-codex"
const ProviderModelFamilyGptCodexMini ProviderModelFamily = "gpt-codex-mini"
const ProviderModelFamilyGptCodexSpark ProviderModelFamily = "gpt-codex-spark"
const ProviderModelFamilyGptImage ProviderModelFamily = "gpt-image"
const ProviderModelFamilyGptLuna ProviderModelFamily = "gpt-luna"
const ProviderModelFamilyGptMini ProviderModelFamily = "gpt-mini"
const ProviderModelFamilyGptNano ProviderModelFamily = "gpt-nano"
const ProviderModelFamilyGptOss ProviderModelFamily = "gpt-oss"
const ProviderModelFamilyGptPro ProviderModelFamily = "gpt-pro"
const ProviderModelFamilyGptSol ProviderModelFamily = "gpt-sol"
const ProviderModelFamilyGptTerra ProviderModelFamily = "gpt-terra"
const ProviderModelFamilyGranite ProviderModelFamily = "granite"
const ProviderModelFamilyGrok ProviderModelFamily = "grok"
const ProviderModelFamilyGrokBeta ProviderModelFamily = "grok-beta"
const ProviderModelFamilyGrokBuild ProviderModelFamily = "grok-build"
const ProviderModelFamilyGrokVision ProviderModelFamily = "grok-vision"
const ProviderModelFamilyGroq ProviderModelFamily = "groq"
const ProviderModelFamilyHermes ProviderModelFamily = "hermes"
const ProviderModelFamilyHunyuan ProviderModelFamily = "hunyuan"
const ProviderModelFamilyHy ProviderModelFamily = "Hy"
const ProviderModelFamilyHy3 ProviderModelFamily = "hy3"
const ProviderModelFamilyHy3Free ProviderModelFamily = "hy3-free"
const ProviderModelFamilyIdeogram ProviderModelFamily = "ideogram"
const ProviderModelFamilyImagen ProviderModelFamily = "imagen"
const ProviderModelFamilyIndictrans ProviderModelFamily = "indictrans"
const ProviderModelFamilyIntellect ProviderModelFamily = "intellect"
const ProviderModelFamilyInternS ProviderModelFamily = "intern-s"
const ProviderModelFamilyInternvl ProviderModelFamily = "internvl"
const ProviderModelFamilyJais ProviderModelFamily = "jais"
const ProviderModelFamilyJamba ProviderModelFamily = "jamba"
const ProviderModelFamilyJoyai ProviderModelFamily = "joyai"
const ProviderModelFamilyKatCoder ProviderModelFamily = "kat-coder"
const ProviderModelFamilyKimi ProviderModelFamily = "kimi"
const ProviderModelFamilyKimiFree ProviderModelFamily = "kimi-free"
const ProviderModelFamilyKimiK2 ProviderModelFamily = "kimi-k2"
const ProviderModelFamilyKimiK3 ProviderModelFamily = "kimi-k3"
const ProviderModelFamilyKimiThinking ProviderModelFamily = "kimi-thinking"
const ProviderModelFamilyLaguna ProviderModelFamily = "laguna"
const ProviderModelFamilyLagunaS ProviderModelFamily = "laguna-s"
const ProviderModelFamilyLing ProviderModelFamily = "ling"
const ProviderModelFamilyLingFlashFree ProviderModelFamily = "ling-flash-free"
const ProviderModelFamilyLiquid ProviderModelFamily = "liquid"
const ProviderModelFamilyLlama ProviderModelFamily = "llama"
const ProviderModelFamilyLlava ProviderModelFamily = "llava"
const ProviderModelFamilyLongcat ProviderModelFamily = "longcat"
const ProviderModelFamilyLucid ProviderModelFamily = "lucid"
const ProviderModelFamilyLyria ProviderModelFamily = "lyria"
const ProviderModelFamilyM2M ProviderModelFamily = "m2m"
const ProviderModelFamilyMagistral ProviderModelFamily = "magistral"
const ProviderModelFamilyMagistralMedium ProviderModelFamily = "magistral-medium"
const ProviderModelFamilyMagistralSmall ProviderModelFamily = "magistral-small"
const ProviderModelFamilyMai ProviderModelFamily = "mai"
const ProviderModelFamilyMelotts ProviderModelFamily = "melotts"
const ProviderModelFamilyMercury ProviderModelFamily = "mercury"
const ProviderModelFamilyMimo ProviderModelFamily = "mimo"
const ProviderModelFamilyMimoFlashFree ProviderModelFamily = "mimo-flash-free"
const ProviderModelFamilyMimoOmni ProviderModelFamily = "mimo-omni"
const ProviderModelFamilyMimoOmniFree ProviderModelFamily = "mimo-omni-free"
const ProviderModelFamilyMimoPro ProviderModelFamily = "mimo-pro"
const ProviderModelFamilyMimoProFree ProviderModelFamily = "mimo-pro-free"
const ProviderModelFamilyMimoV25 ProviderModelFamily = "mimo-v2.5"
const ProviderModelFamilyMimoV25Free ProviderModelFamily = "mimo-v2.5-free"
const ProviderModelFamilyMimoV25Pro ProviderModelFamily = "mimo-v2.5-pro"
const ProviderModelFamilyMimoV2Omni ProviderModelFamily = "mimo-v2-omni"
const ProviderModelFamilyMimoV2Pro ProviderModelFamily = "mimo-v2-pro"
const ProviderModelFamilyMinimax ProviderModelFamily = "minimax"
const ProviderModelFamilyMinimaxFree ProviderModelFamily = "minimax-free"
const ProviderModelFamilyMinimaxM2 ProviderModelFamily = "minimax-m2"
const ProviderModelFamilyMinimaxM21 ProviderModelFamily = "minimax-m2.1"
const ProviderModelFamilyMinimaxM25 ProviderModelFamily = "minimax-m2.5"
const ProviderModelFamilyMinimaxM27 ProviderModelFamily = "minimax-m2.7"
const ProviderModelFamilyMinimaxM3 ProviderModelFamily = "minimax-m3"
const ProviderModelFamilyMinimaxM3Free ProviderModelFamily = "minimax-m3-free"
const ProviderModelFamilyMinistral ProviderModelFamily = "ministral"
const ProviderModelFamilyMistral ProviderModelFamily = "mistral"
const ProviderModelFamilyMistralEmbed ProviderModelFamily = "mistral-embed"
const ProviderModelFamilyMistralLarge ProviderModelFamily = "mistral-large"
const ProviderModelFamilyMistralMedium ProviderModelFamily = "mistral-medium"
const ProviderModelFamilyMistralNemo ProviderModelFamily = "mistral-nemo"
const ProviderModelFamilyMistralSmall ProviderModelFamily = "mistral-small"
const ProviderModelFamilyMixtral ProviderModelFamily = "mixtral"
const ProviderModelFamilyMmPoly ProviderModelFamily = "mm-poly"
const ProviderModelFamilyModelRouter ProviderModelFamily = "model-router"
const ProviderModelFamilyMorph ProviderModelFamily = "morph"
const ProviderModelFamilyMuse ProviderModelFamily = "muse"
const ProviderModelFamilyNanoBanana ProviderModelFamily = "nano-banana"
const ProviderModelFamilyNemoretriever ProviderModelFamily = "nemoretriever"
const ProviderModelFamilyNemotron ProviderModelFamily = "nemotron"
const ProviderModelFamilyNemotronFree ProviderModelFamily = "nemotron-free"
const ProviderModelFamilyNeuralChat ProviderModelFamily = "neural-chat"
const ProviderModelFamilyNexN2 ProviderModelFamily = "nex-n2"
const ProviderModelFamilyNorth ProviderModelFamily = "north"
const ProviderModelFamilyNorthFree ProviderModelFamily = "north-free"
const ProviderModelFamilyNousresearch ProviderModelFamily = "nousresearch"
const ProviderModelFamilyNova ProviderModelFamily = "nova"
const ProviderModelFamilyNovaLite ProviderModelFamily = "nova-lite"
const ProviderModelFamilyNovaMicro ProviderModelFamily = "nova-micro"
const ProviderModelFamilyNovaPro ProviderModelFamily = "nova-pro"
const ProviderModelFamilyO ProviderModelFamily = "o"
const ProviderModelFamilyOMini ProviderModelFamily = "o-mini"
const ProviderModelFamilyOPro ProviderModelFamily = "o-pro"
const ProviderModelFamilyOpenchat ProviderModelFamily = "openchat"
const ProviderModelFamilyOpengvlab ProviderModelFamily = "opengvlab"
const ProviderModelFamilyOpenpangu ProviderModelFamily = "openpangu"
const ProviderModelFamilyOrnith ProviderModelFamily = "ornith"
const ProviderModelFamilyOsmosis ProviderModelFamily = "osmosis"
const ProviderModelFamilyOswe ProviderModelFamily = "oswe"
const ProviderModelFamilyPalmyra ProviderModelFamily = "palmyra"
const ProviderModelFamilyPangu ProviderModelFamily = "pangu"
const ProviderModelFamilyParakeet ProviderModelFamily = "parakeet"
const ProviderModelFamilyPhi ProviderModelFamily = "phi"
const ProviderModelFamilyPhoenix ProviderModelFamily = "phoenix"
const ProviderModelFamilyPixtral ProviderModelFamily = "pixtral"
const ProviderModelFamilyPlamo ProviderModelFamily = "plamo"
const ProviderModelFamilyPony ProviderModelFamily = "pony"
const ProviderModelFamilyQvq ProviderModelFamily = "qvq"
const ProviderModelFamilyQwen ProviderModelFamily = "qwen"
const ProviderModelFamilyQwen35 ProviderModelFamily = "qwen3.5"
const ProviderModelFamilyQwen36 ProviderModelFamily = "qwen3.6"
const ProviderModelFamilyQwen37Flash ProviderModelFamily = "qwen3.7-flash"
const ProviderModelFamilyQwen37Max ProviderModelFamily = "qwen3.7-max"
const ProviderModelFamilyQwen37Plus ProviderModelFamily = "qwen3.7-plus"
const ProviderModelFamilyQwen38Max ProviderModelFamily = "qwen3.8-max"
const ProviderModelFamilyQwenFree ProviderModelFamily = "qwen-free"
const ProviderModelFamilyQwerky ProviderModelFamily = "qwerky"
const ProviderModelFamilyRay ProviderModelFamily = "ray"
const ProviderModelFamilyRecraft ProviderModelFamily = "recraft"
const ProviderModelFamilyRednote ProviderModelFamily = "rednote"
const ProviderModelFamilyReka ProviderModelFamily = "reka"
const ProviderModelFamilyResnet ProviderModelFamily = "resnet"
const ProviderModelFamilyRing ProviderModelFamily = "ring"
const ProviderModelFamilyRing1TFree ProviderModelFamily = "ring-1t-free"
const ProviderModelFamilyRnj ProviderModelFamily = "rnj"
const ProviderModelFamilyRunway ProviderModelFamily = "runway"
const ProviderModelFamilySarvam ProviderModelFamily = "sarvam"
const ProviderModelFamilySeed ProviderModelFamily = "seed"
const ProviderModelFamilySensenova ProviderModelFamily = "sensenova"
const ProviderModelFamilySherlock ProviderModelFamily = "sherlock"
const ProviderModelFamilySkywork ProviderModelFamily = "skywork"
const ProviderModelFamilySmartTurn ProviderModelFamily = "smart-turn"
const ProviderModelFamilySolar ProviderModelFamily = "solar"
const ProviderModelFamilySolarMini ProviderModelFamily = "solar-mini"
const ProviderModelFamilySolarPro ProviderModelFamily = "solar-pro"
const ProviderModelFamilySonar ProviderModelFamily = "sonar"
const ProviderModelFamilySonarDeepResearch ProviderModelFamily = "sonar-deep-research"
const ProviderModelFamilySonarPro ProviderModelFamily = "sonar-pro"
const ProviderModelFamilySonarReasoning ProviderModelFamily = "sonar-reasoning"
const ProviderModelFamilySora ProviderModelFamily = "sora"
const ProviderModelFamilySourceful ProviderModelFamily = "sourceful"
const ProviderModelFamilySparkX2 ProviderModelFamily = "spark-x2"
const ProviderModelFamilySqlcoder ProviderModelFamily = "sqlcoder"
const ProviderModelFamilyStableDiffusion ProviderModelFamily = "stable-diffusion"
const ProviderModelFamilyStarling ProviderModelFamily = "starling"
const ProviderModelFamilyStep ProviderModelFamily = "step"
const ProviderModelFamilyTako ProviderModelFamily = "tako"
const ProviderModelFamilyTextEmbedding ProviderModelFamily = "text-embedding"
const ProviderModelFamilyTitan ProviderModelFamily = "titan"
const ProviderModelFamilyTitanEmbed ProviderModelFamily = "titan-embed"
const ProviderModelFamilyTngtech ProviderModelFamily = "tngtech"
const ProviderModelFamilyTopazlabs ProviderModelFamily = "topazlabs"
const ProviderModelFamilyTrinity ProviderModelFamily = "trinity"
const ProviderModelFamilyTrinityMini ProviderModelFamily = "trinity-mini"
const ProviderModelFamilyTstars ProviderModelFamily = "tstars"
const ProviderModelFamilyUnaCybertron ProviderModelFamily = "una-cybertron"
const ProviderModelFamilyUnsloth ProviderModelFamily = "unsloth"
const ProviderModelFamilyV0 ProviderModelFamily = "v0"
const ProviderModelFamilyVenice ProviderModelFamily = "venice"
const ProviderModelFamilyVeo ProviderModelFamily = "veo"
const ProviderModelFamilyVoxtral ProviderModelFamily = "voxtral"
const ProviderModelFamilyVoyage ProviderModelFamily = "voyage"
const ProviderModelFamilyWhisper ProviderModelFamily = "whisper"
const ProviderModelFamilyYi ProviderModelFamily = "yi"
const ProviderModelFamilyZephyr ProviderModelFamily = "zephyr"
type ProviderModelInterleaved_1 ¶
type ProviderModelInterleaved_1 struct {
// Field corresponds to the JSON schema field "field".
Field ProviderModelInterleaved_1Field `json:"field"`
}
type ProviderModelInterleaved_1Field ¶
type ProviderModelInterleaved_1Field string
const ProviderModelInterleaved_1FieldReasoningContent ProviderModelInterleaved_1Field = "reasoning_content"
const ProviderModelInterleaved_1FieldReasoningDetails ProviderModelInterleaved_1Field = "reasoning_details"
type ProviderModelLimit ¶
type ProviderModelLimit struct {
// Maximum context window in tokens.
Context int `json:"context"`
// Maximum input length in tokens when separately documented.
Input *int `json:"input,omitempty"`
// Maximum output length in tokens when documented.
Output *int `json:"output,omitempty"`
}
Token limits exposed by this provider model endpoint.
type ProviderModelModalities ¶
type ProviderModelModalities struct {
// Input modalities accepted by the model.
Input []ProviderModelModalitiesInputElem `json:"input"`
// Output modalities produced by the model.
Output []ProviderModelModalitiesOutputElem `json:"output"`
}
Input and output modalities exposed by this model endpoint.
type ProviderModelModalitiesInputElem ¶
type ProviderModelModalitiesInputElem string
const ProviderModelModalitiesInputElemAudio ProviderModelModalitiesInputElem = "audio"
const ProviderModelModalitiesInputElemImage ProviderModelModalitiesInputElem = "image"
const ProviderModelModalitiesInputElemPdf ProviderModelModalitiesInputElem = "pdf"
const ProviderModelModalitiesInputElemText ProviderModelModalitiesInputElem = "text"
const ProviderModelModalitiesInputElemVideo ProviderModelModalitiesInputElem = "video"
type ProviderModelModalitiesOutputElem ¶
type ProviderModelModalitiesOutputElem string
const ProviderModelModalitiesOutputElemAudio ProviderModelModalitiesOutputElem = "audio"
const ProviderModelModalitiesOutputElemImage ProviderModelModalitiesOutputElem = "image"
const ProviderModelModalitiesOutputElemPdf ProviderModelModalitiesOutputElem = "pdf"
const ProviderModelModalitiesOutputElemText ProviderModelModalitiesOutputElem = "text"
const ProviderModelModalitiesOutputElemVideo ProviderModelModalitiesOutputElem = "video"
type ProviderModelProvider ¶
type ProviderModelProvider struct {
// API corresponds to the JSON schema field "api".
API *string `json:"api,omitempty"`
// Body corresponds to the JSON schema field "body".
Body ProviderModelProviderBody `json:"body,omitempty"`
// Headers corresponds to the JSON schema field "headers".
Headers ProviderModelProviderHeaders `json:"headers,omitempty"`
// NPM corresponds to the JSON schema field "npm".
NPM *string `json:"npm,omitempty"`
// Shape corresponds to the JSON schema field "shape".
Shape *ProviderModelProviderShape `json:"shape,omitempty"`
}
type ProviderModelProviderShape ¶
type ProviderModelProviderShape string
const ProviderModelProviderShapeCompletions ProviderModelProviderShape = "completions"
const ProviderModelProviderShapeResponses ProviderModelProviderShape = "responses"
type ProviderModelStatus ¶
type ProviderModelStatus string
const ProviderModelStatusAlpha ProviderModelStatus = "alpha"
const ProviderModelStatusBeta ProviderModelStatus = "beta"
const ProviderModelStatusDeprecated ProviderModelStatus = "deprecated"
type ProviderModels ¶
type ProviderModels map[string]ProviderModel
type ProviderPlansCNElem ¶
type ProviderPlansCNElem struct {
// Name corresponds to the JSON schema field "name".
Name string `json:"name"`
// PriceMonth corresponds to the JSON schema field "price_month".
PriceMonth float64 `json:"price_month"`
// QuotaWindows corresponds to the JSON schema field "quota_windows".
QuotaWindows []string `json:"quota_windows,omitempty"`
// Usage corresponds to the JSON schema field "usage".
Usage *string `json:"usage,omitempty"`
}
type ProviderProtocol ¶
type ProviderProtocol string
const ProviderProtocolAnthropicCompatible ProviderProtocol = "anthropic-compatible"
const ProviderProtocolOpenaiCompatible ProviderProtocol = "openai-compatible"
const ProviderProtocolOpenaiResponses ProviderProtocol = "openai-responses"
type ReasoningOption ¶
type ReasoningOption struct {
// Default reasoning effort when the provider documents one.
Default interface{} `json:"default,omitempty"`
// Provider endpoint IDs where this reasoning control applies.
Endpoints []string `json:"endpoints,omitempty"`
// Request body field used by this reasoning control.
Field *string `json:"field,omitempty"`
// Maximum reasoning token budget.
Max *int `json:"max,omitempty"`
// Minimum reasoning token budget; -1 may represent automatic allocation.
Min *int `json:"min,omitempty"`
// Type corresponds to the JSON schema field "type".
Type string `json:"type"`
// Supported reasoning effort values; JSON null disables reasoning when supported.
Values []interface{} `json:"values,omitempty"`
}
Provider-specific reasoning control; type discriminates toggle, effort and token-budget forms.
type ReasoningOption_0 ¶
type ReasoningOption_0 struct {
// Provider endpoint IDs where this reasoning control applies.
Endpoints []string `json:"endpoints,omitempty"`
// Request body field used by this reasoning control.
Field *string `json:"field,omitempty"`
// Type corresponds to the JSON schema field "type".
Type string `json:"type"`
}
type ReasoningOption_1 ¶
type ReasoningOption_1 struct {
// Default reasoning effort when the provider documents one.
Default interface{} `json:"default,omitempty"`
// Provider endpoint IDs where this reasoning control applies.
Endpoints []string `json:"endpoints,omitempty"`
// Request body field used by this reasoning control.
Field *string `json:"field,omitempty"`
// Type corresponds to the JSON schema field "type".
Type string `json:"type"`
// Supported reasoning effort values; JSON null disables reasoning when supported.
Values []interface{} `json:"values"`
}
type ReasoningOption_1Default_0 ¶
type ReasoningOption_1Default_0 string
const ReasoningOption_1Default_0_High ReasoningOption_1Default_0 = "high"
const ReasoningOption_1Default_0_Low ReasoningOption_1Default_0 = "low"
const ReasoningOption_1Default_0_Max ReasoningOption_1Default_0 = "max"
const ReasoningOption_1Default_0_Medium ReasoningOption_1Default_0 = "medium"
const ReasoningOption_1Default_0_Minimal ReasoningOption_1Default_0 = "minimal"
const ReasoningOption_1Default_0_None ReasoningOption_1Default_0 = "none"
const ReasoningOption_1Default_0_Xhigh ReasoningOption_1Default_0 = "xhigh"
type ReasoningOption_1ValuesElem_0 ¶
type ReasoningOption_1ValuesElem_0 string
const ReasoningOption_1ValuesElem_0_High ReasoningOption_1ValuesElem_0 = "high"
const ReasoningOption_1ValuesElem_0_Low ReasoningOption_1ValuesElem_0 = "low"
const ReasoningOption_1ValuesElem_0_Max ReasoningOption_1ValuesElem_0 = "max"
const ReasoningOption_1ValuesElem_0_Medium ReasoningOption_1ValuesElem_0 = "medium"
const ReasoningOption_1ValuesElem_0_Minimal ReasoningOption_1ValuesElem_0 = "minimal"
const ReasoningOption_1ValuesElem_0_None ReasoningOption_1ValuesElem_0 = "none"
const ReasoningOption_1ValuesElem_0_Xhigh ReasoningOption_1ValuesElem_0 = "xhigh"
type ReasoningOption_2 ¶
type ReasoningOption_2 struct {
// Provider endpoint IDs where this reasoning control applies.
Endpoints []string `json:"endpoints,omitempty"`
// Request body field used by this reasoning control.
Field *string `json:"field,omitempty"`
// Maximum reasoning token budget.
Max *int `json:"max,omitempty"`
// Minimum reasoning token budget; -1 may represent automatic allocation.
Min *int `json:"min,omitempty"`
// Type corresponds to the JSON schema field "type".
Type string `json:"type"`
}
type SchemaMetadata ¶
type SchemaMetadata struct {
Package string `json:"package"`
PackageVersion string `json:"package_version"`
SchemaVersion int `json:"schema_version"`
SchemaSHA256 string `json:"schema_sha256"`
SourceRevision string `json:"source_revision"`
}
func SchemaInfo ¶
func SchemaInfo() SchemaMetadata
type Snapshot ¶
type Snapshot struct {
Manifest Manifest
Catalog Catalog
// contains filtered or unexported fields
}
Snapshot is one immutable, verified ModelLink catalog version.
func (*Snapshot) Model ¶
func (snapshot *Snapshot) Model(id string) (ModelMetadata, bool)
Model returns canonical base-model metadata by its globally unique ID.
func (*Snapshot) ProviderModel ¶
func (snapshot *Snapshot) ProviderModel( providerID string, modelID string, ) (ProviderModel, bool)
ProviderModel returns one concrete model offered by a provider. modelID is the provider's callable model identifier.
type UpdateStatus ¶
type UpdateStatus struct {
CurrentVersion string
LatestVersion string
UpdateAvailable bool
RegistryBehind bool
}
UpdateStatus compares the active snapshot with the registry latest version.
type Warning ¶
type Warning struct {
Code WarningCode
Message string
DataPackageVersion string
DataSchemaVersion int
DataSchemaSHA256 string
EmbeddedPackageVersion string
EmbeddedSchemaVersion int
EmbeddedSchemaSHA256 string
CurrentVersion string
RegistryVersion string
}
Warning describes an actionable, non-fatal compatibility condition.
type WarningCode ¶
type WarningCode string
WarningCode identifies a non-fatal condition found while loading data.
const ( // WarningSchemaSDKOutdated means the loaded data uses a newer Schema than // the one used to generate this SDK's public Go types. WarningSchemaSDKOutdated WarningCode = "schema_sdk_outdated" // WarningSchemaDataOutdated means the loaded data uses an older Schema than // the one embedded in this SDK. WarningSchemaDataOutdated WarningCode = "schema_data_outdated" // WarningSchemaMismatch means the two Schema hashes differ but their package // versions do not establish which copy is newer. WarningSchemaMismatch WarningCode = "schema_mismatch" // WarningRegistryBehind means the registry latest version is older than the // active local version and automatic downgrade was prevented. WarningRegistryBehind WarningCode = "registry_behind" )
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
basic
command
|
|
|
file-cache
command
|
|
|
update
command
|
|
|
version-control
command
|
|
|
internal
|
|
|
atomicfile
Package atomicfile writes files through a same-directory temporary file and atomically replaces the destination where the operating system supports it.
|
Package atomicfile writes files through a same-directory temporary file and atomically replaces the destination where the operating system supports it. |
|
cmd/schemacheck
command
|
|
|
cmd/schemagen
command
|
|
|
cmd/schemasync
command
|