Zum Inhalt springen

Developer Platform Updates & Release Notes

Einträge
583
Quellen
1
Zuletzt aktualisiert

Folge Developer Platform, um die Release Notes in deinen Feed zu holen.

Developer Platform von Cloudflare

Queues: Aufbewahrungsdauer von Nachrichten einstellbar

Die Aufbewahrungsdauer von Queue-Nachrichten lässt sich nun auf 60 Sekunden bis 14 Tage einstellen (bisher fest 4 Tage), per Einstellungsseite oder Wrangler, für alle neuen und bestehenden Queues.

You can now customize a queue's message retention period, from a minimum of 60 seconds to a maximum of 14 days. Previously, it was fixed to the default of 4 days.

Customize a queue's message retention period

You can customize the retention period on the settings page for your queue, or using Wrangler:

Update message retention periodbash

$ wrangler queues update my-queue --message-retention-period-secs 600

This feature is available on all new and existing queues. If you haven't used Cloudflare Queues before, get started with the Cloudflare Queues guide.

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

Beispiel-Prompt für den Bau von KI-Agenten auf Workers

Cloudflare stellt einen Beispiel-Prompt bereit, mit dem sich mithilfe von KI-Modellen KI-Agenten und Anwendungen auf Workers, Workflows, Durable Objects und Workers KV entwickeln lassen.

We've added an example prompt to help you get started with building AI agents and applications on Cloudflare Workers, including Workflows, Durable Objects, and Workers KV.

You can use this prompt with your favorite AI model, including Claude 3.5 Sonnet, OpenAI's o3-mini, Gemini 2.0 Flash, or Llama 3.3 on Workers AI. Models with large context windows will allow you to paste the prompt directly: provide your own prompt within the <user_prompt></user_prompt> tags.

{paste_prompt_here}
<user_prompt>
user: Build an AI agent using Cloudflare Workflows. The Workflow should run when a new GitHub issue is opened on a specific project with the label 'help' or 'bug', and attempt to help the user troubleshoot the issue by calling the OpenAI API with the issue title and description, and a clear, structured prompt that asks the model to suggest 1-3 possible solutions to the issue. Any code snippets should be formatted in Markdown code blocks. Documentation and sources should be referenced at the bottom of the response. The agent should then post the response to the GitHub issue. The agent should run as the provided GitHub bot account.
</user_prompt>
``` …

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

R2: Super Slurper überträgt Daten bis zu 5x schneller

Super Slurper überträgt Daten von Anbietern wie AWS S3 und Google Cloud Storage dank eines verteilten Systems auf der Cloudflare Developer Platform bis zu 5x schneller zu R2, etwa 75.000 Objekte in 3:25 statt 15:30 Minuten.

Super Slurper now transfers data from cloud object storage providers like AWS S3 and Google Cloud Storage to Cloudflare R2 up to 5x faster than it did before.

We moved from a centralized service to a distributed system built on the Cloudflare Developer Platform — using Cloudflare Workers, Durable Objects, and Queues — to both improve performance and increase system concurrency capabilities (and we'll share more details about how we did it soon!)

Super Slurper Objects Migrated

Time to copy 75,000 objects from AWS S3 to R2 decreased from 15 minutes 30 seconds (old) to 3 minutes 25 seconds (after performance improvements)

For more information on Super Slurper and how to migrate data from existing object storage to R2, refer to our documentation.

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

Stream Live: DVR-Funktion zum Zurückspulen und Fortsetzen

Für Stream Live lässt sich per Query-Parameter dvrEnabled=true in Player-Embed oder Manifest-URL eine optionale DVR-Funktion aktivieren, mit der Zuschauer in laufenden Übertragungen zurückspulen können.

Previously, all viewers watched "the live edge," or the latest content of the broadcast, synchronously. If a viewer paused for more than a few seconds, the player would automatically "catch up" when playback started again. Seeking through the broadcast was only available once the recording was available after it concluded.

Starting today, customers can make a small adjustment to the player embed or manifest URL to enable the DVR experience for their viewers. By offering this feature as an opt-in adjustment, our customers are empowered to pick the best experiences for their applications.

When building a player embed code or manifest URL, just add dvrEnabled=true as a query parameter. There are some things to be aware of when using this option. For more information, refer to DVR for Live.

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

Workers aus Git-Repositories erstellen und bereitstellen

Workers lassen sich jetzt durch Import eines GitHub-/GitLab-Repositories oder durch Bereitstellen eines Templates per Git erstellen und werden bei jedem Push auf den gewählten Branch automatisch gebaut und deployt.

Import repo or choose template

You can now create a Worker by:

  • Importing a Git repository: Choose an existing Git repo on your GitHub/GitLab account and set up Workers Builds to deploy your Worker.
  • Deploying a template with Git: Choose from a brand new selection of production ready examples ↗︎ to help you get started with popular frameworks like Astro ↗︎, Remix ↗︎ and Next ↗︎ or build stateful applications with Cloudflare resources like D1 databases, Workers AI or Durable Objects! When you're ready to deploy, Cloudflare will set up your project by cloning the template to your GitHub/GitLab account, provisioning any required resources and deploying your Worker.

With every push to your chosen branch, Cloudflare will automatically build and deploy your Worker.

To get started, go to the Workers dashboard ↗︎. …

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

AI Gateway: Request-Timeouts und Wiederholungen

AI Gateway bietet nun Request Timeouts und Request Retries, die für den Universal Endpoint und unterstützte Provider nutzbar sind und bei langsamen Antworten Fallbacks oder Wiederholungen auslösen können.

AI Gateway adds additional ways to handle requests - Request Timeouts and Request Retries, making it easier to keep your applications responsive and reliable.

Timeouts and retries can be used on both the Universal Endpoint or directly to a supported provider.

Request timeouts A request timeout allows you to trigger fallbacks or a retry if a provider takes too long to respond.

To set a request timeout directly to a provider, add a cf-aig-request-timeout header.

Provider-specific endpoint examplebash

curl https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/workers-ai/@cf/meta/llama-3.1-8b-instruct \
 --header 'Authorization: Bearer {cf_api_token}' \
 --header 'Content-Type: application/json' \
 --header 'cf-aig-request-timeout: 5000'
 --data '{"prompt": "What is Cloudflare?"}'
``` …

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

