Zum Inhalt springen

AI Gateway Updates & Release Notes

Einträge
33
Quellen
1
Zuletzt aktualisiert

Folge AI Gateway, um die Release Notes in deinen Feed zu holen.

AI Gateway von Cloudflare

AI Gateway - Route requests to any provider that offers a model with multi-provider routing

AI Gateway now supports multi-provider routing. When it is on, a request for a model can go to any provider that serves that model. For example, a request for a Claude model can go to Anthropic or to Google Vertex AI.

Starting December 9, 2026, multi-provider routing is on by default for new gateways. Gateways created before then keep using the providers they use today until you turn the setting on.

To turn on multi-provider routing for an existing gateway, go to your gateway's Settings and turn on Multi-Provider Routing. To use the API, set multiprovider_enabled to true in the request body of a PUT request to update the gateway:

{
	"multiprovider_enabled": true
}

When the setting is off, you can still choose a provider for a single request. Name the provider in the cf-aig-allowed-providers header. Model aliases can use every provider whether the setting is on or off.

With this release, more models are available from alternate providers on gateways with multi-provider routing:

Originalquelle(öffnet in neuem Tab)Problem melden

AI Gateway von Cloudflare

AI Gateway - Send up to 10 custom metadata entries per request

AI Gateway now saves up to 10 custom metadata entries per request, up from five. You can use the extra entries in log filtering, spend limits and dynamic routing conditions.

Metadata that AI Gateway adds, such as the Access user ID cf.user_id, no longer counts toward the limit and no longer replaces your last entry.

Custom metadata can be up to 12,288 bytes (12 KB) per request. If it is larger, AI Gateway removes entries from the end until the rest fit.

--header 'cf-aig-metadata: {"team": "AI", "user": 12345, "project": "chat", "cost_center": "cc-42", "env": "prod", "region": "us", "tier": "pro"}'

For details, refer to Custom metadata.

Originalquelle(öffnet in neuem Tab)Problem melden

AI Gateway von Cloudflare

AI Gateway - Review provider key activity in AI Gateway

AI Gateway now shows usage activity for your stored provider keys. Use this information to review credentials for rotation or removal.

In Provider Keys, keys are grouped by provider with masked previews, aliases, and last-used and last-updated dates. The Key security section highlights keys with recorded activity older than 90 days. You can review these keys and delete them after checking their dependencies.

Usage tracking starts November 2026.

For details on storing, rotating, and removing provider keys, refer to Bring your own keys.

Originalquelle(öffnet in neuem Tab)Problem melden

AI Gateway von Cloudflare

AI Gateway - Route across a pool of models with model aliases

AI Gateway now supports model aliases. A model alias is a pool of models that your application calls by one name, such as custom/support-fast. AI Gateway tries the models in the order you set and falls back to the next one if a request fails, or uses smart routing to choose a model for each request.

Because your application only references the alias, you can swap models or change the routing algorithm on your gateway without redeploying. Create and manage aliases on your gateway's Routing page, alongside dynamic routes.

To call an alias through the REST API, use its name as the model. For example, send this body to /accounts/{account_id}/ai/run:

{
	"model": "custom/support-fast",
	"input": {
		"messages": [{ "role": "user", "content": "Reply with a short greeting." }]
	}
}

Include the cf-aig-gateway-id header to select the gateway where you created the alias. Aliases are scoped to individual gateways.

For setup instructions and routing options, refer to Model aliases.

Originalquelle(öffnet in neuem Tab)Problem melden

AI Gateway von Cloudflare

AI Gateway - New AI Gateways require authentication

New AI Gateways now require authentication to prevent unauthorized requests. Once authentication is on, you cannot turn it off through the dashboard or API.

When you create a new AI Gateway through the API, authentication is on by default. You can leave out the authentication field or set it to true. If you set it to false, the API returns HTTP 400.

When you update an existing gateway, leaving out authentication keeps its current setting. If you try to turn off authentication after it is on, the API returns HTTP 400.

Existing gateways with authentication turned off can continue without it. You can turn it on in your gateway settings or include authentication: true in a gateway update request:

{
	"authentication": true
}

Before turning authentication on, configure HTTP clients to send a valid Cloudflare API token. Requests through Workers bindings remain pre-authenticated.

For setup instructions and supported authorization headers, refer to AI Gateway authentication.

Originalquelle(öffnet in neuem Tab)Problem melden

AI Gateway von Cloudflare

