Add AI-powered IP reputation analysis using Cloudflare Workers AI (Llama 3.1 70B)#13
Conversation
🚀 PR Status Dashboard📊 Workflow Status✅ CI: success (view) 🌐 Preview EnvironmentsSPA Preview: https://copilot-update-cloudflare-worker-ai.albatross-5kt.pages.dev 📝 PR DetailsBranch: This comment is automatically updated by the PR Update workflow |
🚀 PR Status Dashboard📊 Workflow Status✅ CI: success (view) 🌐 Preview EnvironmentsSPA Preview: https://copilot-update-cloudflare-worker-ai.albatross-5kt.pages.dev 📝 PR DetailsBranch: This comment is automatically updated by the PR Update workflow |
Co-authored-by: devnomadic <14085319+devnomadic@users.noreply.github.com>
Co-authored-by: devnomadic <14085319+devnomadic@users.noreply.github.com>
Co-authored-by: devnomadic <14085319+devnomadic@users.noreply.github.com>
Co-authored-by: devnomadic <14085319+devnomadic@users.noreply.github.com>
b48a4c7 to
740a3fa
Compare
… and improve CORS request management
Deploying albatross with
|
| Latest commit: |
f60182b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2ff427d7.albatross-5kt.pages.dev |
| Branch Preview URL: | https://copilot-update-cloudflare-wo.albatross-5kt.pages.dev |
…cting the response object
…emove manual construction for property order
… and event pattern summaries
…minor docs/date updates - Home.razor: remove static ascii image and render an inline pixel matrix using AsciiArtPixelMatrix, BuildAsciiArtPixelMatrix and GetPixelShadeClass; add matrix dimensions/constants and wire up markup - wwwroot/css/app.css: add pixel-matrix styles and responsive pixel sizing; reduce JSON/code font-size and remove redundant wide-screen font-size overrides for inputs - cloudflare-worker.template.js: expand eventsSummary comment to include targeted services and longer summary guidance - wwwroot/sitemap.xml: update lastmod timestamps to 2025-10-31
… + aspect-ratio, enforce square pixels, set container width/max-width and responsive widths; center IP input text/placeholder
…3, tighten container padding, and normalize img width attribute quoting
…me.razor, modify AbuseIPDBService and Cloudflare worker to support AI analysis, and update sitemap and index.html for SEO improvements.
Integrates Cloudflare Workers AI to generate intelligent risk assessments for IP addresses using the Llama 3.1 70B Instruct model, analyzing real-time data from AbuseIPDB and Cloudflare Radar APIs.
Changes
Worker Configuration
Worker Implementation
generateAIReputation()function calls Llama 3.1 70B with structured promptenvparameter for binding accessService Models
AIReputationclass with success, error, analysis, model, and timestamp fieldsAIAnalysisclass with risk level, trust score, summary, and recommendationsAbuseIPDBApiResponseto includeAIReputationfieldResponse Format
{ "data": { /* AbuseIPDB data */ }, "asnInfo": { /* Cloudflare Radar ASN data */ }, "aiReputation": { "success": true, "analysis": { "riskLevel": "medium", "trustScore": 65, "summary": "IP from US datacenter with 15 abuse reports. Moderate risk profile.", "recommendations": [ "Review abuse report patterns", "Consider rate limiting for API access" ] }, "model": "@cf/meta/llama-3.1-70b-instruct", "timestamp": "2025-10-28T04:45:00.000Z" } }Notes
success: falsewith error messageOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.