Documentation
¶
Overview ¶
Package modelcatalog resolves immutable provider/model snapshots from the local coding configuration. It never performs discovery or network I/O.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInvalid = errors.New("coding model catalog: invalid configuration")
ErrInvalid means a registry entry or selection cannot be resolved safely.
Functions ¶
This section is empty.
Types ¶
type Catalog ¶
type Catalog interface {
Resolve(Selection) (ResolvedModel, error)
List() []Entry
}
Catalog is the read-only model lookup boundary used by CLI/TUI/runtime. Future extensions can supply the same interface without changing callers.
type Entry ¶
type Entry struct {
Ref config.ModelRef
ContextWindow int
ReasoningLevels []config.ReasoningLevel
DefaultReasoning *config.ReasoningLevel
Variants []string
DefaultVariant string
}
Entry is one selectable model and its declared presets.
type Limits ¶
type Limits struct {
ContextWindow int
}
Limits are local context metadata and are never sent as request options.
type ResolvedModel ¶
type ResolvedModel struct {
Ref config.ModelRef
Protocol config.Protocol
Endpoint Endpoint
Limits Limits
Compatibility openai.Compatibility
Capabilities ai.CapabilityOverride
Options config.ModelOptions
Variant string
ReasoningLevels []config.ReasoningLevel
ReasoningLevel *config.ReasoningLevel
ReasoningBudgets map[config.ReasoningLevel]int
}
ResolvedModel is an immutable-by-convention runtime snapshot.
func (ResolvedModel) Clone ¶
func (m ResolvedModel) Clone() ResolvedModel
Clone returns a fully detached runtime snapshot.
func (ResolvedModel) Equal ¶
func (m ResolvedModel) Equal(other ResolvedModel) bool
Equal reports value equality without relying on pointer or map identity.
type Selection ¶
type Selection struct {
Ref config.ModelRef
Variant string
ReasoningOverride *config.ReasoningLevel
}
Selection is one process-local model, variant, and reasoning choice.
func SelectionFromConfig ¶
SelectionFromConfig returns the initial process-local selection.