Repository navigation
v2.25.0
Surf 2.25.0 lets you send its AI page checks through your own Cloudflare AI Gateway, so you can see and control those calls from Cloudflare's dashboard. Set one environment variable and the semantic commands that run on Cloudflare's models go through your gateway, using the token you already have. This release also fixes output being cut off when you pipe Surf into another program, so scripts and agents reading Surf's output always get all of it.
Highlights
- Your own AI Gateway for Surf's Cloudflare calls: set
CLOUDFLARE_GATEWAY_IDand the calls show up in your gateway's logs and analytics and follow its rate limits and caching. Nothing changes if you don't set it. - Piped output stays complete:
surf page.read | grep price, or an agent readingsurf --help-full, no longer stops partway through when the reading program is slower than Surf.
Full changelog
Highlights
- If you run Surf's AI page checks on Cloudflare, you can now send those calls through your own Cloudflare AI Gateway by setting one environment variable. They then show up in the gateway's logs and analytics and follow its rate limits and caching.
- Output piped from Surf into another program, such as
grepor an agent readingsurf --help-full, is no longer cut off partway through.
Added
- Cloudflare AI Gateway routing - Surf's semantic commands, which ask an AI model to judge or extract from a page, can run on Cloudflare's Clef and Clairic models. Set
CLOUDFLARE_GATEWAY_IDto your gateway's id and those calls go through that Cloudflare AI Gateway, so they show up in its logs and analytics and follow its rate limits and caching. It uses the Cloudflare token you already set up; no second token is needed. The gateway logs what Surf sends, which includes page content. Without the variable, calls go straight to Workers AI as before.
Fixed
- Piped output is no longer cut off - When you piped Surf's output into another program, such as
surf page.read | grep priceor an agent readingsurf --help-full, the output could stop partway through if that program read more slowly than Surf wrote. Surf now finishes writing all of its output before it exits.