github anthropics/anthropic-sdk-go v2.17.0

one hour ago

Features

  • api: add support for Claude Managed Agents on Amazon Bedrock

  • api: add the storage_not_ready error code

  • tools: add MaxConcurrentCalls to the session tool runner and the environment worker

    With a value above 1, or a negative value for no limit, the calls of different session threads run concurrently. Calls still run one at a time by default.

Bug Fixes

  • api: drop the stray "s" from beta union fields of Params types

    A beta union field whose name comes from a type name with Params in it kept the "s" of Params. These fields, and the constructor functions named after them, lose it. MessageCreateParamsContainerUnion keeps OfContainers.

    Union type Old field New field
    BetaManagedAgentsModelConfigParamsEffortUnion OfBetaManagedAgentsModelConfigsEffortBetaManagedAgentsEffortLevel OfBetaManagedAgentsModelConfigEffortBetaManagedAgentsEffortLevel
    BetaManagedAgentsMultiagentPredefinedAgentParamsUnion OfBetaManagedAgentsAgents OfBetaManagedAgentsAgent
    BetaManagedAgentsMultiagentPredefinedAgentParamsUnion OfBetaManagedAgentsMultiagentSelfs OfBetaManagedAgentsMultiagentSelf
    BetaDeploymentNewParamsAgentUnion OfBetaManagedAgentsAgents OfBetaManagedAgentsAgent
    BetaDeploymentUpdateParamsAgentUnion OfBetaManagedAgentsAgents OfBetaManagedAgentsAgent
    BetaMessageNewParamsContainerUnion OfContainers OfContainer
    BetaMessageBatchNewParamsRequestParamsContainerUnion OfContainers OfContainer
    BetaManagedAgentsMultiagentRosterEntryParamsUnion OfBetaManagedAgentsAgents OfBetaManagedAgentsAgent
    BetaManagedAgentsMultiagentRosterEntryParamsUnion OfBetaManagedAgentsMultiagentSelfs OfBetaManagedAgentsMultiagentSelf
    BetaManagedAgentsMultiagentRosterEntryParamsUnion OfBetaManagedAgentsAdvisors OfBetaManagedAgentsAdvisor
    BetaSessionNewParamsAgentUnion OfBetaManagedAgentsAgents OfBetaManagedAgentsAgent
    BetaSessionNewParamsAgentUnion OfBetaManagedAgentsAgentWithOverridess OfBetaManagedAgentsAgentWithOverrides
    Old function New function
    BetaManagedAgentsMultiagentPredefinedAgentParamsOfBetaManagedAgentsAgents BetaManagedAgentsMultiagentPredefinedAgentParamsOfBetaManagedAgentsAgent
    BetaManagedAgentsMultiagentRosterEntryParamsOfBetaManagedAgentsAgents BetaManagedAgentsMultiagentRosterEntryParamsOfBetaManagedAgentsAgent
    BetaManagedAgentsMultiagentRosterEntryParamsOfBetaManagedAgentsAdvisors BetaManagedAgentsMultiagentRosterEntryParamsOfBetaManagedAgentsAdvisor
  • environments: claim a work item before serving it and do not stop items whose lease was lost

    • The poller's AutoStop now sends a force stop.
    • HandleItem logs a failure instead of returning it if the lease was lost.
    • Memory files are also uploaded when the session goes idle, and the skills of subagents are downloaded too. Of two skills with one name, the first is kept (was the last).
  • tools: kill what the bash tool's shell started, and save long output to a file

    • A timeout or a cancellation kills the shell and its background jobs. Once a shell has ended, bash refuses calls until one passes restart.
    • A command may run for 295 seconds (was 120). Output is stdout and then stderr (stderr first for a failed command), cut after 30,000 characters (was the last 100 KiB), with the path of a file that has the rest.
    • read asks for a view_range above 110,000 bytes (was 256 KiB).
    • The shell has no terminal, and errors no longer end with the exit code.
  • tools: run only the session tool calls that the session is waiting on

    • The context of a running tool is cancelled when the session no longer accepts its result or the runner stops. The default ToolTimeout is 325 seconds (was 120).
    • bash keeps one shell for each session thread.
    • A permanent API error from reading the session, such as the 404 for a deleted session, is returned from Err.
  • tools: wait at most 150 seconds for a cancelled tool when the session tool runner stops

Don't miss a new anthropic-sdk-go release

NewReleases is sending notifications on new releases.