Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion crates/goose/src/providers/formats/gcpvertexai.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ pub enum ClaudeVersion {
Sonnet37,
/// Claude 3.5 Haiku
Haiku35,
/// Claude Sonnet 4
Sonnet4,
/// Generic Claude model for custom or new versions
Generic(String),
}
Expand Down Expand Up @@ -108,6 +110,7 @@ impl fmt::Display for GcpVertexAIModel {
ClaudeVersion::Sonnet35V2 => "claude-3-5-sonnet-v2@20241022",
ClaudeVersion::Sonnet37 => "claude-3-7-sonnet@20250219",
ClaudeVersion::Haiku35 => "claude-3-5-haiku@20241022",
ClaudeVersion::Sonnet4 => "claude-sonnet-4@20250514",
ClaudeVersion::Generic(name) => name,
},
Self::Gemini(version) => match version {
Expand All @@ -125,7 +128,7 @@ impl fmt::Display for GcpVertexAIModel {
impl GcpVertexAIModel {
/// Returns the default GCP location for the model.
///
/// Each model family has a well-known location:
/// Each model family has a well-known location based on availability:
/// - Claude models default to Ohio (us-east5)
/// - Gemini models default to Iowa (us-central1)
pub fn known_location(&self) -> GcpLocation {
Expand All @@ -146,6 +149,7 @@ impl TryFrom<&str> for GcpVertexAIModel {
"claude-3-5-sonnet-v2@20241022" => Ok(Self::Claude(ClaudeVersion::Sonnet35V2)),
"claude-3-7-sonnet@20250219" => Ok(Self::Claude(ClaudeVersion::Sonnet37)),
"claude-3-5-haiku@20241022" => Ok(Self::Claude(ClaudeVersion::Haiku35)),
"claude-sonnet-4@20250514" => Ok(Self::Claude(ClaudeVersion::Sonnet4)),
"gemini-1.5-pro-002" => Ok(Self::Gemini(GeminiVersion::Pro15)),
"gemini-2.0-flash-001" => Ok(Self::Gemini(GeminiVersion::Flash20)),
"gemini-2.0-pro-exp-02-05" => Ok(Self::Gemini(GeminiVersion::Pro20Exp)),
Expand Down Expand Up @@ -340,6 +344,7 @@ mod tests {
"claude-3-5-sonnet-v2@20241022",
"claude-3-7-sonnet@20250219",
"claude-3-5-haiku@20241022",
"claude-sonnet-4@20250514",
"gemini-1.5-pro-002",
"gemini-2.0-flash-001",
"gemini-2.0-pro-exp-02-05",
Expand All @@ -362,6 +367,7 @@ mod tests {
("claude-3-5-sonnet-v2@20241022", GcpLocation::Ohio),
("claude-3-7-sonnet@20250219", GcpLocation::Ohio),
("claude-3-5-haiku@20241022", GcpLocation::Ohio),
("claude-sonnet-4@20250514", GcpLocation::Ohio),
("gemini-1.5-pro-002", GcpLocation::Iowa),
("gemini-2.0-flash-001", GcpLocation::Iowa),
("gemini-2.0-pro-exp-02-05", GcpLocation::Iowa),
Expand Down
1 change: 1 addition & 0 deletions crates/goose/src/providers/gcpvertexai.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ impl Provider for GcpVertexAIProvider {
GcpVertexAIModel::Claude(ClaudeVersion::Sonnet35V2),
GcpVertexAIModel::Claude(ClaudeVersion::Sonnet37),
GcpVertexAIModel::Claude(ClaudeVersion::Haiku35),
GcpVertexAIModel::Claude(ClaudeVersion::Sonnet4),
GcpVertexAIModel::Gemini(GeminiVersion::Pro15),
GcpVertexAIModel::Gemini(GeminiVersion::Flash20),
GcpVertexAIModel::Gemini(GeminiVersion::Pro20Exp),
Expand Down
9 changes: 5 additions & 4 deletions ui/desktop/src/components/settings/models/GooseModels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ export const gooseModels: Model[] = [
{ id: 22, name: 'claude-3-5-sonnet-v2@20241022', provider: 'GCP Vertex AI' },
{ id: 23, name: 'claude-3-5-sonnet@20240620', provider: 'GCP Vertex AI' },
{ id: 24, name: 'claude-3-5-haiku@20241022', provider: 'GCP Vertex AI' },
{ id: 25, name: 'gemini-2.0-pro-exp-02-05', provider: 'GCP Vertex AI' },
{ id: 26, name: 'gemini-2.0-flash-001', provider: 'GCP Vertex AI' },
{ id: 27, name: 'gemini-1.5-pro-002', provider: 'GCP Vertex AI' },
{ id: 28, name: 'gemini-2.5-pro-exp-03-25', provider: 'GCP Vertex AI' },
{ id: 25, name: 'claude-sonnet-4@20250514', provider: 'GCP Vertex AI' },
{ id: 26, name: 'gemini-2.0-pro-exp-02-05', provider: 'GCP Vertex AI' },
{ id: 27, name: 'gemini-2.0-flash-001', provider: 'GCP Vertex AI' },
{ id: 28, name: 'gemini-1.5-pro-002', provider: 'GCP Vertex AI' },
{ id: 29, name: 'gemini-2.5-pro-exp-03-25', provider: 'GCP Vertex AI' },
];
Loading