Skip to content

How AI works in TableAI

AI chat writes, explains and fixes SQL using your question and database context. You choose the provider and model. Requests go directly from your Mac to that provider with your own API key.

Choose the tool that matches your question:

Tool Use it for
Chat mode Drafting SQL or discussing the context you supply, without database tools.
Agent mode Questions that need schema searches, read-only queries or other database checks.
Explain with AI Understanding the execution plan of one query.
AI Database Analysis A report based on database statistics, with recommendations and supporting evidence.
  1. Open Settings › Intelligence.
  2. Select your provider.
  3. Click Get API Key to open its account page.
  4. Enter your key under API Key.
  5. Enable the models you want under Models.

TableAI saves provider keys automatically in macOS Keychain. Enter credentials only in provider settings.

Use the provider guide for any additional settings:

For the mainland China App Store, the provider choices are DeepSeek and Alibaba Cloud. The App Store storefront determines this list; the Mac’s language and region settings do not change it.

Intelligence settings with an empty API Key field, model switches and Custom Endpoint

Use Filter models to search the provider’s list. The All, On and Off filters show models by their switch state. Only enabled models appear in model menus, and at least one model stays enabled per provider. Reset to Recommended restores the recommended selection.

Select the model you want in chat before sending a request. Grid Ask AI has its own model selection, separate from main chat.

Where available, Model Options › Reasoning Level controls additional model analysis. The available behavior depends on the model; higher levels can increase response time. See cost control for request estimates.

Use Custom Endpoint › Endpoint URL when your setup requires a proxy or self-hosted service. That service receives your requests and database context. The provider guides specify whether the address must be a complete request URL or a base address.

Reset to Default restores the provider’s built-in address. Review what AI sees before changing the destination.

  1. Open chat in your database connection.
  2. Select a model from the chat model menu.
  3. Choose Chat in the mode control beside the input.
  4. Open the three-dot menu and review Context Options.
  5. Send your question.

Database Schema adds table and column definitions. SQL Editor Content adds the current query, and Number of Rows adds grid row counts. Add Current Table to Chat attaches loaded results. Review what AI sees for the full data-sharing rules and attachment controls.

Use better results to write a precise request and review its SQL. For database checks, continue with the database agent. If a request fails, see AI key or model problems.