runtimeInjectsToolDeclarations static method

bool runtimeInjectsToolDeclarations(
  1. ModelType? modelType
)

Whether modelType's format has its tool declarations injected by the runtime/SDK, so InferenceChat must not weave its own tools prompt. The model-derived default for InferenceChat.runtimeInjectsToolDeclarations; an engine that injects tools natively (e.g. the web Prompt API) overrides it per-chat. Keyed off the format, not a hardcoded model.

Implementation

static bool runtimeInjectsToolDeclarations(ModelType? modelType) =>
    FunctionCallFormatFactory.create(
      modelType,
    ).runtimeInjectsToolDeclarations;