The model provider sees the prompts the agent sends and the responses it returns. To write correct code, a prompt can include table and column names, schemas, the template being filled and sample values from your data.
Which provider that is depends on you. With your own model key, on any plan, it is the provider whose key you add, under that provider's terms. With a paid plan's included usage or usage credits (on Enterprise, metered usage), requests pass through Emolysis's metering service on the way to the model provider; that service is designed not to store or log their content, and to record token counts for billing.
Connect a development workspace or non-sensitive tables when you are unsure. The security page lists everything that leaves your machine, and model keys and credits explains the two ways to pay for model use.