AI Gateway: Cerebras, ElevenLabs und Cartesia als neue Provider

AI Gateway unterstützt jetzt drei neue Provider: Cartesia und ElevenLabs für Text-to-Speech sowie Cerebras für Inferenz mit Llama 3.1 8B und Llama 3.3 70B.

AI Gateway has added three new providers: Cartesia, Cerebras, and ElevenLabs, giving you more even more options for providers you can use through AI Gateway. Here's a brief overview of each:

  • Cartesia provides text-to-speech models that produce natural-sounding speech with low latency.
  • Cerebras delivers low-latency AI inference to Meta's Llama 3.1 8B and Llama 3.3 70B models.
  • ElevenLabs offers text-to-speech models with human-like voices in 32 languages.

Example of Cerebras log in AI Gateway

To get started with AI Gateway, just update the base URL. Here's how you can send a request to Cerebras using cURL:

Example fetch requestbash

curl -X POST https://gateway.ai.cloudflare.com/v1/ACCOUNT_TAG/GATEWAY/cerebras/chat/completions \ …

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

Überarbeitetes Workers-Metrics-Dashboard

Das Workers-Metrics-Dashboard wurde überarbeitet und erlaubt den Vergleich von Metriken über Worker-Versionen, Einblick in Gradual Deployments, einen grafischen Zeitwähler, Histogramme und die Verfolgung von Fehlerraten nach Version und Status.

We've revamped the Workers Metrics dashboard ↗︎.

Workers Metrics dashboard

Now you can easily compare metrics across Worker versions, understand the current state of a gradual deployment, and review key Workers metrics in a single view. This new interface enables you to:

  • Drag-and-select using a graphical timepicker for precise metric selection.

Workers Metrics graphical timepicker

  • Use histograms to visualize cumulative metrics, allowing you to bucket and compare rates over time.
  • Focus on Worker versions by directly interacting with the version numbers in the legend.

Workers Metrics legend selector

  • Monitor and compare active gradual deployments.
  • Track error rates across versions with grouping both by version and by invocation status. …

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

