usesSdkPassthrough static method

bool usesSdkPassthrough(
  1. ModelType? modelType, {
  2. ModelFileType? fileType,
})

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 every SDK-passthrough model — Gemma 4, and FunctionGemma on .litertlm — is handled the same way. fileType picks between a model family's runtimes; see FunctionCallFormatFactory.create.

Implementation

static bool usesSdkPassthrough(
  ModelType? modelType, {
  ModelFileType? fileType,
}) =>
    FunctionCallFormatFactory.create(modelType, fileType: fileType)
        is SdkPassthroughFunctionCallFormat;