module documentation

Temporal-aware BaseApiClient that routes SDK calls through activities.

This module provides _TemporalApiClient, a BaseApiClient subclass whose HTTP methods dispatch through Temporal activities instead of making direct calls. The real genai.Client with real credentials only exists on the worker side inside the activity.

This ensures:

  • No credential fetching or refreshing happens in the workflow.
  • No auth material (tokens, API keys) appears in Temporal event history.
  • The SDK's AFC (automatic function calling) loop runs in the workflow, so activity_as_tool() wrappers work naturally.
Class _TemporalApiClient A BaseApiClient that routes all API calls through Temporal activities.
Function _validate_http_options Raise if http_options contains non-serializable fields.
Constant _REJECTED_HTTP_OPTION_FIELDS Undocumented
def _validate_http_options(http_options: HttpOptions | None): (source)

Raise if http_options contains non-serializable fields.

_REJECTED_HTTP_OPTION_FIELDS = (source)

Undocumented

Value
frozenset(set(['httpx_client',
               'httpx_async_client',
               'aiohttp_client',
               'client_args',
               'async_client_args']))