More 3.7 removal (#6414)
Co-authored-by: Douwe Osinga <douwe@squareup.com>
This commit is contained in:
@@ -436,7 +436,7 @@ pub fn create_request(
|
|||||||
.insert("temperature".to_string(), json!(temp));
|
.insert("temperature".to_string(), json!(temp));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add thinking parameters for claude-3-7-sonnet model
|
// Add thinking parameters when CLAUDE_THINKING_ENABLED is set
|
||||||
let is_thinking_enabled = std::env::var("CLAUDE_THINKING_ENABLED").is_ok();
|
let is_thinking_enabled = std::env::var("CLAUDE_THINKING_ENABLED").is_ok();
|
||||||
if is_thinking_enabled {
|
if is_thinking_enabled {
|
||||||
// Minimum budget_tokens is 1024
|
// Minimum budget_tokens is 1024
|
||||||
|
|||||||
@@ -76,8 +76,6 @@ pub enum GcpVertexAIModel {
|
|||||||
/// Represents available versions of the Claude model for goose.
|
/// Represents available versions of the Claude model for goose.
|
||||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
pub enum ClaudeVersion {
|
pub enum ClaudeVersion {
|
||||||
/// Claude 3.7 Sonnet
|
|
||||||
Sonnet37,
|
|
||||||
/// Claude Sonnet 4
|
/// Claude Sonnet 4
|
||||||
Sonnet4,
|
Sonnet4,
|
||||||
/// Claude Opus 4
|
/// Claude Opus 4
|
||||||
@@ -113,7 +111,6 @@ impl fmt::Display for GcpVertexAIModel {
|
|||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
let model_id = match self {
|
let model_id = match self {
|
||||||
Self::Claude(version) => match version {
|
Self::Claude(version) => match version {
|
||||||
ClaudeVersion::Sonnet37 => "claude-3-7-sonnet@20250219",
|
|
||||||
ClaudeVersion::Sonnet4 => "claude-sonnet-4@20250514",
|
ClaudeVersion::Sonnet4 => "claude-sonnet-4@20250514",
|
||||||
ClaudeVersion::Opus4 => "claude-opus-4@20250514",
|
ClaudeVersion::Opus4 => "claude-opus-4@20250514",
|
||||||
ClaudeVersion::Generic(name) => name,
|
ClaudeVersion::Generic(name) => name,
|
||||||
@@ -157,7 +154,6 @@ impl TryFrom<&str> for GcpVertexAIModel {
|
|||||||
fn try_from(s: &str) -> Result<Self, Self::Error> {
|
fn try_from(s: &str) -> Result<Self, Self::Error> {
|
||||||
// Known models
|
// Known models
|
||||||
match s {
|
match s {
|
||||||
"claude-3-7-sonnet@20250219" => Ok(Self::Claude(ClaudeVersion::Sonnet37)),
|
|
||||||
"claude-sonnet-4@20250514" => Ok(Self::Claude(ClaudeVersion::Sonnet4)),
|
"claude-sonnet-4@20250514" => Ok(Self::Claude(ClaudeVersion::Sonnet4)),
|
||||||
"claude-opus-4@20250514" => Ok(Self::Claude(ClaudeVersion::Opus4)),
|
"claude-opus-4@20250514" => Ok(Self::Claude(ClaudeVersion::Opus4)),
|
||||||
"gemini-1.5-pro-002" => Ok(Self::Gemini(GeminiVersion::Pro15)),
|
"gemini-1.5-pro-002" => Ok(Self::Gemini(GeminiVersion::Pro15)),
|
||||||
@@ -376,7 +372,6 @@ mod tests {
|
|||||||
fn test_model_parsing() -> Result<()> {
|
fn test_model_parsing() -> Result<()> {
|
||||||
let valid_models = [
|
let valid_models = [
|
||||||
"claude-sonnet-4-20250514",
|
"claude-sonnet-4-20250514",
|
||||||
"claude-3-7-sonnet@20250219",
|
|
||||||
"claude-sonnet-4@20250514",
|
"claude-sonnet-4@20250514",
|
||||||
"gemini-1.5-pro-002",
|
"gemini-1.5-pro-002",
|
||||||
"gemini-2.0-flash-001",
|
"gemini-2.0-flash-001",
|
||||||
@@ -399,7 +394,6 @@ mod tests {
|
|||||||
fn test_default_locations() -> Result<()> {
|
fn test_default_locations() -> Result<()> {
|
||||||
let test_cases = [
|
let test_cases = [
|
||||||
("claude-sonnet-4-20250514", GcpLocation::Ohio),
|
("claude-sonnet-4-20250514", GcpLocation::Ohio),
|
||||||
("claude-3-7-sonnet@20250219", GcpLocation::Ohio),
|
|
||||||
("claude-sonnet-4@20250514", GcpLocation::Ohio),
|
("claude-sonnet-4@20250514", GcpLocation::Ohio),
|
||||||
("gemini-1.5-pro-002", GcpLocation::Iowa),
|
("gemini-1.5-pro-002", GcpLocation::Iowa),
|
||||||
("gemini-2.0-flash-001", GcpLocation::Iowa),
|
("gemini-2.0-flash-001", GcpLocation::Iowa),
|
||||||
|
|||||||
@@ -440,7 +440,6 @@ impl Provider for GcpVertexAIProvider {
|
|||||||
Self: Sized,
|
Self: Sized,
|
||||||
{
|
{
|
||||||
let model_strings: Vec<String> = [
|
let model_strings: Vec<String> = [
|
||||||
GcpVertexAIModel::Claude(ClaudeVersion::Sonnet37),
|
|
||||||
GcpVertexAIModel::Claude(ClaudeVersion::Sonnet4),
|
GcpVertexAIModel::Claude(ClaudeVersion::Sonnet4),
|
||||||
GcpVertexAIModel::Claude(ClaudeVersion::Opus4),
|
GcpVertexAIModel::Claude(ClaudeVersion::Opus4),
|
||||||
GcpVertexAIModel::Gemini(GeminiVersion::Pro15),
|
GcpVertexAIModel::Gemini(GeminiVersion::Pro15),
|
||||||
@@ -629,7 +628,6 @@ mod tests {
|
|||||||
.iter()
|
.iter()
|
||||||
.map(|m| m.name.clone())
|
.map(|m| m.name.clone())
|
||||||
.collect();
|
.collect();
|
||||||
assert!(model_names.contains(&"claude-3-7-sonnet@20250219".to_string()));
|
|
||||||
assert!(model_names.contains(&"claude-sonnet-4@20250514".to_string()));
|
assert!(model_names.contains(&"claude-sonnet-4@20250514".to_string()));
|
||||||
assert!(model_names.contains(&"gemini-1.5-pro-002".to_string()));
|
assert!(model_names.contains(&"gemini-1.5-pro-002".to_string()));
|
||||||
assert!(model_names.contains(&"gemini-2.5-pro".to_string()));
|
assert!(model_names.contains(&"gemini-2.5-pro".to_string()));
|
||||||
|
|||||||
Reference in New Issue
Block a user