Workers for Platforms unterstützt jetzt Static Assets

Workers for Platforms-Kunden können statische Assets (HTML, CSS, JavaScript, Bilder) direkt an User Workers anhängen, sodass keine separate Infrastruktur zum Ausliefern mehr nötig ist.

Workers for Platforms customers can now attach static assets (HTML, CSS, JavaScript, images) directly to User Workers, removing the need to host separate infrastructure to serve the assets.

This allows your platform to serve entire front-end applications from Cloudflare's global edge, utilizing caching for fast load times, while supporting dynamic logic within the same Worker. Cloudflare automatically scales its infrastructure to handle high traffic volumes, enabling you to focus on building features without managing servers.

What you can build

Static Sites: Host and serve HTML, CSS, JavaScript, and media files directly from Cloudflare's network, ensuring fast loading times worldwide. This is ideal for blogs, landing pages, and documentation sites because static assets can be efficiently cached and delivered closer to the user, reducing latency and enhancing the overall user experience.

Full-Stack Applications: Combine asset hosting with Cloudflare Workers to power dynamic, interactive applications. If you're an e-commerce platform, you can serve your customers' product pages and run inventory checks from within the same Worker.

index.jsjs

export default {
	async fetch(request, env) {
		const url = new URL(request.url);

		// Check real-time inventory
		if (url.pathname === "/api/inventory/check") {
			const product = url.searchParams.get("product");
			const inventory = await env.INVENTORY_KV.get(product); …

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

HTMLRewriter akzeptiert gestreamte Inhalte in Workers

Methoden wie replace, append und prepend von HTMLRewriter akzeptieren jetzt Response- und ReadableStream-Werte, sodass Inhalte beim Streaming ersetzt werden und Antworten schneller sind.

You can now transform HTML elements with streamed content using HTMLRewriter.

Methods like replace, append, and prepend now accept Response and ReadableStream values as Content.

This can be helpful in a variety of situations. For instance, you may have a Worker in front of an origin, and want to replace an element with content from a different source. Prior to this change, you would have to load all of the content from the upstream URL and convert it into a string before replacing the element. This slowed down overall response times.

Now, you can pass the Response object directly into the replace method, and HTMLRewriter will immediately start replacing the content as it is streamed in. This makes responses faster.

index.jsjs

class ElementRewriter {
	async element(element) {
		// able to replace elements while streaming content
		// the fetched body is not buffered into memory as part
		// of the replace
		let res = await fetch("https://upstream-content-provider.example");
		element.replace(res);
	}
}

export default {
	async fetch(request, env, ctx) {
		let response = await fetch("https://site-to-replace.com");
		return new HTMLRewriter() …

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

AI Gateway: Neue Worker-Binding-Methoden

Neue Workers-Binding-API-Methoden (patchLog, getLog, run) verbinden Workers direkt mit AI Gateway, ohne die REST API und manuelle Authentifizierung zu nutzen.

We have released new Workers bindings API methods, allowing you to connect Workers applications to AI Gateway directly. These methods simplify how Workers calls AI services behind your AI Gateway configurations, removing the need to use the REST API and manually authenticate.

To add an AI binding to your Worker, include the following in your Wrangler configuration file:

Add an AI binding to your Worker.

With the new AI Gateway binding methods, you can now:

  • Send feedback and update metadata with patchLog.
  • Retrieve detailed log information using getLog.
  • Execute universal requests to any AI Gateway provider with run.

For example, to send feedback and update metadata using patchLog:

Send feedback and update metadata using patchLog:

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

Höhere Browser-Rendering-Limits für Workers

Browser Rendering unterstützt nun 10 gleichzeitige Browser-Instanzen pro Account und 10 neue Instanzen pro Minute, zuvor waren es jeweils 2.

Browser Rendering now supports 10 concurrent browser instances per account and 10 new instances per minute, up from the previous limits of 2.

This allows you to launch more browser tasks from Cloudflare Workers.

To manage concurrent browser sessions, you can use Queues or Workflows:

index.jsjs

export default {
	async queue(batch, env) {
		for (const message of batch.messages) {
			const browser = await puppeteer.launch(env.BROWSER);
			const page = await browser.newPage();

			try {
				await page.goto(message.url, {
					waitUntil: message.waitUntil,
				});
				// Process page...
			} finally {
				await browser.close();
			}
		}
	},
};

index.tsts

interface QueueMessage {
	url: string;
	waitUntil: number;
}

export interface Env {
	BROWSER_QUEUE: Queue<QueueMessage>;
	BROWSER: Fetcher;
}

export default {
	async queue(batch: MessageBatch<QueueMessage>, env: Env): Promise<void> {
		for (const message of batch.messages) {
			const browser = await puppeteer.launch(env.BROWSER);
			const page = await browser.newPage();

			try {
				await page.goto(message.url, {
					waitUntil: message.waitUntil,
				});
				// Process page...
			} finally {
				await browser.close();
			}
		}
	},
};

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

Stream: Mehr Sprachen für KI-generierte Untertitel

Die per Workers AI generierten Untertitel von Stream unterstützen zusätzlich Tschechisch, Niederländisch, Französisch, Deutsch, Italienisch, Japanisch, Koreanisch, Polnisch, Portugiesisch, Russisch und Spanisch.

Stream's generated captions leverage Workers AI to automatically transcribe audio and provide captions to the player experience. We have added support for these languages:

  • cs - Czech
  • nl - Dutch
  • fr - French
  • de - German
  • it - Italian
  • ja - Japanese
  • ko - Korean
  • pl - Polish
  • pt - Portuguese
  • ru - Russian
  • es - Spanish

For more information, learn about adding captions to videos.

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

Hyperdrive konfiguriert private Datenbanken automatisch

Hyperdrive richtet für private Datenbanken automatisch Cloudflare Access, Service Token und Policies zur Absicherung des Cloudflare Tunnel ein, was weiterhin auch manuell möglich ist.

Hyperdrive now automatically configures your Cloudflare Tunnel to connect to your private database.

Automatic configuration of Cloudflare Access and Service Token in the Cloudflare dashboard for Hyperdrive.

When creating a Hyperdrive configuration for a private database, you only need to provide your database credentials and set up a Cloudflare Tunnel within the private network where your database is accessible. Hyperdrive will automatically create the Cloudflare Access, Service Token, and Policies needed to secure and restrict your Cloudflare Tunnel to the Hyperdrive configuration.

To create a Hyperdrive for a private database, you can follow the Hyperdrive documentation. You can still manually create the Cloudflare Access, Service Token, and Policies if you prefer.

This feature is available from the Cloudflare dashboard.

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

Workers KV: Namespace-Limit auf 1000 erhöht

Pro Account sind jetzt bis zu 1000 Workers KV Namespaces statt 200 möglich, für Free- und Paid-Pläne.

You can now have up to 1000 Workers KV namespaces per account.

Workers KV namespace limits were increased from 200 to 1000 for all accounts. Higher limits for Workers KV namespaces enable better organization of key-value data, such as by category, tenant, or environment.

Consult the Workers KV limits documentation for the rest of the limits. This increased limit is available for both the Free and Paid Workers plans.

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

Node.js DNS-, Net- und Timer-APIs in Workers unterstützt

Mit aktiviertem nodejs_compat-Flag lassen sich in Workers nun die Node.js-APIs node:net, node:dns und node:timers verwenden.

When using a Worker with the nodejs_compat compatibility flag enabled, you can now use the following Node.js APIs:

node:net

You can use node:net ↗︎ to create a direct connection to servers via a TCP sockets with net.Socket ↗︎.

index.jsjs

import net from "node:net";

const exampleIP = "127.0.0.1";

export default {
	async fetch(req) {
		const socket = new net.Socket();
		socket.connect(4000, exampleIP, function () {
			console.log("Connected");
		});

		socket.write("Hello, Server!");
		socket.end();

		return new Response("Wrote to server", { status: 200 });
	},
};

index.tsts

import net from "node:net";

const exampleIP = "127.0.0.1";

export default {
  async fetch(req): Promise<Response> {
    const socket = new net.Socket();
    socket.connect(4000, exampleIP, function () {
      console.log("Connected");
    });

    socket.write("Hello, Server!");
    socket.end();

    return new Response("Wrote to server", { status: 200 });
  },
} satisfies ExportedHandler;
``` …

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

Workflows: Höhere Limits und besseres Queueing

Workflows (Beta) erlaubt bis zu 1024 Steps (sleep zählt nicht mit), bietet instanceId im WorkflowEvent, verbessertes Queueing und pause/resume für wartende Instanzen.

Workflows (beta) now allows you to define up to 1024 steps. sleep steps do not count against this limit.

We've also added:

  • instanceId as property to the WorkflowEvent type, allowing you to retrieve the current instance ID from within a running Workflow instance
  • Improved queueing logic for Workflow instances beyond the current maximum concurrent instances, reducing the cases where instances are stuck in the queued state.
  • Support for pause and resume for Workflow instances in a queued state.

We're continuing to work on increases to the number of concurrent Workflow instances, steps, and support for a new waitForEvent API over the coming weeks.

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

D1 Worker API Requests 40–60 % schneller

Durch den Wegfall redundanter Netzwerk-Roundtrips sinkt die End-to-End-Latenz von D1-Anfragen über die Workers API um bis zu 60 %.

Users making D1 requests via the Workers API can see up to a 60% end-to-end latency improvement due to the removal of redundant network round trips needed for each request to a D1 database.

D1 Worker API latency

p50, p90, and p95 request latency aggregated across entire D1 service. These latencies are a reference point and should not be viewed as your exact workload improvement.

This performance improvement benefits all D1 Worker API traffic, especially cross-region requests where network latency is an outsized latency factor. For example, a user in Europe talking to a database in North America. D1 location hints can be used to influence the geographic location of a database.

For more details on how D1 removed redundant round trips, see the D1 specific release note entry.

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

AI Gateway unterstützt DeepSeek als Provider

AI Gateway unterstützt nun DeepSeek, einschließlich DeepSeek-V3, und Nutzer können ihre DeepSeek-API-Aufrufe über die Gateway-Basis-URL leiten.

AI Gateway now supports DeepSeek, including their cutting-edge DeepSeek-V3 model. With this addition, you have even more flexibility to manage and optimize your AI workloads using AI Gateway. Whether you're leveraging DeepSeek or other providers, like OpenAI, Anthropic, or Workers AI, AI Gateway empowers you to:

  • Monitor: Gain actionable insights with analytics and logs.
  • Control: Implement caching, rate limiting, and fallbacks.
  • Optimize: Improve performance with feedback and evaluations.

AI Gateway adds DeepSeek as a provider

To get started, simply update the base URL of your DeepSeek API calls to route through AI Gateway. Here's how you can send a request using cURL:

Example fetch requestbash

curl https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/deepseek/chat/completions \
 --header 'content-type: application/json' \
 --header 'Authorization: Bearer DEEPSEEK_TOKEN' \
 --data '{
    "model": "deepseek-chat",
    "messages": [
        {
            "role": "user",
            "content": "What is Cloudflare?"
        }
    ]
}'
``` …

Originalquelle(öffnet in neuem Tab)Problem melden

Developer Platform von Cloudflare

Schnellere Workers Builds mit Build Caching und Watch Paths

Workers Builds (Beta) bietet ein projektweites Build Caching für Abhängigkeiten und Build-Ausgaben sowie Build Watch Paths, um Pfade für den Build ein- oder auszuschließen.

Build caching settingsBuild watch path settings

Workers Builds, the integrated CI/CD system for Workers (currently in beta), now lets you cache artifacts across builds, speeding up build jobs by eliminating repeated work, such as downloading dependencies at the start of each build.

  • Build Caching: Cache dependencies and build outputs between builds with a shared project-wide cache, ensuring faster builds for the entire team.

  • Build Watch Paths: Define paths to include or exclude from the build process, ideal for monorepos to target only the files that need to be rebuilt per Workers project.

To get started, select your Worker on the Cloudflare dashboard ↗︎ then go to Settings > Builds, and connect a GitHub or GitLab repository. Once connected, you'll see options to configure Build Caching and Build Watch Paths.

Originalquelle(öffnet in neuem Tab)Problem melden