Add restart semantics when requested provider changes and cover with tests. Co-authored-by: codex <[email protected]>