models

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AnthropicModels = map[string]ModelInfo{
	"claude-3-7-sonnet": {
		Name:     "claude-3-7-sonnet",
		Provider: ProviderAnthropic,
		APIShape: APIShapeAnthropic,
		Cost: ModelCost{
			InputUSDPer1M:           "3.00",
			InputCacheWriteUSDPer1M: "3.75",
			InputCacheReadUSDPer1M:  "0.30",
			OutputUSDPer1M:          "15.00",
		},
	},
	"claude-3-7-sonnet@20250219": {
		Name:     "claude-3-7-sonnet@20250219",
		Provider: ProviderAnthropic,
		APIShape: APIShapeAnthropic,
		Cost: ModelCost{
			InputUSDPer1M:           "3.00",
			InputCacheWriteUSDPer1M: "3.75",
			InputCacheReadUSDPer1M:  "0.30",
			OutputUSDPer1M:          "15.00",
		},
	},
	"claude-sonnet-4": {
		Name:     "claude-sonnet-4",
		Provider: ProviderAnthropic,
		APIShape: APIShapeAnthropic,
		Cost: ModelCost{
			InputUSDPer1M:           "3.00",
			InputCacheWriteUSDPer1M: "3.75",
			InputCacheReadUSDPer1M:  "0.30",
			OutputUSDPer1M:          "15.00",
		},
	},
	"claude-sonnet-4@20250514": {
		Name:     "claude-sonnet-4@20250514",
		Provider: ProviderAnthropic,
		APIShape: APIShapeAnthropic,
		Cost: ModelCost{
			InputUSDPer1M:           "3.00",
			InputCacheWriteUSDPer1M: "3.75",
			InputCacheReadUSDPer1M:  "0.30",
			OutputUSDPer1M:          "15.00",
		},
	},
	"claude-sonnet-4-5": {
		Name:     "claude-sonnet-4-5",
		Provider: ProviderAnthropic,
		APIShape: APIShapeAnthropic,
		Cost: ModelCost{
			InputUSDPer1M:           "3.00",
			InputCacheWriteUSDPer1M: "3.75",
			InputCacheReadUSDPer1M:  "0.30",
			OutputUSDPer1M:          "15.00",
		},
	},
	"claude-sonnet-4-5@20250929": {
		Name:     "claude-sonnet-4-5@20250929",
		Provider: ProviderAnthropic,
		APIShape: APIShapeAnthropic,
		Cost: ModelCost{
			InputUSDPer1M:           "3.00",
			InputCacheWriteUSDPer1M: "3.75",
			InputCacheReadUSDPer1M:  "0.30",
			OutputUSDPer1M:          "15.00",
		},
	},
}

AnthropicModels contains all Anthropic model definitions

