Upsert relies under the hood on Insert operation. Unlike the insert operation though, upsert shouldn't take an on_conflict argument because the action of upsert already expected the record to get replaced (updated) if there's a conflict.
https://github.com/TurtleAI/derive/blob/master/lib/derive/ecto/operation.ex#L46