Anthropic Java SDK v3.5.0 发布:新增错误详情与异常类
原标题:v3.5.0
AI 摘要
Anthropic 发布 Java SDK v3.5.0,新增 API 错误详情类型与错误码枚举,为 HTTP 状态码和 API 错误码引入独立异常类,并在 AnthropicServiceException 上暴露 errorCode()、errorDetails()、type()、apiMessage()、requestId() 和 workspaceId() 等方法。同时修复了 AWS、Bedrock、Vertex、Google Cloud 等后端在路径参数与 base URL 处理上的安全问题,避免空值或特殊路径导致请求被发送到错误 URL。
正文节选
### Features * **api:** add error details types and new error type values * **api:** add ids filter to list workspaces * **client:** add exception classes for HTTP statuses and API error codes, and errorCode(), errorDetails(), type() and apiMessage() on AnthropicServiceException; 408, 409, 412, 413, 431 and 499 now throw their own classes, no longer UnexpectedStatusCodeException * **client:** add requestId() and workspaceId() to AnthropicServiceException ### Bug Fixes * **api:** move some er