Table of Contents

Class EdgeGenAiOptions

Namespace
Qavren.Edge.Chat
Assembly
Qavren.Edge.Chat.Onnx.dll

The three switches on the process-wide ORT GenAI runtime. Read once, by the order-400 ChatEnvironmentStartupTask, and by nothing else.

public sealed class EdgeGenAiOptions
Inheritance
EdgeGenAiOptions
Inherited Members

Remarks

Separate from EdgeChatOptions on purpose: everything here is per process, and a keyed second AddOnnxChat registration gets its own EdgeChatOptions but shares this one. A per-registration copy would let two registrations disagree about whether telemetry is off, which is not a state the native library can be in.

Properties

DisableTelemetry

Call Utils.DisableTelemetryEvents() at order 400. Default true, and the default is the whole point.

ORT GenAI 0.15.0 made its 1DS telemetry opt-out, and the Android AAR merges INTERNET, ACCESS_NETWORK_STATE and an ai.onnxruntime.genai.TelemetryInitializer content provider into every consuming APK - all four measured from the shipped 0.15.2 package, not inferred. An on-device suite whose selling point is that nothing leaves the device does not ship with that on by default.

OwnRuntimeHandle

Create and own the single process-wide OgaHandle. Default true.

Set it false only in a process where something else already owns the handle - a host app that constructed one before Qavren.Edge was composed. Sub-project 4 then touches neither its creation nor its disposal, and ShutdownOnStopping becomes inert.

ShutdownOnStopping

Dispose the OgaHandle - which calls OgaShutdown() - when sub-project 1's lifecycle hub raises Stopping. Default true.

Safe since GenAI 0.15.0, which re-initialises transparently on the next call, and proved on this box rather than trusted: a handle was created, disposed, and a second one created afterwards without error. ORT's own OrtEnv is not disposed - it is a process-wide singleton with a one-shot options hook, and tearing it down would silently break a second Edge host in the same process.