SnapshotModelOverride captures the agent's current model override. The returned snapshot is opaque; pass it to RestoreModelOverride later to restore the captured value.
()
| 252 | // returned snapshot is opaque; pass it to RestoreModelOverride later to |
| 253 | // restore the captured value. |
| 254 | func (a *Agent) SnapshotModelOverride() ModelOverrideSnapshot { |
| 255 | return ModelOverrideSnapshot{ptr: a.modelOverrides.Load()} |
| 256 | } |
| 257 | |
| 258 | // RestoreModelOverride atomically restores the override to the value |
| 259 | // captured by `prev`, but only if the current override is still the one |