Documentation
¶
Index ¶
Constants ¶
const ( TypeChat = "chat" TypeImageWS = "image_ws" TypeImageLite = "image_lite" TypeImageEdit = "image_edit" TypeVideo = "video" )
Internal runtime type constants.
const ( PoolBasic = "basic" PoolSuper = "super" PoolHeavy = "heavy" )
Pool floor constants.
Variables ¶
var EmbeddedFS embed.FS
Functions ¶
func DerivePublicType ¶
DerivePublicType maps an internal runtime type to its public API type.
Types ¶
type ModeSpec ¶
type ModeSpec struct {
ID string `toml:"id"`
UpstreamName string `toml:"upstream_name"`
WindowSeconds int `toml:"window_seconds"`
DefaultQuota map[string]int `toml:"default_quota"` // pool -> default quota
LocalQuota bool `toml:"local_quota,omitempty"` // skip upstream rate-limits sync
}
ModeSpec represents a quota mode entry in the static catalog.
type ModelSpec ¶
type ModelSpec struct {
ID string `toml:"id"`
DisplayName string `toml:"display_name"`
Type string `toml:"type"`
Enabled bool `toml:"enabled"`
PoolFloor string `toml:"pool_floor"`
Mode string `toml:"mode,omitempty"`
QuotaSync *bool `toml:"quota_sync,omitempty"`
CooldownSeconds int `toml:"cooldown_seconds,omitempty"`
UpstreamModel string `toml:"upstream_model,omitempty"`
UpstreamMode string `toml:"upstream_mode,omitempty"`
ForceThinking bool `toml:"force_thinking,omitempty"`
EnablePro bool `toml:"enable_pro,omitempty"`
PublicType string `toml:"-"` // derived at load time, not serialized
}
ModelSpec represents a single model entry in the static catalog.
func (*ModelSpec) IsQuotaTracked ¶
IsQuotaTracked reports whether the model participates in mode quota tracking. Default is true (QuotaSync nil); only explicit quota_sync = false opts out.