MCPcopy Create free account

hub / github.com/anthropics/anthropic-sdk-python / functions

Functions12,274 in github.com/anthropics/anthropic-sdk-python

↓ 1 callersFunction_read_json_async
(response: httpx2.Response)
src/anthropic/lib/middleware/_fallbacks.py:1614
↓ 1 callersMethod_reconcile
Read full history and enqueue every tool-call event still unanswered. Two-pass: read the whole history before emitting so a tool-call whose
src/anthropic/lib/tools/_beta_session_runner.py:622
↓ 1 callersMethod_recover
Rebuild a destroyed folder from the server; sends no deletes, no uploads.
src/anthropic/lib/tools/_memories.py:573
↓ 1 callersMethod_remove_local
Remove the file for a memory the server no longer has, if it still holds `expect_sha`. Returns `None` when the file is gone from disk, `expec
src/anthropic/lib/tools/_memories.py:704
↓ 1 callersMethod_render
( self, call: CallRecord, state: BetaBrowserState, file_policy: BetaFilePolicy | None )
src/anthropic/lib/tools/_toolsets/_pipeline.py:188
↓ 1 callersFunction_replay_reason
The `error_code` of a rejection that a full replay under a new thread recovers from, if it is one.
src/anthropic/lib/threads/_thread_state.py:586
↓ 1 callersMethod_request
( self, cast_to: Type[ResponseT], options: FinalRequestOptions, *, str
src/anthropic/_base_client.py:1247
↓ 1 callersMethod_request
( self, cast_to: Type[ResponseT], options: FinalRequestOptions, *, str
src/anthropic/_base_client.py:2029
↓ 1 callersMethod_request_api_list
( self, model: Type[_T], page: Type[AsyncPageT], options: FinalRequestOptions,
src/anthropic/_base_client.py:2348
↓ 1 callersMethod_request_options
(self, overrides: TurnOverrides, *, stream: bool)
src/anthropic/lib/threads/_thread_state.py:457
↓ 1 callersFunction_require
Fall back to `env_var` for `value`; raise a clear error if still empty. The `ANTHROPIC_*` env vars are the ones the `ant worker poll --on-work`
src/anthropic/lib/environments/_worker.py:302
↓ 1 callersFunction_require_env
(name: str)
examples/managed-agents-self-hosted-sandbox-worker.py:47
↓ 1 callersMethod_retry_partial_turn
If nothing is staged and the history ends with a turn whose stream ended early (its messages, then its partial reply if any content arrived),
src/anthropic/lib/threads/_thread_state.py:355
↓ 1 callersFunction_run_session_tools
Internal: drive a `SessionToolRunner` as an async context manager. Kept as a thin module-level shim because `anthropic.lib.environments.Envir
src/anthropic/lib/tools/_beta_session_runner.py:1178
↓ 1 callersMethod_run_tool
(self, tool: BetaAsyncRunnableTool, tool_use: BetaToolUseBlock)
src/anthropic/lib/tools/_beta_runner.py:1417
↓ 1 callersMethod_run_tools_while_streaming
Passes on the reply's events, and runs each tool call once the reader is done with the event that shows the model has moved on from it. Asking
src/anthropic/lib/tools/_beta_runner.py:1076
↓ 1 callersMethod_run_tools_while_streaming
Passes on the reply's events, and runs each tool call once the reader is done with the event that shows the model has moved on from it. Asking
src/anthropic/lib/tools/_beta_runner.py:1621
↓ 1 callersMethod_run_toolset_member
(self, tool_use: BetaToolUseBlock)
src/anthropic/lib/tools/_beta_runner.py:1440
↓ 1 callersFunction_scoped_client
Build the runner's request client. With an environment key, defer to `_copy_client_with_bearer_auth` for a Bearer-only sub-client. Without on
src/anthropic/lib/tools/_beta_session_runner.py:309
↓ 1 callersFunction_sdk_frame_locals
(code name, locals) for every traceback frame owned by the anthropic package, across the full `__context__` / `__cause__` chain.
tests/lib/test_credentials.py:4837
↓ 1 callersMethod_send_result
Post `tool_result` back to the session, retrying transient failures with jittered exponential backoff until the send retry window elapses.
src/anthropic/lib/tools/_beta_session_runner.py:1073
↓ 1 callersMethod_serialize_multipartform
(self, data: Mapping[object, object])
src/anthropic/_base_client.py:707
↓ 1 callersFunction_server_lease_state
The server's view of the lease carried by a 412 heartbeat response, or empty if absent.
src/anthropic/lib/environments/_worker.py:166
↓ 1 callersFunction_serving_iteration_entry
The serving hop's `fallback_message` completer entry: its own self-reported iteration relabeled, or one built from its delta usage.
src/anthropic/lib/middleware/_fallbacks.py:1254
↓ 1 callersFunction_session
()
src/anthropic/lib/tools/agent_toolset.py:612
↓ 1 callersFunction_set_messages
(*added: BetaMessageParam)
tests/lib/threads/helpers.py:589
↓ 1 callersMethod_should_retry
(self, response: httpx2.Response)
src/anthropic/_client.py:432
↓ 1 callersMethod_sleep_for_retry
( self, *, retries_taken: int, max_retries: int, options: FinalRequestOptions, response: httpx2.Respon
src/anthropic/_base_client.py:1492
↓ 1 callersMethod_sleep_for_retry
( self, *, retries_taken: int, max_retries: int, options: FinalRequestOptions, response: httpx2.Respon
src/anthropic/_base_client.py:2280
↓ 1 callersMethod_splice_fallback_stream
Wrap the refusable stream in a response whose body passes events through until a retryable refusal, then splices the fallback chain's events o
src/anthropic/lib/middleware/_fallbacks.py:403
↓ 1 callersMethod_splice_fallback_stream_async
( self, *, request: APIRequest, body: dict[str, Any], initial_model: s
src/anthropic/lib/middleware/_fallbacks.py:443
↓ 1 callersMethod_spliced_frames
( self, *, request: APIRequest, body: dict[str, Any], initial_model: s
src/anthropic/lib/middleware/_fallbacks.py:501
↓ 1 callersMethod_spliced_frames_async
( self, *, request: APIRequest, body: dict[str, Any], initial_model: s
src/anthropic/lib/middleware/_fallbacks.py:625
↓ 1 callersFunction_split_tools
( tools: Iterable[BetaToolUnionParam | RunnableToolT], )
src/anthropic/lib/threads/_thread_state.py:669
↓ 1 callersFunction_sse
`message` as the server-sent event stream a streaming request receives (one event per content block).
tests/lib/tools/toolsets/test_runner.py:76
↓ 1 callersMethod_steps
The runner's loop. `__run__` drives it, one step for each item.
src/anthropic/lib/tools/_beta_runner.py:714
↓ 1 callersMethod_steps
The runner's loop. `__run__` drives it, one step for each item.
src/anthropic/lib/tools/_beta_runner.py:1252
↓ 1 callersMethod_store_root
Where one store's files land on disk. The store's files land at its `mount_path` — the very location the agent's system prompt tells
src/anthropic/lib/tools/_memories.py:262
↓ 1 callersMethod_stored_messages_to_send_again
The stored history as a turn that sends the whole history sends it: the messages up to the last reply go without the `cache_control` of their
src/anthropic/lib/threads/_thread_state.py:411
↓ 1 callersMethod_stringify_item
( self, key: str, value: Data, opts: Options, )
src/anthropic/_qs.py:66
↓ 1 callersMethod_strip_raw_response_header
(self)
src/anthropic/_models.py:1110
↓ 1 callersFunction_summarise_event
(ev: Any)
examples/managed-agents-self-hosted-sandbox-worker.py:154
↓ 1 callersMethod_suppressed_start_message
`message` from this fallback's `message_start` when it was not re-emitted because the caller already received a `message_start`. `None
src/anthropic/lib/middleware/_fallbacks.py:983
↓ 1 callersFunction_symlink_loop_error
()
src/anthropic/lib/tools/agent_toolset.py:348
↓ 1 callersMethod_sync_path
( self, store: _AttachedStore, rel: str, remote: BetaManagedAgentsMemory | Non
src/anthropic/lib/tools/_memories.py:616
↓ 1 callersMethod_take_notices
The refused-navigation line and the dialog lines as text blocks, now that a result can include them.
src/anthropic/lib/tools/_toolsets/_pipeline.py:222
↓ 1 callersFunction_text_cases
`text_cases.json`, the table both SDKs' tests read for the text folds: `{c*N}` stands for N copies of the character c, and where the SDKs differ o
tests/lib/tools/toolsets/test_pipeline.py:852
↓ 1 callersFunction_text_deltas
`text` split into one delta per word, which concatenate back to `text`.
tests/lib/threads/helpers.py:760
↓ 1 callersMethod_thread_for_turn
The `thread` field of a turn that sends `params`, the thread's fields with `overrides`. The server takes the create-only fields from the threa
src/anthropic/lib/threads/_thread_state.py:426
↓ 1 callersFunction_to_generated
Map a Parsed* wrapper to the generated block class it stands in for.
tests/lib/streaming/test_parsed_content_blocks.py:33
↓ 1 callersFunction_to_session_content
Bridge Messages-API tool-result content to the narrower Sessions-API content union. The two APIs share text/image/document/search_result block sh
src/anthropic/lib/tools/_beta_session_runner.py:322
↓ 1 callersFunction_tool_removal
(name: str)
tests/lib/tools/toolsets/test_runner.py:105
↓ 1 callersFunction_tool_result
(tool_use_id: str)
tests/lib/tools/test_session_runner.py:96
↓ 1 callersMethod_tools_for
(self, env: AgentToolContext)
src/anthropic/lib/environments/_worker.py:505
↓ 1 callersMethod_toolset_run
One member call, under the lock: the family's pipeline from the raw `tool_use.input` to the content.
src/anthropic/lib/tools/_toolsets/_base.py:318
↓ 1 callersMethod_toolset_run
( self, context: BetaToolsetCallContext, name: str, input: Mapping[str, object] )
src/anthropic/lib/tools/_toolsets/_base.py:403
↓ 1 callersFunction_transform_file
(file: FileTypes)
src/anthropic/_files.py:63
↓ 1 callersFunction_unchanged_since_hashed
(cached: _Hashed, st: os.stat_result)
src/anthropic/lib/tools/_file_store.py:410
↓ 1 callersFunction_union_members
Return the runtime classes in an `Annotated[Union[...], ...]` type alias.
tests/lib/streaming/test_parsed_content_blocks.py:22
↓ 1 callersFunction_unsupported_features
The `unsupported` values of a `thread_unsupported_request` rejection, none if it lists none, or `None` for any other error.
src/anthropic/lib/threads/_thread_state.py:599
↓ 1 callersMethod_validate_headers
Validate the headers a request is about to be sent with. `omitted` holds the (lowercase) names a header layer explicitly removed with `Omit`.
src/anthropic/_base_client.py:810
↓ 1 callersMethod_validate_headers
(self, headers: httpx2.Headers, omitted: frozenset[str])
src/anthropic/lib/aws/_client.py:147
↓ 1 callersFunction_validate_non_model_type
(*, type_: type[_T], value: object)
src/anthropic/_models.py:1002
↓ 1 callersFunction_wait_first
Return as soon as any of `events` is set.
src/anthropic/lib/tools/_beta_session_runner.py:1165
↓ 1 callersFunction_walk_deadline
Stop a walk that uses `_GREP_CPU_SECONDS`, if this thread can take a signal that the host leaves unused.
src/anthropic/lib/tools/agent_toolset.py:908
↓ 1 callersFunction_walk_grep
(rx: re.Pattern[str], search: Path)
src/anthropic/lib/tools/agent_toolset.py:933
↓ 1 callersFunction_with_threads_beta
`headers` with the threads beta appended to a caller-set `anthropic-beta` header, which would otherwise replace the one `create()` builds from `be
src/anthropic/lib/threads/_thread_state.py:577
↓ 1 callersFunction_without_compaction_incompatible_params
A compaction request returns only the compaction block, never a reply, so the API rejects the params that only shape a reply. The runner's later r
src/anthropic/lib/tools/_beta_runner.py:147
↓ 1 callersFunction_without_format
(output_config: BetaOutputConfigParam)
src/anthropic/lib/tools/_beta_runner.py:143
↓ 1 callersFunction_wrapper_dir
Screen every member name (raising on path traversal, extracted or not), then return the wrapper directory shared by the members that will be e
src/anthropic/lib/tools/_skills.py:84
↓ 1 callersFunction_zip_info_is_dir
(info: zipfile.ZipInfo)
src/anthropic/lib/tools/_skills.py:109
↓ 1 callersFunction_zip_info_is_special
True for a Unix-host entry recorded as a symlink, device, FIFO or socket. Type bits from other hosts are not a mode, so those entries stay plain f
src/anthropic/lib/tools/_skills.py:102
↓ 1 callersFunctionaccepts_force_refresh
False for a legacy provider that takes no `force_refresh` argument; it is called without one.
src/anthropic/lib/credentials/_cache.py:42
↓ 1 callersFunctionaccumulator
The stable or the beta `accumulate_event` for a stream whose `message_start` is `event`.
src/anthropic/lib/_tracing/_streaming.py:130
↓ 1 callersMethodaclose
(self)
src/anthropic/lib/middleware/_fallbacks.py:1716
↓ 1 callersMethodaclose
(self)
src/anthropic/_vendor/httpx_aiohttp/transport.py:205
↓ 1 callersMethodaclose
(self)
tests/utils.py:209
↓ 1 callersFunctionadded_tool
(marker: dict[str, Any])
tests/lib/threads/helpers.py:215
↓ 1 callersMethodadvance
(self, seconds: float)
tests/lib/environments/test_poller_method.py:355
↓ 1 callersMethodaiter_bytes
(self)
tests/test_open_telemetry.py:643
↓ 1 callersFunctionassert_empty_iter
(decoder: JSONLDecoder[Any] | AsyncJSONLDecoder[Any])
tests/decoders/test_jsonl.py:133
↓ 1 callersFunctionassert_incomplete_partial_input_response
(events: list[ParsedBetaMessageStreamEvent], message: BetaMessage)
tests/lib/streaming/test_beta_messages.py:270
↓ 1 callersFunctionassert_is_file_content
(obj: object, *, key: str | None = None)
src/anthropic/_files.py:33
↓ 1 callersFunctionassert_matches_model
(model: type[BaseModelT], value: BaseModelT, *, path: list[str])
tests/utils.py:41
↓ 1 callersFunctionassert_overloads_in_sync
Ensure that every @overload of overloaded_func contains all params from source_func.
src/anthropic/_utils/_reflection.py:62
↓ 1 callersFunctionasync_client
()
examples/vertex.py:29
↓ 1 callersFunctionasync_close_credentials
Async `close_credentials`: awaits the provider's `aclose()` if it has one, else calls `close()`.
src/anthropic/lib/credentials/_close.py:40
↓ 1 callersFunctionasync_raw_response
(request: AsyncRequest)
tests/utils.py:340
↓ 1 callersFunctionasync_read_base64
(file: Base64FileInput)
src/anthropic/_utils/_prepare.py:188
↓ 1 callersFunctionasync_read_file_content
(file: FileContent)
src/anthropic/_files.py:137
↓ 1 callersFunctionasync_serialize_data
`serialize_data`, reading `pathlib.Path` inputs without blocking the event loop.
src/anthropic/_utils/_prepare.py:80
↓ 1 callersFunctionavailable_tool_names
Fold mid-conversation `tool_removal` / `tool_addition` blocks over the locally runnable `tool_names`. These blocks arrive in `role: "system"`
src/anthropic/lib/tools/_tool_dispatch.py:162
↓ 1 callersFunctionbeta_bash_tool
(ctx: AgentToolContext)
src/anthropic/lib/tools/agent_toolset.py:601
↓ 1 callersFunctionblock_part
(block: object)
src/anthropic/lib/_tracing/_content.py:298
↓ 1 callersFunctionbody
()
tests/test_prepare.py:346
↓ 1 callersFunctionbounded_tab
(tab: BetaBrowserStateTabEntryParam)
src/anthropic/lib/tools/_toolsets/_render.py:164
↓ 1 callersMethodbuild
( cls: type[_T], *, response: Response, data: object, )
src/anthropic/_types.py:299
↓ 1 callersFunctionbuild_registry
()
src/anthropic/lib/tools/_toolsets/_registry.py:77
↓ 1 callersFunctionbuild_registry
()
src/anthropic/lib/tools/_toolsets/_computer_registry.py:53
↓ 1 callersMethodbuild_request
(options: FinalRequestOptions)
tests/test_client.py:286
← previousnext →1,401–1,500 of 12,274, ranked by callers