Google Vertex AI调用Claude 3.5 Sonnet报429 RESOURCE_EXHAUSTED问题咨询
Vertex AI调用Claude模型触发429错误的问题分析
问题详情
我在Google Vertex AI中测试Anthropic Claude模型时,始终收到429错误,连一次请求都发起不了,显然不是过度使用导致的。这种情况正常吗?难道连少量请求都无法发起?
使用的curl命令:
curl -X POST \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ -d @request.json \ "https://europe-west1-aiplatform.googleapis.com/v1/projects/$PROJECT_ID/locations/europe-west1/publishers/anthropic/models/claude-3-5-sonnet@20240620:streamRawPredict"
返回的错误信息:
[{ "error": { "code": 429, "message": "Quota exceeded for aiplatform.googleapis.com/online_prediction_requests_per_base_model with base model: anthropic-claude-3-5-sonnet. Please submit a quota increase request. https://cloud.google.com/vertex-ai/docs/generative-ai/quotas-genai.", "status": "RESOURCE_EXHAUSTED" } } ]%
我完全按照官方指南操作。
问题解答
这种情况不正常,默认情况下Vertex AI会为Claude模型分配基础请求配额,足以支持少量测试请求。
报错的核心原因是你的Google Cloud项目中,anthropic-claude-3-5-sonnet模型对应的aiplatform.googleapis.com/online_prediction_requests_per_base_model配额要么被设置为0,要么被项目内其他服务/账号提前占用。
解决步骤:
- 登录Google Cloud控制台,进入「IAM与管理」-「配额」页面。
- 搜索指标
aiplatform.googleapis.com/online_prediction_requests_per_base_model,筛选地区europe-west1和目标模型anthropic-claude-3-5-sonnet。 - 若配额值为0,直接提交配额增加申请;若配额存在但已用尽,排查项目内是否有其他进程或账号在调用该模型。
- 申请时说明测试/开发的使用场景,基础额度的申请通常能快速通过。
内容的提问来源于stack exchange,提问作者Joel
相关产品推荐
相关产品推荐

