Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/anthropics/anthropic-sdk-go
/ functions
Functions
17,396 in github.com/anthropics/anthropic-sdk-go
⨍
Functions
17,396
◇
Types & classes
5,294
↓ 5 callers
Function
federationConfig
(t *testing.T, credPath string)
internal/auth/integration_test.go:1626
↓ 5 callers
Function
fixed
(schedules ...schedule)
betasessiontoolrunner_properties_test.go:58
↓ 5 callers
Function
fsErrorMessage
fsErrorMessage maps a filesystem error to a consistent, language-independent message so the model sees the same wording regardless of the host runtime
tools/agenttoolset/agenttoolset.go:222
↓ 5 callers
Function
givenAmong
(f *fakeSession, events []event)
betasessiontoolrunner_properties_test.go:234
↓ 5 callers
Function
indexes
(n int)
betasessiontoolrunner_properties_test.go:149
↓ 5 callers
Method
last
last returns the attributes that the latest span named name started with.
opentelemetry_test.go:1417
↓ 5 callers
Function
listModels
(client anthropic.Client, opts ...option.RequestOption)
option/requestoption_test.go:214
↓ 5 callers
Function
makeStaticConfig
(region string)
aws/aws_test.go:23
↓ 5 callers
Function
markedTurn
markedTurn returns the params of a turn that sends one marked user message.
betamessagethreadutil_test.go:184
↓ 5 callers
Function
markedUserMessage
markedUserMessage is a user message with a cache breakpoint on its block.
betamessagethreadutil_test.go:170
↓ 5 callers
Function
mayAppendQuote
(b []byte, quoted bool)
internal/encoding/json/encode.go:1407
↓ 5 callers
Method
message
()
environmentworker_fake_test.go:228
↓ 5 callers
Function
messagesJSON
messagesJSON returns the JSON of the list of messages, each with those of its parts whose JSON is in the element of parts at its index.
internal/telemetry/content.go:464
↓ 5 callers
Function
mustMarshal
(v any)
lib/betafallback/streaming.go:834
↓ 5 callers
Method
mustNext
mustNext takes the next turn, which must not fail.
betatoolrunnerthread_test.go:53
↓ 5 callers
Function
newUserProfileTestClient
(t *testing.T, handler http.HandlerFunc)
bedrock/bedrock_test.go:1203
↓ 5 callers
Function
newUserProfileTestClient
(t *testing.T, handler http.HandlerFunc)
vertex/vertex_test.go:1014
↓ 5 callers
Function
parentIDs
(spans []sdktrace.ReadOnlySpan)
workpoller_test.go:72
↓ 5 callers
Function
parseJSONStructTag
(field reflect.StructField)
internal/apijson/tag.go:22
↓ 5 callers
Function
pausedReply
pausedReply is a reply that stopped with pause_turn.
betamessagethreadutil_test.go:234
↓ 5 callers
Function
performing
(actions ...runnerAction)
betasessiontoolrunner_properties_test.go:687
↓ 5 callers
Function
permission
permission is allow, deny or unconfirmed, as far as the runner was told.
betasessiontoolrunner_properties_test.go:247
↓ 5 callers
Method
postsOf
(id string)
betasessiontoolrunner_fake_test.go:197
↓ 5 callers
Function
rawArray
rawArray renders the wire JSON of each item as an array, skipping any item with none, such as a block whose start event carried no content_block.
messageutil.go:172
↓ 5 callers
Function
refusal
(status int, details any)
environmentworker_fake_test.go:737
↓ 5 callers
Function
requireGaps
(t *testing.T, want []timeRange, times []float64)
workpoller_test.go:49
↓ 5 callers
Method
scanWhile
scanWhile processes bytes in d.data[d.off:] until it receives a scan code not equal to op.
internal/encoding/json/decode.go:300
↓ 5 callers
Function
schemaToBytes
schemaToBytes converts a map schema to JSON bytes for use with NewBetaToolFromBytes.
toolrunner/runner_test.go:21
↓ 5 callers
Function
secondHeartbeatFails
(status int)
environmentworker_properties_test.go:417
↓ 5 callers
Function
sendMessage
(t *testing.T, client *Client)
foundry/foundry_test.go:71
↓ 5 callers
Function
sentHeaders
sentHeaders returns a transport that answers with the message, and the headers of the last request it got.
opentelemetry_propagation_test.go:49
↓ 5 callers
Method
sleep
sleep releases f.mu while it sleeps.
betasessiontoolrunner_fake_test.go:415
↓ 5 callers
Function
sleepingFor
(s float64)
workpoller_test.go:35
↓ 5 callers
Method
terminateThreadShown
terminateThreadShown writes no result, and the log may not show the termination.
betasessiontoolrunner_fake_test.go:735
↓ 5 callers
Function
tokenConfig
tokenConfig returns a config that authenticates with token.
option/requestoption_test.go:297
↓ 5 callers
Function
toolRemovalJSON
(name string)
betatoolrunner_test.go:507
↓ 5 callers
Method
tools
(labels ...string)
betatoolrunner_test.go:400
↓ 5 callers
Function
transformSchema
transformSchema transforms a [jsonschema.Schema] in-place to ensure it conforms to the Anthropic API's expectations. The transformation process: - Pr
schemautil.go:35
↓ 5 callers
Function
typeEncoder
(t reflect.Type)
internal/encoding/json/encode.go:377
↓ 5 callers
Function
unmarshalContentBlockParam
(t *testing.T, jsonData string)
messageutil_test.go:14
↓ 5 callers
Function
unyielded
(f *fakeSession)
betasessiontoolrunner_properties_test.go:384
↓ 5 callers
Function
updated
(path, content, was string)
environmentworker_fake_test.go:682
↓ 5 callers
Method
waitUntil
waitUntil needs a runner that has attached.
betasessiontoolrunner_fake_test.go:784
↓ 5 callers
Function
wasGiven
(f *fakeSession, ids ...string)
betasessiontoolrunner_properties_test.go:230
↓ 4 callers
Method
Close
()
packages/ssestream/ssestream.go:19
↓ 4 callers
Function
CommonAttributes
CommonAttributes returns the attributes that every span of opts has: those of [tracing.ClientAttributes], with the provider of a third-party platform
internal/telemetry/apicall.go:17
↓ 4 callers
Method
Current
Current returns the most recent claimed work item. Only valid after Next returned true and before the next Next call.
lib/environments/poller.go:351
↓ 4 callers
Function
DefaultDir
DefaultDir returns the SDK's default configuration directory (the same one [LoadConfig] reads from when ANTHROPIC_CONFIG_DIR is unset). Returns an emp
config/writers.go:125
↓ 4 callers
Method
Err
()
betasessiontoolrunner_fake_test.go:1429
↓ 4 callers
Method
GetContent
Returns a subunion which exports methods to access subproperties Or use AsAny() to get the underlying value
message.go:10729
↓ 4 callers
Method
GetType
Returns a pointer to the underlying variant's property, if present.
message.go:14710
↓ 4 callers
Method
Int64
Int64 returns the number as an int64.
internal/encoding/json/decode.go:204
↓ 4 callers
Function
IsNull
(v T)
internal/encoding/json/sentinel/null.go:38
↓ 4 callers
Function
IsValueNull
for internal use only
internal/encoding/json/sentinel/null.go:29
↓ 4 callers
Function
Join
Join returns a single [RequestOption] that applies opts in order, at the position the joined option occupies in the caller's option list. It is equiva
option/requestoption.go:482
↓ 4 callers
Method
Ls
Ls returns the relative path of every file under the directory under.
internal/filestore/filestore.go:225
↓ 4 callers
Method
Move
Move renames src to dst; an existing dst is refused. The banned store root as either end does nothing.
internal/filestore/filestore.go:310
↓ 4 callers
Method
New
The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a deprecation period. I
betatunnel.go:52
↓ 4 callers
Method
New
Register an OpenTelemetry destination for the organization. The destination starts in state `enabled`. An organization can have at most 10 destinatio
betaorganizationtelemetrydestination.go:55
↓ 4 callers
Method
New
Create a Memory
betabedrockmemorystorememory.go:40
↓ 4 callers
Method
New
Create a Memory Store
betamemorystore.go:47
↓ 4 callers
Method
New
Create an external key config owned by the caller's organization. When the returned error is an [*apierror.Error], compare the [apierror.Error.ErrorC
organizationexternalkey.go:50
↓ 4 callers
Method
New
Creates a session. In a session that has an `s3_mount` or `s3_object` resource, `initial_events` start the sandbox, and the request does not wait for
betabedrocksession.go:57
↓ 4 callers
Method
New
Create an external key config owned by the caller's organization. When the returned error is an [*apierror.Error], compare the [apierror.Error.ErrorC
betaorganizationexternalkey.go:50
↓ 4 callers
Method
New
Create a Vault
betavault.go:45
↓ 4 callers
Method
New
Send a batch of Message creation requests. The Message Batches API can be used to process multiple Messages API requests at once. Once a Message Batc
betamessagebatch.go:61
↓ 4 callers
Method
New
Register one of your end customers and get the ID to send on the requests you make for them. See the [User profiles guide](https://platform.claude.co
betauserprofile.go:56
↓ 4 callers
Method
New
Create a Memory
betamemorystorememory.go:44
↓ 4 callers
Method
New
Create Session
betasession.go:51
↓ 4 callers
Method
New
Create Skill Version When the returned error is an [*apierror.Error], compare the [apierror.Error.ErrorCode] against these values. - [ErrorCodeClaud
betaskillversion.go:56
↓ 4 callers
Method
New
Create a Memory Store
betabedrockmemorystore.go:49
↓ 4 callers
Method
New
Register a bucket in the organization's own cloud account. It is saved as `pending_configuration` and verified when activated. When the returned erro
betaorganizationexternalstorage.go:58
↓ 4 callers
Method
New
Send a batch of Message creation requests. The Message Batches API can be used to process multiple Messages API requests at once. Once a Message Batc
messagebatch.go:61
↓ 4 callers
Method
New
Create a new environment with the specified configuration. When the returned error is an [*apierror.Error], compare the [apierror.Error.ErrorCode] ag
betaenvironment.go:53
↓ 4 callers
Method
New
Create an organization webhook endpoint. An organization webhook endpoint belongs to the organization rather than to one of its workspaces. An organi
betaorganizationwebhook.go:57
↓ 4 callers
Function
NewBetaToolFromJSONSchema
NewBetaToolFromJSONSchema creates a BetaTool by inferring the schema from struct type T using reflection. The struct should use jsonschema tags to def
toolrunner/tool.go:94
↓ 4 callers
Function
NewClient
NewClient returns a client for cfg. It never reads the first-party ANTHROPIC_API_KEY, ANTHROPIC_BASE_URL or config profiles, so a first-party credenti
foundry/foundry.go:78
↓ 4 callers
Method
Overrides
()
packages/param/param.go:102
↓ 4 callers
Function
Qualifiers
Qualifiers returns what the SDK method that sends req set with WithQualifiers, which every attempt of its API call has. It is nil for any other reques
internal/requestconfig/requestconfig.go:897
↓ 4 callers
Method
RawJSON
Returns the unmodified JSON received from the API
internal/apierror/apierror.go:54
↓ 4 callers
Function
RedactHeaders
RedactHeaders returns headers with every value of each sensitive header replaced by "***", without modifying headers. The result may be headers itself
internal/apierror/apierror.go:183
↓ 4 callers
Method
RemoveTools
RemoveTools takes tools away from the model without changing Params.Tools. The runner stops running them at once, even for a call in the message it la
betatoolrunner.go:264
↓ 4 callers
Function
RequireSecureTokenEndpoint
RequireSecureTokenEndpoint rejects base URLs that would cause a JWT assertion, authorization code or refresh token to be sent over cleartext HTTP. Loc
config/https.go:15
↓ 4 callers
Method
ServeHTTP
(w http.ResponseWriter, r *http.Request)
internal/auth/integration_test.go:1327
↓ 4 callers
Method
SetOnFetch
(fn func(path string) int)
lib/environments/memories_test.go:148
↓ 4 callers
Method
SetOnList
(fn func())
lib/environments/memories_test.go:142
↓ 4 callers
Method
SetStatus
(code codes.Code, _ string)
internal/tracing/attributes_test.go:238
↓ 4 callers
Method
Start
(ctx context.Context, name string, opts ...trace.SpanStartOption)
opentelemetry_toolrunner_test.go:1242
↓ 4 callers
Method
Tracer
(string, ...trace.TracerOption)
client_test.go:1240
↓ 4 callers
Method
Tracer
Tracer returns the tracer for these options, or nil when the spans are disabled.
internal/tracing/tracing.go:130
↓ 4 callers
Function
TypeFor
Original src code from Go 1.23 go/src/reflect/type.go (taken 1/9/25) * func (t *rtype) OverflowInt(x int64) bool { k := t.Kind() switch k { case I
internal/encoding/json/shims/shims.go:68
↓ 4 callers
Method
UnmarshalJSON
(data []byte)
betasession.go:1281
↓ 4 callers
Method
UnmarshalJSON
(data []byte)
internal/apierror/apierror.go:56
↓ 4 callers
Method
Upload
Upload File When the returned error is an [*apierror.Error], compare the [apierror.Error.ErrorCode] against these values. - [ErrorCodeClaudeCodeKeyC
file.go:173
↓ 4 callers
Function
accumulateBetaMessage
accumulateBetaMessage folds raw stream events into a BetaMessage the way a caller of Beta.Messages.NewStreaming does.
betamessageutil_test.go:289
↓ 4 callers
Function
accumulateManagedAgentsEvent
(acc *BetaManagedAgentsEventAccumulator, eventType string, event E)
betasessionutil.go:66
↓ 4 callers
Method
adoptHistory
adoptHistory makes the next turn start a new thread when Params.Messages no longer begins with the stored history. A turn in progress still adds to th
betamessagethreadutil.go:182
↓ 4 callers
Function
apiError
(status int, message string)
betasessiontoolrunner_fake_test.go:859
↓ 4 callers
Function
appendCompact
(dst, src []byte, opts encOpts)
internal/encoding/json/indent.go:51
↓ 4 callers
Function
appendString
(dst []byte, src Bytes, escapeHTML bool)
internal/encoding/json/encode.go:1036
← previous
next →
601–700 of 17,396, ranked by callers