Turns raw text (with a TaskType prefix already applied) into a
TokenizedInput. One instance per loaded tokenizer file; built once by
the worker at startup and reused for every encode call.
Low-level platform-interface tier (the federated-plugin SPI) for
flutter_edge_ai. It hosts the abstract runtime types (InferenceModel,
InferenceModelSession, InferenceChat, EmbeddingModel,
SpeechRecognizer, SpeechSynthesizer, …) and the platform-dispatch
singleton instance.
Sendable description of "which engine, which model" that crosses an
isolate boundary so the receiving isolate can build its own
EmbeddingForwardPass locally. FFI handles/pointers themselves can never
cross isolates — only this descriptor (plain data + a code reference)
does; see EmbeddingForwardPassFactory for why factory must be a
top-level/static tear-off.
Comprehensive error handling and debugging utilities for AI image processing
to prevent corruption that causes repeating text patterns in model responses.
Handles proper image tokenization for multimodal AI models to prevent
"Prompt contained 0 image tokens but received 1 images" errors and
corruption that causes repeating text patterns.
One file of a multi-file (directory) model resolved from a Hugging Face
repo — e.g. an ORT-GenAI model is a DIRECTORY (genai_config.json +
model.onnx+`model.onnx_data` + tokenizer files), not a single file.
Holds skill executors registered via FlutterEdgeAi.initialize
(skillExecutors:). Same probe-chain selection as EngineRegistry /
EmbeddingRegistry: the registered executor with the highest
SkillExecutorProvider.priority whose SkillExecutorProvider.canExecute
returns true for a skill type wins (first-registered breaks ties). There is
no central type map — the opt-in flutter_edge_ai_agent executors self-select.
Specification for a TTS model — a SELECTABLE bundle. ttsModelType carries
the model family so one generic backend dispatches to the right runtime
profile; sources is one entry per file in that type's manifest.
Policy for what happens to a previously-installed model when a new one is
set active. Lives with the spec value types (it's a per-spec install policy);
re-exported from model_file_manager_interface.dart for backward compat.
Speech-to-text model families supported by the pluggable STT backends.
Only moonshine has a shipped SttModelProfile/pipeline
(flutter_edge_ai_speech); the others are follow-ons that need a log-mel
frontend.
Text-to-speech model families supported by the pluggable TTS backends.
matcha, qwen3 and inflect have shipped TtsModelProfile/pipelines
(flutter_edge_ai_speech); kokoro/supertonic are documented follow-ons
(fail-loud until wired).
Mixin for sessions that surface the SDK's structured raw JSON response
(LiteRT-LM Gemma 4 path with tool_calls). Allows InferenceChat to read
the structured tool calls without a hard dependency on a concrete session
type, and lets non-FFI sessions opt out by simply not implementing this
mixin.