Agents, Workers AI, AI Gateway - createAI replaces workers-ai-provider and ai-gateway-provider

The Agents SDK has a new createAI function for the AI SDK and Pi AI. It unifies what workers-ai-provider and ai-gateway-provider did: Workers AI models, AI Gateway catalog models, dynamic routes, and vendor models, through the AI binding or an account id and API token.

workers-ai-provider and ai-gateway-provider are now feature frozen and marked as deprecated. Please migrate at your convenience.

npm i agents
import { createAI } from "agents/models/ai-sdk";
import { streamText } from "ai";

export default {
	async fetch(request, env) {
		const ai = createAI({ binding: env.AI, id: "my-gateway" });

		const result = streamText({
			model: ai("anthropic/claude-opus-5.5", {
				fallback: ["@cf/zai-org/glm-4.7-flash"],
			}),
			prompt: "Write a haiku about Durable Objects",
		});

		return result.toTextStreamResponse();
	},
};
import { createAI } from "agents/models/ai-sdk";
import { streamText } from "ai";

export default {
	async fetch(request: Request, env: Env) {
		const ai = createAI({ binding: env.AI, id: "my-gateway" });

		const result = streamText({
			model: ai("anthropic/claude-opus-5.5", {
				fallback: ["@cf/zai-org/glm-4.7-flash"],
			}),
			prompt: "Write a haiku about Durable Objects",
		});

		return result.toTextStreamResponse();
	},
};
``` …

Originalquelle(öffnet in neuem Tab)Problem melden

AI Gateway von Cloudflare

AI Gateway - AI Gateway log IDs and request IDs now use UUIDv7

New AI Gateway log IDs and request IDs are lowercase UUIDv7, such as 019a7b3e-5f2c-7c41-9d3e-2b8f6a1c4e07. Previously, log IDs were 26-character ULIDs and request IDs were random UUIDs.

For a request that AI Gateway answers in a single step, the cf-aig-request-id, cf-aig-log-id, and cf-aig-event-id response headers now carry the same value. For provider and Universal requests, if you set your own cf-aig-event-id, AI Gateway returns it instead.

Existing log IDs do not change, and the logs API accepts both formats. Treat log IDs as opaque strings, and update any code that checks for the ULID format.

Originalquelle(öffnet in neuem Tab)Problem melden

AI Gateway von Cloudflare

AI Gateway vereinheitlicht Fehler bei Provider-Anmeldedaten

Die REST-API des AI Gateway liefert nun bei abgelehnten Provider-Anmeldedaten einheitlich HTTP 401 mit Fehlercode 2009; Anwendungen sollten diese Antwort entsprechend behandeln.

AI Gateway's REST API now returns consistent responses when an AI provider rejects credentials. The change applies to POST /ai/run ↗︎.

Scenario

Previous AI Gateway response

New AI Gateway response

ElevenLabs

Provider-specific UserCredentialsError with HTTP 403

HTTP 401 with error code 2009

Google Vertex

HTTP 500 for rejected credentials, with upstream retries

HTTP 401 with error code 2009; the request fails without retrying the provider

All other providers

HTTP 402 or another provider-specific status for rejected credentials

HTTP 401 with error code 2009

When using Unified Billing, the provider rejects the credentials

Provider-specific authentication error

HTTP 503

Update applications that handle AI Gateway REST API errors to treat HTTP 401 as an invalid or rejected provider credential.

For details about providing provider credentials, refer to Bring your own provider keys.

Originalquelle(öffnet in neuem Tab)Problem melden

AI Gateway von Cloudflare

Web Search API als Beta über AI Gateway verfügbar

Die Web Search API ist als Beta verfügbar und ermöglicht KI-Agenten und Anwendungen die Websuche über Ceramic.ai, Exa oder Linkup, abgewickelt über AI Gateway ohne Aufschlag auf die Listenpreise der Provider.

Web Search API is now available in beta. Web Search API lets your AI agents and applications search the Internet and ground their responses in live information, instead of guessing URLs or relying on a model's training cutoff.

At launch, you can choose between three search providers: Ceramic.ai, Exa, and Linkup. All three support Zero Data Retention for requests made through Cloudflare, and all have committed to Cloudflare's verified bot crawling standards.

Web Search API runs through AI Gateway, so search requests appear in your gateway logs and are billed to your AI Gateway credits at each provider's list API price, with no additional markup. You can also bring your own provider API key.

Call Web Search API with the REST API:

curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/websearch/ \
  --request POST \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
    "query": "What are some fun things to do in Salt Lake City as fall approaches?",
    "provider": "ceramic",
    "limit": 5,
    "options": { "gateway": { "id": "default" } }
  }'

Or from a Worker with the AI binding:

const response = await env.AI.websearch({
	gatewayId: "default", …

Originalquelle(öffnet in neuem Tab)Problem melden

AI Gateway von Cloudflare

AI Gateway: Bezahlung von Inferenz per Machine Payments (Beta)

AI Gateway unterstützt in der Beta Machine Payments, womit sich ausgewählte Inferenz-Anfragen an /ai/run per x402-Protokoll aus einem Stablecoin-Wallet statt mit vorab aufgeladenem Guthaben bezahlen lassen.

AI Gateway now supports Machine Payments in beta. With Machine Payments, clients can use the x402 protocol to pay for eligible inference requests directly from a stablecoin wallet instead of maintaining a prepaid credit balance.

Machine Payments is available for the /ai/run endpoint with select open models. To request x402 payment, authenticate with a Cloudflare API token and include the Cloudflare-specific Payment-Method: x402 header:

curl -iX POST "https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run" \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Payment-Method: x402" \
  --header "Content-Type: application/json" \
  --data '{
    "model": "z-ai/glm-4.7-flash",
    "input": {
      "messages": [
        {
          "role": "user",
          "content": "What is Cloudflare?"
        }
      ]
    }
  }'

An x402-compatible client handles the payment challenge, signs an authorization from the client's wallet, and retries the request. Machine Payments currently requires customers to be based in the United States and have a credit card on file.

For prerequisites, eligible models, and transaction details, refer to Machine Payments (x402).

Originalquelle(öffnet in neuem Tab)Problem melden

AI Gateway von Cloudflare

AI Gateway: Modellüberbeanspruchung und Sparpotenzial mit User Insights erkennen

AI Gateway User Insights now gives you more context about the traffic flowing through your gateway. It shows what users and agents are doing with AI, and where a selected model may be more capable than a task requires.

On the analysis side, User Insights groups conversations by task, tracks conversation turns, and helps you compare model fit with cost and latency.

User Insights task and model analysis grouped by task categories

The Potential Savings view highlights requests that may work with faster or less expensive models without compromising output quality. These are the same signals that Cloudflare's Auto Router uses to select a model based on task and cost.

Potential Savings view comparing tasks and suggested models

These new insights are available to all AI Gateway customers at no additional cost. For more information, refer to User Insights.

Originalquelle(öffnet in neuem Tab)Problem melden

AI Gateway von Cloudflare

AI Gateway: Unified-Billing-Fallback für BYOK-Provider verhindern

AI Gateway kann nun über die Einstellung Require provider credentials (byok_only) oder den Header cf-aig-no-wholesale verlangen, dass Zugangsdaten für Drittanbieter vorliegen, und verhindert so den Fallback auf Unified Billing, wobei Anfragen ohne Credentials HTTP 400 erhalten.

AI Gateway can now require credentials for third-party provider requests. Credentials must accompany the request or be stored on the gateway. This setting prevents fallback to Unified Billing with Cloudflare-managed credentials.

Turn on Require provider credentials in your gateway settings. To use the API, set byok_only to true in the request body of a PUT request to update the gateway:

{
	"byok_only": true
}

To require provider credentials for one third-party request, set the cf-aig-no-wholesale header to true. This header cannot relax the gateway setting.

Requests without applicable credentials then return an HTTP 400 response. Workers AI requests remain allowed, and the setting does not change their configured billing mode.

For configuration details and request-level controls, refer to Prevent Unified Billing fallback for BYOK third-party providers.

Originalquelle(öffnet in neuem Tab)Problem melden

AI Gateway von Cloudflare

AI Gateway: Benutzerdefinierte Kosten unterstützen Cache-Tokens

Benutzerdefinierte Kosten in AI Gateway unterstützen über den Header cf-aig-custom-cost nun separate Preise für Cache-Read- und Cache-Write-Tokens.

AI Gateway custom costs now support cache-read and cache-write token rates. This lets custom cost metrics reflect negotiated cache pricing across providers.

Add per_cache_read_token or per_cache_write_token to the cf-aig-custom-cost header:

{
	"per_token_in": 0.000001,
	"per_token_out": 0.000002,
	"per_cache_read_token": 0.0000001,
	"per_cache_write_token": 0.0000005
}

Cache-token pricing activates when either cache rate is present. An omitted cache rate defaults to per_token_in. If both cache rates are omitted, AI Gateway preserves the existing input and output calculation.

Providers can include cache tokens within input tokens or report them separately. AI Gateway automatically accounts for these differences and prevents double-counting.

For more information, refer to Custom costs.

Originalquelle(öffnet in neuem Tab)Problem melden

AI Gateway von Cloudflare

AI Gateway: Zusammengefasste Rechnungspositionen und einheitliche Modellnamen

Monatliche AI-Gateway-Nutzungsrechnungen zeigen nun pro Modell eine einzige Gesamtsumme statt getrennter Input- und Output-Token-Positionen, und Modellnamen in Rechnungen und Logs folgen einheitlich dem Format provider/model.

AI Gateway monthly usage invoices, issued at the beginning of each month for the previous month's usage, now show a single total cost for each model. These invoices no longer break out input and output token quantities and unit prices into separate line items. This change does not apply to invoices for AI Gateway credit purchases.

For example, an invoice that previously included these separate line items:

  • anthropic claude-haiku-4-5-20251001 Input Tokens: 40,000 tokens at $0.000001 ($0.04)
  • anthropic claude-haiku-4-5-20251001 Output Tokens: 24,000 tokens at $0.000005 ($0.12)

The updated invoice includes one line item: anthropic/claude-haiku-4.5: $0.16.

AI Gateway has also standardized model names across invoices and logs. Model variants that previously appeared with provider-specific version suffixes now use a consistent provider/model identifier.

For more information, refer to the Unified Billing documentation and AI Gateway logging documentation.

Originalquelle(öffnet in neuem Tab)Problem melden

AI Gateway von Cloudflare

50 % Rabatt auf GPT-5.6 Sol über AI Gateway

GPT-5.6 Sol ist über AI Gateway verfügbar und kostet für Unified-Billing-Nutzer bis zum 18. September 2026 automatisch 50 % weniger, nicht jedoch bei Bring Your Own Keys.

GPT-5.6 Sol is available through AI Gateway, and for a limited time you can use it at 50% off. If you are already using AI Gateway, point to the openai/gpt-5.6-sol model and the discounted pricing applies automatically — no promo code needed.

The promotion is available for Unified Billing users only (not Bring Your Own Keys). Load credits onto AI Gateway and start sending requests to openai/gpt-5.6-sol.

Discounted pricing during the promotion:

Usage

Promotional price

Standard price

Input

$2.50 per 1M tokens

$5 per 1M tokens

Output

$15 per 1M tokens

$30 per 1M tokens

Cache read

$0.25 per 1M tokens

$0.50 per 1M tokens

The promotion runs through September 18, 2026. After that date, GPT-5.6 Sol requests return to standard pricing.

For more details, refer to the Unified Billing documentation and the GPT-5.6 Sol model page.

Originalquelle(öffnet in neuem Tab)Problem melden

AI Gateway von Cloudflare

Workers AI und AI Gateway vereinen Modellzugang und Abrechnung

Workers AI und AI Gateway bieten nun einen einheitlichen Zugang, sodass sich über dasselbe AI-Binding und dieselbe REST API sowohl Workers-AI-Modelle als auch Drittanbieter-Modelle mit Observability, Logging, Caching, Sicherheit und Abrechnungskontrollen aufrufen lassen.

Workers AI and AI Gateway now provide a unified path for accessing models and managing inference traffic. Use the same AI binding and REST API to call models hosted on Workers AI or by supported third-party providers, with AI Gateway providing observability, logging, caching, security, and billing controls.

Unified entrypoints and observability

The AI binding supports both Workers AI and third-party models through env.AI.run(). The REST API provides shared /ai/ endpoints with Cloudflare authentication across providers.

Route a Workers AI request through AI Gateway by specifying a gateway ID. Use default to automatically create a gateway on the first authenticated request, or specify an existing gateway to separate applications and workloads:

const response = await env.AI.run(
	"@cf/zai-org/glm-5.2",
	{
		messages: [{ role: "user", content: "What is the capital of France?" }],
	},
	{
		gateway: { id: "default" },
	},
);
const response = await env.AI.run(
	"@cf/zai-org/glm-5.2",
	{
		messages: [{ role: "user", content: "What is the capital of France?" }],
	},
	{
		gateway: { id: "default" },
	},
);
``` …

