ReadonlymodelsReadonlygoogleStaticfromCreates a client that reads provider credentials from the current environment.
StaticmockCreates a deterministic in-memory client for tests.
Executes a single non-streaming completion request.
Executes a single non-streaming embedding request.
Executes a single non-streaming text-to-speech request.
Executes a single non-streaming speech-to-text request.
Executes a streaming completion request and yields canonical chunks.
Creates or restores a conversation, automatically hydrating from the
configured session store when a matching sessionId exists.
Applies runtime price overrides to the shared model registry.
Returns aggregated usage from the configured usage logger.
Returns aggregated speech usage from the configured usage logger.
Returns aggregated usage serialized as JSON or CSV.
Returns aggregated speech usage serialized as JSON or CSV.
Returns the session store configured on this client, if any.
Unified entry point for provider-agnostic completions, streaming, conversations, routing, and usage logging.
Example