# AI Chat

Ask about the product you are looking at, read from your catalog as you, with your own Vercel AI Gateway key. How to turn it on, what leaves the admin, what it costs in dollars and what it may do.

Press <kbd>⌘J</kbd> (Ctrl+J elsewhere) on any screen, or the sparkle in the foot of the sidebar, and a column opens beside the screen. On a product it already knows which product you have open: "Shorten this description to 300 characters, in the tone of the others in this category." The answer streams in; the products it read show as small cards with their title, where they stand, their revision and a lock where a Source keeps a field. Pull the column's inner edge to make it narrower or wider, between 320 pixels and half the window; it opens at that width next time in the same browser. On a phone AI Chat opens as a sheet over the screen.

Reload mid-answer and the same answer is there; a second tab shows the same conversation. _Stop_ ends an answer, and the pencil starts a new chat. A quiet _Reconnecting_ line shows while the connection is out; nothing is lost.

## Turn it on

AI Chat is off until the owner turns it on in _Settings → AI Chat_. Until then the drawer says so in one line and links there, and nothing leaves the admin. It runs on [Vercel AI Gateway](https://vercel.com/docs/ai-gateway) only, with your own account.

| Setting | What it is                                                                                                                                                                                                                                                                                                |
| ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| API key | Your gateway's API key, never ours. As you type it the admin asks the gateway whether it works: _Works · $42.10 credit_, or that the gateway refused it. It is kept only once it works, sealed with the sign-in's secret, shown to nobody again, and opened only to ask the gateway. _Forget_ removes it. |
| Model   | Picked from the list the gateway offers, searched by name or maker and grouped by maker, each with its price per million tokens in and out.                                                                                                                                                               |
| Content | Your yes to sending product content. Without it nothing is sent, even with a key.                                                                                                                                                                                                                         |
| Limits  | Dollars per month for the shop and per day for each person, both counted in UTC. The card shows what is spent: "$3.20 of $50 this month", "$0.40 of $5 today, you".                                                                                                                                       |

Only the owner changes the card; everyone who views Settings sees whether AI Chat is on.

### The model list

The picker shows what the gateway lists as a language model that can call tools, without batch variants and without models already switched off. The admin reads the list when you open the card and when you open the picker, never for each message. A price is the gateway's base price; a model that charges more for very long inputs is counted at its base price here.

### When a model is switched off

The gateway gives a model a switch-off date some time before it goes. The card and the drawer then say so: "Claude Sonnet 5 is switched off on 30 November. Choose another model in Settings." The admin reads the gateway's list once a day and whenever the card opens, so the notice is there without anyone having to look; nothing is sent by mail. Chat keeps working until the date. When the model is gone from the list, AI Chat turns itself off and says so in the drawer and the card until the owner picks another model.

## What leaves the admin, and where it is processed

A message and what AI Chat reads for it (product and page drafts, live content and declarations) go to Vercel AI Gateway and from there to the model behind it. We do not choose that model's provider, region or retention, and the gateway setting alone is no evidence of where a request is processed: confirm it with Vercel and the model's provider, and check their terms, before you say yes to content. Vercel AI Gateway is asked with your key and nothing else: check its logging and retention settings in your Vercel account yourself.

Import suggestions in the catalog (_Settings → System_) are a separate use of a key and keep working as they did.

Nothing of a message, a tool's answer or a product reaches the admin's logs. A failed turn logs its request id and the kind of error, nothing more.

## What AI Chat may do

AI Chat reads, and it proposes: through the catalog's [agent endpoint](/docs/catalog/agents), it finds, creates, safely copies and edits product drafts, including variants, category assignments and existing media references. Publication needs a separate proposal. Fields a Source owns stay the Source's; prices, stock and deletion are not tools.

When OrbPage is connected, the same conversation finds pages and lists templates, reads their complete draft and live content, and reads the storefront's declared sections, slots, settings and rich-text blocks. It proposes new pages and templates, and targeted changes to them, rows of columns included, without replacing untouched content. It cannot invent a renderer or accept free HTML/CSS, and Page tools never publish.

Each product gets its own five-minute token for its exact endpoint, carrying your native roles. A scope never grants a role you do not have. Credentials stay in server memory, not chat history or model inputs. If one resource is unavailable or needs access, other connected resources remain usable. A pending call stays bound to its original resource, person, arguments and retry state across reloads; a Catalog approval cannot authorize a Page write. Cart management tools are not connected yet.

### How chat changes a product

Ask for "a shorter description" and the chat does not save it. It proposes the change, and the catalog answers that a person has to approve it first. Short Catalog and Page changes show their complete before/after review with _Approve_ and _Reject_ directly in chat. Longer or structural changes offer _Review_: the complete review opens in a dialog over the current screen, without navigating away or discarding unsaved work. Closing it decides nothing. Only your click saves the draft, and only that exact change against that exact revision. A successful decision automatically resumes the waiting call; then the chat says "Saved as revision 43", and the product page shows the new draft.

Publishing is a second request with its own approval: it shows which languages would go live, and approving the text change approves nothing more. An approval is for you alone; another person who is handed the link sees nothing of it, and chat cannot approve for you.

If you do nothing for 15 minutes, the request expires and nothing is changed. If the draft changed meanwhile, the view says which revision it is at now, offers only _Reject_, and nothing is saved; ask again. A Source taking the field or losing the Products area is answered the same way when you approve. Approving asks the sign-in for a fresh grant from your session, and the catalog asks the sign-in again just before it saves, so it works only while that session lives and you hold the Products area; if the sign-in does not answer, nothing is saved and you approve again. Approving twice, or after a dropped connection, saves once.

If resuming the call fails, chat explains the failure and offers _Retry_; retrying a saved decision does not save it again. Standalone native approval links remain available to external MCP clients and deep links. For an input request without an installed native review, the waiting card still shows the full URL: _Open_ opens the admin's own address beside the conversation, or another address in a separate tab. _Retry_ checks whether you have decided; _Decline_ ends that waiting call without approving anything.

## Limits in dollars

The gateway bills in US dollars, so the limits are in US dollars; there is no exchange rate. A turn holds back what 16,000 tokens would cost at the model's dearer price while it runs, and then settles to what it really cost: the input, the cached input and the output of each step times the model's prices. The prices are the ones the model had when the owner saved it, refreshed whenever the admin reads the list.

When either limit cannot cover a turn, the next message is refused with whose limit it is: your own for the day, which comes back tomorrow, or the shop's for the month, which the owner raises in Settings. Checking and holding back is one step inside the shop's chat object, so two people sending at once cannot both start on the last of a limit; a turn that costs more than it held back goes past the limit by the difference, and the next message is refused.

## Keeping and removing

Each person has one conversation in this shop, kept on Cloudflare's Durable Objects of this admin, in the Worker's own storage. Nobody else opens it, and another shop's admin has its own. A conversation is removed thirty days after its last message: a daily Cron Trigger of the admin's Worker (03:17 UTC) removes it with its history and its streams. The new chat button clears it at once.

A turn stops after two minutes. While one runs, the Agents SDK keeps the object awake with an alarm every 30 seconds, and after an interruption it continues the answer, but a question that keeps being interrupted runs the model at most twice; an idle conversation holds no alarm.