fix: use v1beta1 API version for Google/MaaS models on GCP Vertex AI (#8278)
Some checks failed
Rebuild Skills Marketplace / rebuild-docs (push) Has been cancelled
Canary / Prepare Version (push) Has been cancelled
Unused Dependencies / machete (push) Has been cancelled
CI / changes (push) Has been cancelled
CI / Build Rust Project on Windows (push) Has been cancelled
Live Provider Tests / check-fork (push) Has been cancelled
Publish Docker Image / docker (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
Canary / build-cli (push) Has been cancelled
Canary / Upload Install Script (push) Has been cancelled
Canary / bundle-desktop (push) Has been cancelled
Canary / bundle-desktop-intel (push) Has been cancelled
Canary / bundle-desktop-linux (push) Has been cancelled
Canary / bundle-desktop-windows (push) Has been cancelled
Canary / Release (push) Has been cancelled
CI / Check Rust Code Format (push) Has been cancelled
CI / Build and Test Rust Project (push) Has been cancelled
CI / Lint Rust Code (push) Has been cancelled
CI / Check OpenAPI Schema is Up-to-Date (push) Has been cancelled
CI / Test and Lint Electron Desktop App (push) Has been cancelled
Live Provider Tests / changes (push) Has been cancelled
Live Provider Tests / Build Binary (push) Has been cancelled
Live Provider Tests / Smoke Tests (push) Has been cancelled
Live Provider Tests / Smoke Tests (Code Execution) (push) Has been cancelled
Live Provider Tests / Compaction Tests (push) Has been cancelled
Live Provider Tests / goose server HTTP integration tests (push) Has been cancelled
Update GitHub Health Dashboard / Update Health Dashboard (push) Has been cancelled
Close Stale PRs / Mark and Close Stale PRs (push) Has been cancelled
Cargo Deny / deny (push) Has been cancelled
Create Minor Release PR / release (push) Has been cancelled
Some checks failed
Rebuild Skills Marketplace / rebuild-docs (push) Has been cancelled
Canary / Prepare Version (push) Has been cancelled
Unused Dependencies / machete (push) Has been cancelled
CI / changes (push) Has been cancelled
CI / Build Rust Project on Windows (push) Has been cancelled
Live Provider Tests / check-fork (push) Has been cancelled
Publish Docker Image / docker (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
Canary / build-cli (push) Has been cancelled
Canary / Upload Install Script (push) Has been cancelled
Canary / bundle-desktop (push) Has been cancelled
Canary / bundle-desktop-intel (push) Has been cancelled
Canary / bundle-desktop-linux (push) Has been cancelled
Canary / bundle-desktop-windows (push) Has been cancelled
Canary / Release (push) Has been cancelled
CI / Check Rust Code Format (push) Has been cancelled
CI / Build and Test Rust Project (push) Has been cancelled
CI / Lint Rust Code (push) Has been cancelled
CI / Check OpenAPI Schema is Up-to-Date (push) Has been cancelled
CI / Test and Lint Electron Desktop App (push) Has been cancelled
Live Provider Tests / changes (push) Has been cancelled
Live Provider Tests / Build Binary (push) Has been cancelled
Live Provider Tests / Smoke Tests (push) Has been cancelled
Live Provider Tests / Smoke Tests (Code Execution) (push) Has been cancelled
Live Provider Tests / Compaction Tests (push) Has been cancelled
Live Provider Tests / goose server HTTP integration tests (push) Has been cancelled
Update GitHub Health Dashboard / Update Health Dashboard (push) Has been cancelled
Close Stale PRs / Mark and Close Stale PRs (push) Has been cancelled
Cargo Deny / deny (push) Has been cancelled
Create Minor Release PR / release (push) Has been cancelled
Signed-off-by: Andrew Grigorev <andrew@ei-grad.ru> Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -87,8 +87,17 @@ fn build_vertex_url(
|
||||
(ModelProvider::MaaS(_), false) => "generateContent",
|
||||
};
|
||||
|
||||
// Anthropic's Vertex AI docs specify v1 for rawPredict endpoints.
|
||||
// The official google-genai SDK uses v1beta1 for Google models,
|
||||
// and the global endpoint requires it.
|
||||
let api_version = match &provider {
|
||||
ModelProvider::Anthropic => "v1",
|
||||
ModelProvider::Google | ModelProvider::MaaS(_) => "v1beta1",
|
||||
};
|
||||
|
||||
let path = format!(
|
||||
"v1/projects/{}/locations/{}/publishers/{}/models/{}:{}",
|
||||
"{}/projects/{}/locations/{}/publishers/{}/models/{}:{}",
|
||||
api_version,
|
||||
project_id,
|
||||
target_location,
|
||||
provider.as_str(),
|
||||
|
||||
Reference in New Issue
Block a user