repo_description: 🚀 Next Generation Multi-tenant AI One-Stop Solution. Builtin Admin & Billing System. Enterprise-Grade Unified LLM Gateway Support for 200+ Models And 35+ Providers, Load Balacing w/ Priority-base Routing, Cost Management, Chat Share, Cloud Sync, Credit/Subscription Billing, All File Parsing, Web Search, Built-in Model Cache.
repo_topics: ai-gateway api chat chatgpt cross-platform gemini golang llm-gateway openai proxy react
code: 
  const SERVICE_NAME = "coai";
  
  self.addEventListener('activate', function (event) {
    console.debug("[service] service worker activated");
  });
  
  self.addEventListener('install', function (event) {
    event.waitUntil(
      caches.open(SERVICE_NAME)
        .then(function (cache) {
          return cache.addAll([]);
        })
    );
  });
  
  self.addEventListener('fetch', function (event) {
    event.respondWith(
      caches.match(event.request)
        .then(function (response) {
          return response || fetch(event.request);
        })
    );
  });
  