Repository navigation
Releases
Releases · anthropics/anthropic-sdk-go
v2.9.0
Features
- api: add Claude Tag metrics to the analytics summaries and users reports
- api: add reply_mode to Claude Tag Slack channel settings
Bug Fixes
- bedrock: return an error when the model is empty, "." or "..", and fully escape a model that contains a space, so neither can send the request to a different URL. The model ID's ":" is now sent as it is in the request path rather than as "%3A"; Amazon Bedrock accepts both. The characters ! $ & ' ( ) * + , ; = @ are no longer percent-encoded either, as in other path parameters
- client: in the bedrock, vertex and googlecloud packages, return an error for a model, project, region, location or workspace ID that has nothing, "." or ".." before its first ";", such as ";x", ".;x" or "..;x", because some servers drop the ";" and what follows it and read what is left as an empty or dot segment. Only the routes that need a workspace ID return the error for a googlecloud workspace ID such as ";x". An empty region passed to vertex.WithCredentials, which was sent as "/locations//publishers", is now an error too, and vertex.WithGoogleAuth panics for a region such as ";x", as it does for an empty one
- google-cloud: percent-encode the project, location and workspace ID in the base URL, so a "/" in one no longer adds path segments, and return an error when one is "." or "..". The characters ! ' ( ) * in one are no longer percent-encoded, as in other path parameters
- vertex: percent-encode the project ID, region and model in the request path, so a "/" in one no longer adds path segments, and return an error when the project ID or region is "." or "..". The characters ! ' ( ) * in the project ID or region are no longer percent-encoded, as in other path parameters
- vertex: return an error when the model of a Messages request is empty, null or missing, instead of sending the request to ".../publishers/anthropic/models/:rawPredict"
Chores
- docs: clarify display_name for RBAC Roles created by Anthropic
- docs: clarify plugin delete and skill name conflict descriptions
- docs: clarify when to omit user_profile_id on external keys
- docs: note that Claude Tag settings accept self-hosted runner pools
- docs: update model descriptions
Documentation
- examples: show multiagent when creating a Managed Agents agent
v2.8.0
Features
- api: accept user_profile.program_status_updated on organization webhook endpoints
- api: add claude-fable-5-2 and claude-mythos-5-2
- api: add parent organization filtering and grouping to the usage and cost reports
- api: add the sandbox_egress_restricted error to Admin API write methods
- api: add the user_profile.program_status_updated webhook event
Bug Fixes
- streaming: drop the trailing newline from stream error messages
- tools: keep bash tool commands out of the shell history file
- tools: keep server tools passed in params when using the beta tool runner
- tools: run bash tool commands containing ! or tabs as written
Chores
- api: remove some error detail types and update descriptions
- docs: say when a work heartbeat does not compare its value
- docs: update model descriptions
- internal: generate the stream error decoder
Documentation
- client: list error code types in api.md
- examples: print every text block in the reply
- show lists in doc comments as lists
v2.7.0
Features
- api: add error code for ramp limit errors
- api: add error codes for External Key validation failures
- api: add support for signing organization members out everywhere
Bug Fixes
- client: don't repeat creates when a retry could duplicate them
- client: don't repeat RBAC group creates a retry could duplicate
- client: stop panicking when a hand-built Error is printed
Chores
- docs: describe the type and message of API errors
- internal: tell contributors when a runtime type check belongs
- tests: ignore an ambient ANTHROPIC_BASE_URL in the auth and tool runner tests
Documentation
- client: describe the type, message, code and details of API errors
- client: list each method's errors without their descriptions
v2.6.0
Features
- api: add error details types and new error type values
- api: add ids filter to list workspaces
- client: add ErrorCode constants, and Message, ErrorCode and Details on Error
Bug Fixes
- api: capitalize CMEK in error details type names
- api: move some error details types to the resource they describe
- client: refuse a path parameter that is empty, . or .. before a ;
- client: send ! ' ( ) * , ; unescaped in path parameters
Chores
- api: update example values for pattern-constrained string fields
- client: make ErrorCode a method on Error
- docs: clarify plugin reach values
- docs: clarify plugin version description and plugin reach
- docs: clarify plugin version description length
- docs: clarify some API field descriptions
- docs: clarify three error descriptions
- docs: clarify which blocks to send back around a fallback block
- docs: correct Claude Tag direct message notes in usage reports
- docs: reword Dream and RBAC role permission descriptions
- docs: update the telemetry destination headers description
- docs: use the Claude Platform name in analytics filter docs
- internal: accept changelog entry files in the changelog check
- internal: export ValidateRequestPath for use within the module
- internal: generate the OpenTelemetry span attribute reads
Documentation
- api: show each field's own description for
speed - clean up escapes and code spans in doc comments
- keep links to pointer types in doc comments
v2.5.0
Features
- api: add GA methods for analytics, spend limits and RBAC
- api: add named beta types for unified metrics and RBAC delete responses
- api: add shared analytics order and increase request actor types
- api: add tool_use_limit_reached_error and compaction_limit_reached_error session error types
- api: add types for analytics group_by and spend limit period filters
Bug Fixes
- api: require always-sent analytics fields and drop the unused project product field
- sessions: check evaluated_permission on every tool call the runner dispatches
Chores
- docs: clarify the Slack channel id description
- docs: clarify what the capability_access_all role action grants
- docs: link Dreams model fields to the supported models section
- internal: add a section for each repository's own review rules
- internal: plainer wording in worker comments
- internal: stop encoder state leaking between marshal calls
Documentation
- readme: point to the docs site for documentation
- add a description to the AnthropicBeta type
v2.4.0
Features
- api: add user_profile_id to External Keys and Workspaces
Chores
- ci: remove unused build upload steps
- docs: clarify what disabling the Compliance API stops
- docs: update example user ID in Admin API examples
- tests: fail with a hint when the mock server is not running
Documentation
- examples: use current model IDs
- link to the SDK documentation instead of removed README sections
v2.3.0
Features
- api: add Claude Tag endpoints for Claude Enterprise organizations
- google-cloud: add user profiles and send them to the organization endpoint
Bug Fixes
- auth: don't overwrite a credentials file or spend its refresh token on a client's per-request base URL override
Chores
- client: stop sending query params hardcoded in endpoint paths
- docs: improve the descriptions of the code execution tool and its encrypted results
- docs: reword work queue, skill and external key descriptions
- docs: update descriptions of the per-user usage and cost reports
- internal: carry endpoint path query params to the request layer
- internal: check the repository by owner and public name in workflows
- internal: read the beta route qualifier instead of the beta=true query
- internal: remove preview build upload from CI
- internal: stop expecting the beta query param in tests
Documentation
- client: correct two doc comments on param.Opt
- google-cloud: update the product name
- update the README and the example request
v2.2.0
Features
- api: add support for message threads
- api: add usage and cost reports by dimension, mark older reports legacy
Bug Fixes
- auth: don't share an in-flight token fetch across base URLs
- tools: send a change made in place to an earlier message of a tool runner with the next request
Chores
- docs: clarify plugin content scan and validation descriptions
- docs: clarify plugin served_version_pinned and updated_at
- docs: fix usage and cost report examples and ending_at docs
- docs: rate limit model lists vary by organization and workspace
v2.1.0
Features
- api: add enforcement status, actions and filter to user profiles
v2.0.0
⚠ BREAKING CHANGES
- api: add support for new API version 2026-10-21
Features
- api: add a workspace_id filter and the usage_tier scope type to list spend limits
- api: add support for new API version 2026-10-21
Chores
- require Go 1.25 or later
Documentation
- api: remove outdated system role note from messages description