PATCH /settings/ai refused nothing when the base URL or provider changed with a key stored, so a session could point base_url at another server and have POST /settings/ai/verify send it the key. Both changes are now refused while a key is stored: remove the key, change the endpoint, then store the new key. A preset without a fixed base URL takes a key only when its base URL passes secureurl.Check, so the key never crosses the network in plain text. Maestro task: 176b2a30-6e90-4339-b430-5b8967b2fd32 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>