Originalquelle(öffnet in neuem Tab)Problem melden

AI Gateway von Cloudflare

AI Gateway: KI-Ausgaben und auffällige Nutzung mit User Insights verfolgen

AI Gateway enthält jetzt das Dashboard User Insights, das KI-Ausgaben, Anfragen, Tokens und Nutzung pro Nutzer zeigt und Sitzungen mit auffällig hohen Kosten gegenüber dem 30-Tage-p95-Wert als Sicherheitssignal markiert, ohne zusätzliche Kosten oder Einrichtung.

AI Gateway now includes User Insights, a dashboard that gives you two things at once: clear visibility into how much your organization spends on AI, and a security signal that surfaces users whose usage suddenly looks abnormal. It works on the traffic already flowing through your gateway, so there is no additional setup.

On the spend side, User Insights shows organization-wide totals for cost, requests, tokens, and adoption, and lets you drill into an individual user to see their spend, top models and providers, cache hit rate, and more. To attribute usage to individual users, add a user identifier with custom metadata or put your gateway behind Cloudflare Access.

On the security side, User Insights baselines each user's normal usage from their 95th percentile (p95) session cost over the last 30 days, then flags sessions that exceed both that baseline and an organization-level threshold. A sudden jump above a user's own pattern is often the first sign of a compromised credential or a misbehaving agent, so you can investigate before it shows up on your bill.

