The VisualEditor API can use two backends to access parsoid: DirectParsoidClient, or VCSParsoidClient, which talks to RESTbase.
When we switch VE on a wiki from using RESTbase to direct mode, edit sessions that started out using RESTbase as the backend need to continue using RESTbase, so they don't lose access to the stashed base state, which would cause the edit to fail.
To achieve this, the VE API needs to detect which backend the client had originally been loading data from, e.g. using a cookie or by inspeciting the etag submitted in the request body.