diff --git a/dato-agent/README.md b/dato-agent/README.md index 954a4f11..5df55a91 100644 --- a/dato-agent/README.md +++ b/dato-agent/README.md @@ -12,12 +12,14 @@ For now, use it only on a sandbox or test project, never on production or on a p ## Setup -1. A project administrator picks OpenAI or Anthropic in the plugin settings, adds the provider API key and chooses a model. +1. A project administrator picks OpenAI, Anthropic, or Vercel AI Gateway in the plugin settings, adds the provider API key and chooses a model. 2. Each user connects their own DatoCMS account. When asked which projects to authorize, select only the project where the plugin is installed. 3. Open **Agent (Beta)** or the record sidebar and describe what you need. The provider API key is shared by the whole project. Each user's DatoCMS connection and recent chats are stored in their browser. +Vercel AI Gateway uses an API key from **Vercel → AI Gateway → API keys**. Requests are billed to that team's AI Gateway credits, or to bring-your-own provider keys configured on the gateway. The model list starts with a short recommended set (Claude Sonnet 5.5 by default, plus Opus, Haiku, GPT, Gemini, and Grok options). **Show all tool-capable models** reveals the rest of the catalog. Models that are not Claude are translated through the gateway's Anthropic Messages API, so tool calls work the same way, but zero data retention depends on the model: only models marked ZDR on every route keep that guarantee. Fast mode selects the model's `-fast` variant when the catalog publishes one. + ## Permissions The agent can never do more than the user's role allows. On top of that, the access level chosen when connecting DatoCMS applies (**Only read content** blocks every write), and the plugin's **Read Only** setting turns off all agent writes for everyone. diff --git a/dato-agent/src/entrypoints/AgentFrame.tsx b/dato-agent/src/entrypoints/AgentFrame.tsx index d739546b..e2b0657e 100644 --- a/dato-agent/src/entrypoints/AgentFrame.tsx +++ b/dato-agent/src/entrypoints/AgentFrame.tsx @@ -3572,6 +3572,10 @@ export default function AgentFrame(props: AgentFrameProps) { }, model: activeModel(props.config), modelMaxOutputTokens: activeModelMaxOutputTokens(props.config), + modelReasoningEfforts: + props.config.provider === 'vercel' + ? props.config.vercelModelReasoningEfforts + : undefined, reasoningEffort: activeReasoningEffort(props.config), fastMode: activeFastMode(props.config), readOnly: props.config.readOnly, @@ -4178,7 +4182,7 @@ export default function AgentFrame(props: AgentFrameProps) { ); const injectHostContext = Boolean( hostContext && - (turn.provider === 'anthropic' || + (turn.provider !== 'openai' || !previousResponseId || conversationRef.current.hostContextFingerprint !== hostContext.fingerprint), diff --git a/dato-agent/src/entrypoints/ConfigScreen.test.tsx b/dato-agent/src/entrypoints/ConfigScreen.test.tsx index c9b3aefd..be245c5f 100644 --- a/dato-agent/src/entrypoints/ConfigScreen.test.tsx +++ b/dato-agent/src/entrypoints/ConfigScreen.test.tsx @@ -39,6 +39,18 @@ type Option = { value: string; }; +function selectableOptions( + options: ReadonlyArray