User Insights is available to all AI Gateway customers at no additional cost.

Originalquelle(öffnet in neuem Tab)Problem melden

AI Gateway von Cloudflare

AI Gateway: Identitätsbasierte Kontrollen mit Cloudflare Access

AI Gateway lässt sich nun mit Cloudflare Access verbinden, um den Gateway-Endpunkt per Richtlinien zu schützen und die Access-Identität von Nutzern für Logs, Analysen, Routing und Ausgabenlimits über cf.user_id zu verwenden.

AI Gateway now integrates with Cloudflare Access, giving you two new capabilities:

  • Protect your gateway endpoint. Put your AI Gateway behind Access so you can set policies that control who is allowed to call a specific gateway's endpoint.
  • Identity-aware controls. When traffic reaches AI Gateway through an Access-protected custom domain, AI Gateway can use the authenticated user's Access identity in logs, analytics, routing, and spend controls.

With identity-aware controls, you can set spend limits by authenticated user, control which gateways different users can access, filter logs by user, and build policies without passing user IDs from the client application. AI Gateway adds the verified Access user ID to request metadata as cf.user_id.

For setup instructions, refer to Cloudflare Access.

Originalquelle(öffnet in neuem Tab)Problem melden

AI Gateway von Cloudflare

AI Gateway: User Agent in Logs sichtbar

