anthropic

package
v0.59.21 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AnthropicModelsURL is the URL to Anthropic's model documentation
	AnthropicModelsURL = "https://platform.claude.com/docs/en/about-claude/models/overview"

	// CacheTTL is how long to cache the model data (24 hours)
	CacheTTL = 24 * time.Hour
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AnthropicModel

type AnthropicModel struct {
	ModelName          string   `json:"modelName"`                  // e.g., "Claude Sonnet 4.5"
	ClaudeAPIID        string   `json:"claudeApiId"`                // e.g., "claude-sonnet-4-5-20250929"
	ClaudeAPIAlias     string   `json:"claudeApiAlias"`             // e.g., "claude-sonnet-4-5"
	AWSBedrockID       string   `json:"awsBedrockId"`               // e.g., "anthropic.claude-sonnet-4-5-20250929-v1:0"
	GCPVertexAIID      string   `json:"gcpVertexAiId"`              // e.g., "claude-sonnet-4-5@20250929"
	Pricing            string   `json:"pricing"`                    // e.g., "$3 / input MTok $15 / output MTok"
	ComparativeLatency string   `json:"comparativeLatency"`         // e.g., "Fast", "Fastest", "Moderate"
	ContextWindow      string   `json:"contextWindow"`              // e.g., "200K tokens / 1M tokens (beta)"
	MaxOutput          string   `json:"maxOutput"`                  // e.g., "64K tokens"
	KnowledgeCutoff    string   `json:"knowledgeCutoff"`            // e.g., "Jan 2025"
	TrainingDataCutoff string   `json:"trainingDataCutoff"`         // e.g., "Jul 2025"
	ModelFamily        string   `json:"modelFamily"`                // e.g., "sonnet", "haiku", "opus"
	ModelVersion       string   `json:"modelVersion"`               // e.g., "4.5", "4.1"
	RegionsSupported   []string `json:"regionsSupported,omitempty"` // AWS regions where model is available
}

AnthropicModel represents an Anthropic Claude model with all provider IDs and metadata

type AnthropicModelSearchResult

type AnthropicModelSearchResult struct {
	Models     []AnthropicModel `json:"models"`
	TotalCount int              `json:"totalCount"`
}

AnthropicModelSearchResult represents search results for Anthropic models

type AnthropicTool

type AnthropicTool struct {
	// contains filtered or unexported fields
}

AnthropicTool handles Anthropic Claude model queries across all platforms

func NewAnthropicTool

func NewAnthropicTool() *AnthropicTool

NewAnthropicTool creates a new Anthropic tool

func (*AnthropicTool) Execute

func (t *AnthropicTool) Execute(ctx context.Context, logger *logrus.Logger, cache *sync.Map, args map[string]any) (*mcp.CallToolResult, error)

Execute handles Anthropic model queries

type CachedModelData

type CachedModelData struct {
	Models    []AnthropicModel
	FetchedAt time.Time
}

CachedModelData holds cached model data with expiry

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

Parser handles fetching and parsing Anthropic model documentation

func NewParser

func NewParser(logger *logrus.Logger, cache *sync.Map) *Parser

NewParser creates a new Anthropic model parser

func (*Parser) GetLatestModels

func (p *Parser) GetLatestModels(ctx context.Context) ([]AnthropicModel, error)

GetLatestModels fetches and parses the latest Anthropic models It returns only the latest version of each model family

Jump to

Keyboard shortcuts

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