View Source
var GeminiModels = map[string]ModelInfo{
	"gemini-2.0-flash": {
		Name:     "gemini-2.0-flash",
		Provider: ProviderGemini,
		APIShape: APIShapeGemini,
		Cost: ModelCost{
			InputUSDPer1M:          "0.1",
			InputCacheReadUSDPer1M: "0.025",
			OutputUSDPer1M:         "0.4",
		},
	},
	"gemini-2.0-flash-001": {
		Name:     "gemini-2.0-flash-001",
		Provider: ProviderGemini,
		APIShape: APIShapeGemini,
		Cost: ModelCost{
			InputUSDPer1M:          "0.1",
			InputCacheReadUSDPer1M: "0.025",
			OutputUSDPer1M:         "0.4",
		},
	},
	"gemini-2.5-pro": {
		Name:     "gemini-2.5-pro",
		Provider: ProviderGemini,
		APIShape: APIShapeGemini,
		Cost: ModelCost{
			InputUSDPer1M:          "1.25",
			InputCacheReadUSDPer1M: "0.31",
			OutputUSDPer1M:         "10",
		},
	},
	"gemini-2.5-pro-preview-06-05": {
		Name:     "gemini-2.5-pro-preview-06-05",
		Provider: ProviderGemini,
		APIShape: APIShapeGemini,
		Cost: ModelCost{
			InputUSDPer1M:          "1.25",
			InputCacheReadUSDPer1M: "0.31",
			OutputUSDPer1M:         "10",
		},
	},
	"gemini-2.5-flash": {
		Name:     "gemini-2.5-flash",
		Provider: ProviderGemini,
		APIShape: APIShapeGemini,
		Cost: ModelCost{
			InputUSDPer1M:          "0.3",
			InputCacheReadUSDPer1M: "0.075",
			OutputUSDPer1M:         "2.5",
		},
	},
	"gemini-2.5-flash-preview-05-20": {
		Name:     "gemini-2.5-flash-preview-05-20",
		Provider: ProviderGemini,
		APIShape: APIShapeGemini,
		Cost: ModelCost{
			InputUSDPer1M:          "0.3",
			InputCacheReadUSDPer1M: "0.075",
			OutputUSDPer1M:         "2.5",
		},
	},
	"gemini-3-pro-preview": {
		Name:     "gemini-3-pro-preview",
		Provider: ProviderGemini,
		APIShape: APIShapeGemini,
		Cost: ModelCost{
			InputUSDPer1M:          "2",
			InputCacheReadUSDPer1M: "0.2",
			OutputUSDPer1M:         "12",
		},
	},
}

GeminiModels contains all Gemini model definitions

View Source
var OpenAIModels = map[string]ModelInfo{
	"gpt-4.1": {
		Name:     "gpt-4.1",
		Provider: ProviderOpenAI,
		APIShape: APIShapeOpenAI,
		Cost: ModelCost{
			InputUSDPer1M:          "2",
			InputCacheReadUSDPer1M: "0.50",
			OutputUSDPer1M:         "8",
		},
	},
	"gpt-4.1-mini": {
		Name:     "gpt-4.1-mini",
		Provider: ProviderOpenAI,
		APIShape: APIShapeOpenAI,
		Cost: ModelCost{
			InputUSDPer1M:          "0.4",
			InputCacheReadUSDPer1M: "0.10",
			OutputUSDPer1M:         "1.6",
		},
	},
	"gpt-4o": {
		Name:     "gpt-4o",
		Provider: ProviderOpenAI,
		APIShape: APIShapeOpenAI,
		Cost: ModelCost{
			InputUSDPer1M:          "2.5",
			InputCacheReadUSDPer1M: "1.25",
			OutputUSDPer1M:         "10",
		},
	},
	"gpt-4o-mini": {
		Name:     "gpt-4o-mini",
		Provider: ProviderOpenAI,
		APIShape: APIShapeOpenAI,
		Cost: ModelCost{
			InputUSDPer1M:          "0.15",
			InputCacheReadUSDPer1M: "0.075",
			OutputUSDPer1M:         "0.6",
		},
	},
	"gpt-4o-nano": {
		Name:     "gpt-4o-nano",
		Provider: ProviderOpenAI,
		APIShape: APIShapeOpenAI,
		Cost: ModelCost{
			InputUSDPer1M:          "0.1",
			InputCacheReadUSDPer1M: "0.025",
			OutputUSDPer1M:         "0.4",
		},
	},
	"o4-mini": {
		Name:     "o4-mini",
		Provider: ProviderOpenAI,
		APIShape: APIShapeOpenAI,
		Cost: ModelCost{
			InputUSDPer1M:          "1.10",
			InputCacheReadUSDPer1M: "0.55",
			OutputUSDPer1M:         "4.40",
		},
	},
	"o3-mini": {
		Name:     "o3-mini",
		Provider: ProviderOpenAI,
		APIShape: APIShapeOpenAI,
		Cost: ModelCost{
			InputUSDPer1M:          "1.10",
			InputCacheReadUSDPer1M: "0.55",
			OutputUSDPer1M:         "4.40",
		},
	},
	"o3": {
		Name:     "o3",
		Provider: ProviderOpenAI,
		APIShape: APIShapeOpenAI,
		Cost: ModelCost{
			InputUSDPer1M:          "2",
			InputCacheReadUSDPer1M: "0.50",
			OutputUSDPer1M:         "8",
		},
	},
	"gpt-5-2025-08-07": {
		Name:     "gpt-5-2025-08-07",
		Provider: ProviderOpenAI,
		APIShape: APIShapeOpenAI,
		Cost: ModelCost{
			InputUSDPer1M:          "1.25",
			InputCacheReadUSDPer1M: "0.125",
			OutputUSDPer1M:         "10",
		},
	},
	"gpt-5.2-2025-12-11": {
		Name:     "gpt-5.2-2025-12-11",
		Provider: ProviderOpenAI,
		APIShape: APIShapeOpenAI,
		Cost: ModelCost{
			InputUSDPer1M:          "1.75",
			InputCacheReadUSDPer1M: "0.175",
			OutputUSDPer1M:         "14",
		},
	},
}

