diff --git a/cmd/configure.go b/cmd/configure.go index 492b18d..ddd0f83 100644 --- a/cmd/configure.go +++ b/cmd/configure.go @@ -57,6 +57,9 @@ func getAnthropicModels() []string { "claude-3-5-sonnet-20241022", "claude-3-5-sonnet-latest", "claude-3-5-haiku-latest", + "claude-3-7-sonnet-20250219", + "claude-3-7-sonnet-latest", + "claude-3-5-haiku-20241022", } } diff --git a/examples/model-examples/claude-3-7-example.yaml b/examples/model-examples/claude-3-7-example.yaml new file mode 100644 index 0000000..a1f1c27 --- /dev/null +++ b/examples/model-examples/claude-3-7-example.yaml @@ -0,0 +1,29 @@ +# Example of using Claude 3.7 Sonnet model +# This example demonstrates using the dated version of Claude 3.7 Sonnet + +step_one: + input: examples/test.csv + model: claude-3-7-sonnet-20250219 + action: "Analyze this CSV file and provide detailed insights about the data." + output: STDOUT + +# Example of using Claude 3.7 Sonnet latest +step_two: + input: examples/test.csv + model: claude-3-7-sonnet-latest + action: "Analyze this CSV file and provide detailed insights about the data." + output: STDOUT + +# Example of using Claude 3.5 Haiku latest +step_three: + input: examples/test.csv + model: claude-3-5-haiku-latest + action: "Analyze this CSV file and list the key points." + output: STDOUT + +# Example of using Claude 3.5 Haiku with specific date +step_four: + input: examples/test.csv + model: claude-3-5-haiku-20241022 + action: "Analyze this CSV file and list the key points." + output: STDOUT diff --git a/utils/models/anthropic.go b/utils/models/anthropic.go index 795858b..db8a8b4 100644 --- a/utils/models/anthropic.go +++ b/utils/models/anthropic.go @@ -322,9 +322,16 @@ func (a *AnthropicProvider) ValidateModel(modelName string) bool { "claude-3-5-sonnet-20241022", "claude-3-5-sonnet-latest", "claude-3-5-haiku-latest", + "claude-3-7-sonnet-20250219", + "claude-3-7-sonnet-latest", + "claude-3-5-haiku-20241022", } - modelName = strings.ToLower(modelName) + // Trim whitespace and convert to lowercase + modelName = strings.TrimSpace(strings.ToLower(modelName)) + + // Add extra debug logging + a.debugf("Checking model '%s' against valid models: %v", modelName, validModels) // Check exact matches for _, valid := range validModels { if modelName == valid { @@ -337,6 +344,7 @@ func (a *AnthropicProvider) ValidateModel(modelName string) bool { modelFamilies := []string{ "claude-3-5-sonnet", "claude-3-5-haiku", + "claude-3-7-sonnet", } for _, family := range modelFamilies {