modelconfig

package
v0.2.0-beta Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	TypeChat      = "chat"
	TypeImageWS   = "image_ws"
	TypeImageLite = "image_lite"
	TypeImageEdit = "image_edit"
	TypeVideo     = "video"
)

Internal runtime type constants.

View Source
const (
	PoolBasic = "basic"
	PoolSuper = "super"
	PoolHeavy = "heavy"
)

Pool floor constants.

View Source
const (
	QuotaAuto   = "auto"
	QuotaFast   = "fast"
	QuotaExpert = "expert"
	QuotaHeavy  = "heavy"
)

Quota mode constants.

Variables

View Source
var EmbeddedFS embed.FS

Functions

func DerivePublicType

func DerivePublicType(internalType string) string

DerivePublicType maps an internal runtime type to its public API type.

Types

type ModelSpec

type ModelSpec struct {
	ID            string `toml:"id"`
	DisplayName   string `toml:"display_name"`
	Type          string `toml:"type"` // internal runtime type
	Enabled       bool   `toml:"enabled"`
	PoolFloor     string `toml:"pool_floor"`
	QuotaMode     string `toml:"quota_mode"`
	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 Load

func Load(embeddedFS embed.FS, externalPath string) ([]ModelSpec, error)

Load loads the model catalog from the embedded FS or an external file. If externalPath is non-empty, it loads from that file (resolved as-is by the caller). If externalPath is empty, it loads from the embedded FS. Returns validated specs with PublicType derived, or an error.

Jump to

Keyboard shortcuts

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