OpenAIModels contains all OpenAI model definitions

View Source
var OtherModels = map[string]ModelInfo{

	"kimi-k2": {
		Name:     "kimi-k2",
		Provider: ProviderMoonshot,
		APIShape: APIShapeOpenAI,
		Cost: ModelCost{
			InputUSDPer1M:          "0.56",
			InputCacheReadUSDPer1M: "0.14",
			OutputUSDPer1M:         "2.23",
		},
	},
	"kimi-k2-0711-preview": {
		Name:     "kimi-k2-0711-preview",
		Provider: ProviderMoonshot,
		APIShape: APIShapeOpenAI,
		Cost: ModelCost{
			InputUSDPer1M:          "0.56",
			InputCacheReadUSDPer1M: "0.14",
			OutputUSDPer1M:         "2.23",
		},
	},
	"moonshotai/kimi-k2": {
		Name:     "moonshotai/kimi-k2",
		Provider: ProviderOpenRouter,
		APIShape: APIShapeOpenAI,
		Cost: ModelCost{
			InputUSDPer1M:          "0.56",
			InputCacheReadUSDPer1M: "0.14",
			OutputUSDPer1M:         "2.23",
		},
	},

	"DeepSeek-R1": {
		Name:     "DeepSeek-R1",
		Provider: ProviderDeepSeek,
		APIShape: APIShapeOpenAI,
		Cost:     ModelCost{},
	},

	"Qwen2.5-VL-72B-Instruct": {
		Name:     "Qwen2.5-VL-72B-Instruct",
		Provider: ProviderQwen,
		APIShape: APIShapeOpenAI,
		Cost:     ModelCost{},
	},
}

OtherModels contains model definitions for Kimi, DeepSeek, Qwen, etc.

Functions

This section is empty.

Types

type APIShape

type APIShape string

APIShape represents the API shape/format

const (
	APIShapeOpenAI    APIShape = "openai"
	APIShapeAnthropic APIShape = "anthropic"
	APIShapeGemini    APIShape = "gemini"
)

APIShape constants

type ModelCost

type ModelCost struct {
	InputUSDPer1M           string
	InputCacheWriteUSDPer1M string
	InputCacheReadUSDPer1M  string
	OutputUSDPer1M          string
}

ModelCost represents the cost structure for a model

type ModelInfo

type ModelInfo struct {
	Name     string
	Provider Provider
	Cost     ModelCost
	APIShape APIShape
}

ModelInfo contains all information about a model

type Provider

type Provider string

Provider represents the AI provider

const (
	ProviderAnthropic  Provider = "anthropic"
	ProviderGemini     Provider = "gemini"
	ProviderOpenAI     Provider = "openai"
	ProviderMoonshot   Provider = "moonshot"
	ProviderDeepSeek   Provider = "deepseek"
	ProviderQwen       Provider = "qwen"
	ProviderOpenRouter Provider = "openrouter"
)

Provider constants

Jump to

Keyboard shortcuts

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