capabilities

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package capabilities provides hardcoded model capability defaults and merging logic for user-provided overrides.

This follows the same pattern as the pricingTable in internal/pricing: a hardcoded last-resort fallback, keyed by provider/model. Last updated: 2026-02-25.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultCapabilities

func DefaultCapabilities(provider, modelID string) models.ModelCapabilities

DefaultCapabilities returns the best-known capabilities for a model based on hardcoded defaults. The provider parameter should be the lowercase provider name (e.g. "anthropic", "openai", "google"). All source fields are set to SourceDefault. Returns a zero-value ModelCapabilities with only ModelID and Provider set for unknown providers.

func MergeWithProfile

func MergeWithProfile(caps models.ModelCapabilities, profile ModelProfile) models.ModelCapabilities

MergeWithProfile applies user overrides from a ModelProfile to capabilities. Non-zero/non-nil profile fields override the corresponding capability values. Source is set to SourceConfig for overridden fields.

func ParseToolFormat

func ParseToolFormat(s string) models.ToolFormat

ParseToolFormat converts a string tool format name to a ToolFormat enum value.

Types

type ModelProfile

type ModelProfile struct {
	ContextBudget  int
	ToolFormat     string
	SystemRole     *bool
	MidConvoSystem *bool
}

ModelProfile holds user-provided overrides for model capabilities, typically derived from a recipe's "Model Profiles" section.

Jump to

Keyboard shortcuts

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