Class ChatThermalOptions
How thermal pressure paces or stops a turn.
public sealed class ChatThermalOptions
- Inheritance
-
ChatThermalOptions
- Inherited Members
Properties
- AbortAt
At or above this, terminate the turn. Default
Critical.
- RefuseNewTurnsInLowPowerMode
Refuse to START a turn in low-power mode. Default false: that is a product decision, not a safety one.
- RefuseWhenThermalUnknown
Refuse to start a turn when
EdgeResourceSnapshot.Thermalis Unknown. Default false, and that is a decision rather than an accident of enum ordering.Sub-project 2 numbers
Unknown = 0, belowNominal, and its own doc says "the platform reports nothing usable. Never treat this as "fine"." A barestate >= ThrottleAtwould treat it as better than fine - never throttling, never aborting - on every desktop, every hosted runner, and every Android device below API 29 where the thermal API is unavailable. So the comparisons in the decode loop are written explicitly asthermal != Unknown && thermal >= threshold, with the intent in the code rather than in the enum's numbering.Having made it explicit, the default is still "do not refuse", for the same reason the memory gate skips an unreadable
AvailableMemoryBytesrather than refusing on it: a reading nobody can make is never a refusal, and refusing here would make chat unusable on every desktop. What sub-project 4 owes instead is visibility -Unknownis published verbatim in thethermalStatediagnostics key and inChatTurnStatus.Thermal, never normalised toNominal- and this switch, for a caller who has measured their hardware and wants the opposite.ThrottleHeadroom gets the same treatment for free: Android returns
NaNwhen it is polled faster than about once a second or when the device does not support it, andNaN >= 1.0fisfalse, so an unreadable headroom never throttles. That is the same rule reached by a different route, and it is stated so nobody "fixes" it.
- SampleInterval
How often the monitor is re-read mid-decode. Default 1 s, which is also sub-project 2's monitor cache window and Android's
GetThermalHeadroomrate limit - so sampling costs nothing beyond the cached read.
- ThrottleAt
At or above this, pace the decode to ThrottledTokensPerSecond. Default
Serious.
- ThrottleHeadroom
Android's headroom, where 1.0 is the documented SEVERE threshold. Null disables.
- ThrottledTokensPerSecond
The paced rate. Default 8 tok/s - readable, and a visibly slow answer beats a dead one.