YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
revert(ai-gateway): drop DEBUG_USER_ID logger
Louis Beaumont3cfc899c3cdf
diff --git a/packages/ai-gateway/src/index.ts b/packages/ai-gateway/src/index.tsindex 5aaa5f922..aca05a7c4 100644--- a/packages/ai-gateway/src/index.ts+++ b/packages/ai-gateway/src/index.ts@@ -98,26 +98,6 @@ async function handleRequest(request: Request, env: Env, ctx: ExecutionContext):})));}- // Temp abuse-investigation logger: when DEBUG_USER_ID matches the caller,- // dump request body + headers + CF metadata to Workers Logs. The user_id- // is NEVER printed — chunks are tagged with a random id only.- if (env.DEBUG_USER_ID && authResult.userId === env.DEBUG_USER_ID) {- const cf = (request as any).cf || {};- const payload = JSON.stringify({- ts: new Date().toISOString(),- ip: request.headers.get('cf-connecting-ip'),- ua: request.headers.get('user-agent'),- cf: { country: cf.country, colo: cf.colo, asn: cf.asOrganization, city: cf.city },- body,- });- const tag = crypto.randomUUID().slice(0, 8);- const CHUNK = 20000;- const total = Math.ceil(payload.length / CHUNK) || 1;- for (let i = 0, p = 1; i < payload.length; i += CHUNK, p++) {- console.log(`[ABUSE-DEBUG ${tag} ${p}/${total}] ${payload.slice(i, i + CHUNK)}`);- }- }-// Check if model is allowed for this tierif (!isModelAllowed(body.model, authResult.tier, env)) {const allowedModels = getTierConfig(env)[authResult.tier].allowedModels;diff --git a/packages/ai-gateway/src/types.ts b/packages/ai-gateway/src/types.tsindex e865f72d8..cdbdd8c78 100644--- a/packages/ai-gateway/src/types.ts+++ b/packages/ai-gateway/src/types.ts@@ -187,9 +187,6 @@ export interface Env {LIMIT_SUBSCRIBED_DAILY?: string;LIMIT_SUBSCRIBED_RPM?: string;LIMIT_IP_DAILY?: string;- // Temporary abuse-investigation: if set, log raw request body + headers- // when authResult.userId matches. Never log the user_id itself.- DEBUG_USER_ID?: string;}// User tier for rate limiting and model access