Posts tagged "Agent-runners"
-
Through a new partnership with OpenRouter, you can now choose OpenCode as an AI agent with Agent Runners. OpenCode allows you to choose many different AI models, including Kimi, DeepSeek, and GLM.
Learn more about our OpenRouter partnership through the Netlify blog on open models.
Previously, you could only choose Claude, Gemini, or Codex as your AI agent, but now you can choose the OpenCode agent, which offers even more models from different AI providers.
Requests made through OpenCode are only routed to model providers with a Zero Data Retention (ZDR) policy, so your prompts and outputs are never stored.
AI model selection
As part of this release, you can now also specify which model any agent uses with Agent Runners. Previously, Claude, Gemini, and Codex agents all automatically chose a model for the task you prompted with Agent Runners.
Agents can still auto-select a model for you, but now you can also choose different models for your agents, with these preferences saved just for you on your device.
This means you can experiment with which AI models best fit your needs.
To open your AI model options for Agent Runners, select agent near your prompt box.
Choosing the best AI model for your needs
To help you choose the best AI model for your needs, within Agent Runners you can browse details about each model, including a link to learn more, a visual way to compare cost across all supported models with a 1-5 dot scale, and the option to set an effort level for that model.
To get the most out of your credits, consider the following strategies:
- Use a more expensive, capable model to help you plan your project updates and design a clear prompt with Agent Runners’ ask mode, then switch to a cheaper model to implement the changes.
- Experiment with using different AI models for different tasks.
- Be explicit about the functionality you want when using models that are cheaper or set to a lower effort level. These models may fill in placeholder functionality. For example, a model might render a contact page without fully setting up working Netlify Forms, so the page looks complete but doesn’t actually work as expected.
Learn more
To learn more, check out our docs:
-
Netlify Agent Runners now have a mode selector. Pick Ask and the agent reads, investigates, and answers questions about your project. Build is still the default and works exactly as before.
Ask mode is strictly read-only. The agent can’t edit files, run commands, deploy, or change settings. With no build or Deploy Preview, Ask runs are often faster and use fewer credits.
It answers with real context: your repository, your project context, and your project’s Netlify Database. Your data is often the fastest way to answer a question about your app, and Ask mode can query it with no risk of a write.
A few prompts to steal:
- “How many users are in the database?”
- “Walk me through how authentication is implemented in this project. Which files handle it, and where is the token stored?”
- “Our Largest Contentful Paint is bad on mobile. Read the code and tell me what’s most likely responsible.”
- “Plan out how we can migrate to the latest version of Astro.”
Because it’s a mode on the same run, you can switch to Build the moment an answer turns into a task — same run, same context, no re-explaining.
Ask mode is available on all agents, Claude Code, Google Gemini, and OpenAI Codex, in Agent Runners today. See the docs on Ask and Build modes.
-
Anthropic’s Claude Opus 5 model is now available through Netlify’s AI Gateway and Agent Runners with zero configuration required.
Use the Anthropic SDK directly in your Netlify Functions without managing API keys or authentication. The AI Gateway handles everything automatically. Here’s an example using the Claude Opus 5 model:
import Anthropic from '@anthropic-ai/sdk';export default async () => {const anthropic = new Anthropic();const response = await anthropic.messages.create({model: 'claude-opus-5',max_tokens: 4096,output_config: { effort: 'medium' },messages: [{role: 'user',content: 'How can AI improve my coding?'}]});return new Response(JSON.stringify(response), {headers: { 'Content-Type': 'application/json' }});};Claude Opus 5 is available for all Function types and Agent Runners. You get automatic access to Netlify’s caching, rate limiting, and authentication infrastructure.
Learn more in the AI Gateway documentation and Agent Runners documentation.
-
Google’s Gemini 3.6 Flash and Gemini 3.5 Flash-Lite models are now available through Netlify’s AI Gateway and Agent Runners with zero configuration required.
Use the Google GenAI SDK directly in your Netlify Functions without managing API keys or authentication. The AI Gateway handles everything automatically. Here’s an example using the Gemini 3.6 Flash model:
import { GoogleGenAI } from '@google/genai';export default async () => {const ai = new GoogleGenAI({});const response = await ai.models.generateContent({model: 'gemini-3.6-flash',contents: 'How can AI improve my coding?',});return Response.json(response);};Gemini 3.6 Flash and Gemini 3.5 Flash-Lite are available for all Function types and Agent Runners. You get automatic access to Netlify’s caching, rate limiting, and authentication infrastructure.
Learn more in the AI Gateway documentation and Agent Runners documentation.
-
Team Owners on Pro plans can now limit Agent Runners spend for individual members in your team, giving you finer control over how AI credits are used across your team.
Set a single credit limit that applies to every member, then customize it with overrides for specific people who need more (or less) room to work. This makes it easy to give power users a higher ceiling while keeping predictable, budget-friendly defaults for everyone else.
You’ll find these controls in Team Settings under General > AI Enablement.
This builds on our existing team-wide AI usage limits, so you can now manage AI spend both for an entire team and down to each individual member.
We’ve also updated how AI inference credit usage is displayed in your dashboard, making it easier to monitor AI usage and manage your AI spend.
Learn more about AI inference usage and how credits work.
-
OpenAI’s GPT-5.6 Sol, Luna, and Terra models are now available through Netlify’s AI Gateway and Agent Runners with zero configuration required.
Use the OpenAI SDK directly in your Netlify Functions without managing API keys or authentication. The AI Gateway handles everything automatically. Here’s an example using the GPT-5.6 Sol model:
import OpenAI from 'openai';export default async () => {const openai = new OpenAI();const response = await openai.responses.create({model: 'gpt-5.6-sol',input: 'Give a concise explanation of how AI works.',});return Response.json(response);};GPT-5.6 Sol, Luna, and Terra are available for all Function types and Agent Runners. You get automatic access to Netlify’s caching, rate limiting, and authentication infrastructure.
Learn more in the AI Gateway documentation and Agent Runners documentation.
-
Anthropic’s Claude Sonnet 5 model is now available through Netlify’s AI Gateway and Agent Runners with zero configuration required.
Use the Anthropic SDK directly in your Netlify Functions without managing API keys or authentication. The AI Gateway handles everything automatically. Here’s an example using the Claude Sonnet 5 model:
import Anthropic from '@anthropic-ai/sdk';export default async () => {const anthropic = new Anthropic();const response = await anthropic.messages.create({model: 'claude-sonnet-5',max_tokens: 4096,messages: [{role: 'user',content: 'How can AI improve my coding?'}]});return Response.json(response);};Claude Sonnet 5 is available for all Function types and Agent Runners. You get automatic access to Netlify’s caching, rate limiting, and authentication infrastructure.
Learn more in the AI Gateway documentation and Agent Runners documentation.
-
We have redesigned Netlify functions for an improved agent experience.
With these updates, functions are more discoverable, easier to autocomplete, update, and manage for people and agents alike. They move function configuration into code, making it type-safe and immediately visible to editors, tools, and agents, with no platform-specific naming conventions to memorize or get wrong. None of these changes are breaking, so you can adopt them on your own timeline.
Netlify Functions are serverless functions that run on-demand in response to HTTP requests or platform events. They handle server-side logic without any infrastructure to manage, and live in your repository at
netlify/functions/.To learn more about these updates in depth, check out our blog on redesigning Netlify functions for agent experience. See the table below for a summary.
Feature What changed What it means for agents What you need to do Event handlers Export typed event handlers from the default export object Typed handlers are discoverable like any API, with no magic filenames to guess or get wrong. Nothing required. Adopt the new syntax for new event handlers for better agent discoverability and updates. Background functions Declare with background: truein config instead of the-backgroundfilename suffixType-safe and config-driven, not name-driven. Agents can set it in code without guessing platform naming conventions, and get an error if the value is wrong. Nothing required. The -backgroundsuffix still works.Region selection Set per-function via the regionconfig property, replacing the global UI settingAgents can set region as a type-safe config property, catching invalid values before deploy rather than at runtime. Use deploy previews to test before going live. Nothing required. Optionally move region out of the UI into config for per-function control. Memory and vCPU Set via memoryorvcpuconfig properties; both values scale together automaticallyAgents provisioning compute-heavy workloads (inference, large payloads) can do so in code. Nothing. Defaults unchanged. Set only if your workload needs more than 1 GB / 0.5 vCPU. Requires a credit-based Pro plan. getContext()Named import from @netlify/functions, replacing theNetlify.contextglobalNamed imports surface in autocomplete and carry type information. Globals are invisible to agents; named imports are not. Nothing required. Netlify.contextstill works. Switch togetContext()for better discoverability.Learn more in the Netlify Functions documentation, which has also been recently revamped.
-
Anthropic’s Claude Opus 4.8 model is now available through Netlify’s AI Gateway and Agent Runners with zero configuration required.
Use the Anthropic SDK directly in your Netlify Functions without managing API keys or authentication. The AI Gateway handles everything automatically. Here’s an example using the Claude Opus 4.8 model:
import Anthropic from '@anthropic-ai/sdk';export default async () => {const anthropic = new Anthropic();const response = await anthropic.messages.create({model: 'claude-opus-4-8',max_tokens: 4096,messages: [{role: 'user',content: 'How can AI improve my coding?'}]});return new Response(JSON.stringify(response), {headers: { 'Content-Type': 'application/json' }});};Claude Opus 4.8 is available for all Function types and Agent Runners. You get automatic access to Netlify’s caching, rate limiting, and authentication infrastructure.
Learn more in the AI Gateway documentation and Agent Runners documentation.