AI Gateway-Logs erfassen jetzt den User Agent des anfragenden Clients, der in jedem Log-Eintrag angezeigt wird und im Dashboard per equals, does not equal oder contains gefiltert werden kann.

AI Gateway logs now capture the user agent of the client that made each request, making it easier to identify which SDK, library, or application sent the traffic flowing through your gateway. For example, you can tell apart requests coming from openai-python versus a custom application or a Cloudflare Worker.

The user agent appears alongside the other details in each log entry, and you can filter logs by user agent (equals, does not equal, or contains) in the dashboard.

For more information, refer to Logging.

Originalquelle(öffnet in neuem Tab)Problem melden

AI Gateway von Cloudflare

AI Gateway: Kosten mit Spend Limits kontrollieren

AI Gateway unterstützt jetzt Spend Limits, kostenbasierte Budgets, die den kumulierten Dollar-Verbrauch nach Modell, Anbieter oder eigenen Metadaten verfolgen und Anfragen bei Überschreitung blockieren, und die mit Unified Billing und BYOK für Modelle mit bekannter Preisgestaltung funktionieren.

AI Gateway now supports spend limits — cost-based budgets that track cumulative dollar spend and block requests when the budget is exceeded. Unlike rate limiting, which caps the number of requests, spend limits track actual cost based on token usage and model pricing.

You can scope limits by model, provider, or custom metadata dimensions. For example, give each user a $200/day budget, cap total gateway spend at $10,000/day, or limit a specific model to $50/day per user. Each rule uses a configurable time window with fixed or sliding enforcement.

Spend limits work with both Unified Billing and BYOK requests for models with known pricing.

For more details, refer to the Spend limits documentation.

Originalquelle(öffnet in neuem Tab)Problem melden