Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Python agentaianthropicclaude-codecompressioncontext-engineeringcontext-windowcursorfastapilangchainllmmcpopenaiprompt-engineeringproxypythonragtoken-optimizationtokenstypescript
fix(beacon): stop Cloudflare logging senders' IP addresses (#4018)
Tejas Chopradb983bacc616
diff --git a/deploy/beacon/worker.js b/deploy/beacon/worker.jsindex 43cfb29f3..208f70e76 100644--- a/deploy/beacon/worker.js+++ b/deploy/beacon/worker.js@@ -6,7 +6,8 @@* client sends AND exactly what happens to it on arrival. "Trust us" is not a* privacy policy.*- * Deployed at otlp.headroomlabs.ai. Three jobs:+ * Deployed at headroom-beacon.headroom-beacon.workers.dev (otlp.headroomlabs.ai+ * is planned but not yet routed; see wrangler.toml). Three jobs:** 1. Allowlist. Drop every field not on ALLOWED_KEYS before anything is* written. This is the only privacy control that works retroactively —@@ -25,7 +26,9 @@** What this deliberately does NOT do: log, store, or forward the source IP.* Cloudflare offers it as cf-connecting-ip; it is the one field that would- * deanonymise install_id, so it is never read.+ * deanonymise install_id, so it is never read. Cloudflare's own per-request+ * invocation logs would record it regardless of this code, which is why+ * wrangler.toml turns them off (observability.logs.invocation_logs = false).*/// Mostly mirrors the payload built by _Session.payload(); an extension maydiff --git a/deploy/beacon/wrangler.toml b/deploy/beacon/wrangler.tomlindex 826dba6bb..1824fb34d 100644--- a/deploy/beacon/wrangler.toml+++ b/deploy/beacon/wrangler.toml@@ -53,6 +53,14 @@ subrequests = 100000[observability]enabled = true+# Invocation logs record every request's headers and Cloudflare metadata,+# which includes the sender's IP address (cf-connecting-ip, x-real-ip) and+# their city, postal code and coordinates. worker.js never reads these, but+# with invocation logs on, Cloudflare writes them to Workers Logs for every+# beacon POST anyway. Keep them off; errors and console.log still appear.+[observability.logs]+invocation_logs = false+# Rate limiting is configured in the Cloudflare dashboard, not here — this# endpoint is unauthenticated by design (anonymity is the product), so it is# the only thing between the Worker and a bored stranger: