usesSdkPassthrough static method

bool usesSdkPassthrough(
  1. ModelType? modelType
)

Whether modelType's function-call format is the SDK-passthrough kind: the backend surfaces tool calls through a structured SDK response (RawSdkResponseSession.lastRawResponse) rather than in the text stream, and the text stream itself carries the raw {"role":"assistant","tool_calls":...} JSON that must be suppressed. Keyed off the format (not a hardcoded model) so any SDK-passthrough model — today only Gemma 4 — is handled the same way.

Implementation

static bool usesSdkPassthrough(ModelType? modelType) =>
    FunctionCallFormatFactory.create(modelType)
        is SdkPassthroughFunctionCallFormat;