ouchbill 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- // ouchbill 0.1.0 online module, loaded only for --fresh or --online. Copyright (c) 2026 Drevan. All rights reserved. Proprietary: see LICENSE. Third-party notices: THIRD_PARTY_NOTICES.txt.
2
- import It from"node:dns";import H from"node:net";import Et from"node:os";import R from"node:path";import Ut from"node:tls";import Ie from"node:tls";var O=10,se=8e3,j=e=>e.replace(/\\/g,"/"),F=e=>j(e).split("/").pop();function le(e){let t=F(e);return/^\.env\.(example|sample|template|dist)$/.test(t)||/^\.env\.[a-z]+\.(example|sample)$/.test(t)||/^(vercel\.json|netlify\.toml|fly\.toml|CNAME|package\.json)$/.test(t)||/^next\.config\.(js|mjs|cjs|ts)$/.test(t)||/^(docker-)?compose[^/]*\.ya?ml$/.test(t)}var Ee=new Set(["localhost","test","example","invalid","local","internal","lan","home","corp","onion","arpa"]),Ue=["openai.com","anthropic.com","googleapis.com","google.com","gstatic.com","github.com","githubusercontent.com","stripe.com","twilio.com","sendgrid.com","sendgrid.net","slack.com","discord.com","cohere.com","cohere.ai","mistral.ai","groq.com","x.ai","perplexity.ai","openrouter.ai","huggingface.co","replicate.com","elevenlabs.io","deepgram.com","amazonaws.com","azure.com","microsoft.com","microsoftonline.com","cloudflare.com","sentry.io","npmjs.org","npmjs.com","w3.org","schema.org","unsplash.com","gravatar.com","supabase.co","supabase.com","clerk.com","clerk.dev","auth0.com","posthog.com","mixpanel.com","segment.io","resend.com","mailgun.net","razorpay.com","paypal.com","vercel.com","netlify.com","fly.io","heroku.com","render.com","railway.app","docker.com","docker.io","ghcr.io","gitlab.com","bitbucket.org"],_e=["vercel.app","netlify.app","fly.dev","herokuapp.com","onrender.com","pages.dev","workers.dev","up.railway.app"],je=/(^|\.)(your-?domain|your-?app|your-?site|my-?domain|my-?app|my-?site|changeme|domain)\.[a-z]+$/,Oe=e=>/^\d{1,3}(\.\d{1,3}){3}$/.test(e)||e.includes(":"),re=(e,t)=>e===t||e.endsWith("."+t);function K(e){let t=e.trim().toLowerCase().replace(/\.$/,"");if(!/^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$/.test(t)||Oe(t))return!1;let o=t.split("."),a=o[o.length-1];return!(Ee.has(a)||a.length<2||/^\d+$/.test(a)||o[o.length-2]==="example"||Ue.some(r=>re(t,r))||_e.some(r=>re(t,r))||je.test(t))}var De=/\bhttps?:\/\/(?:[^\s/@"'`<>]*@)?([a-z0-9*${}][a-z0-9.*${}-]*)(?::\d+)?/gi,ie=/^[a-z0-9][a-z0-9.-]*\.[a-z]{2,}$/i;function Be(e,t){let o=[],a=F(e);for(let i of t.matchAll(De))o.push(i[1]);let r=t.replace(/\s+#.*$/,"").trim();if(a==="CNAME"&&ie.test(r)&&o.push(r),a.startsWith(".env")){let i=/^(?:export\s+)?[A-Z0-9_]*(HOST|HOSTNAME|DOMAIN|ORIGIN)\s*=\s*["']?([^"'\s#]+)/i.exec(r);i&&ie.test(i[2])&&o.push(i[2])}if(/^(docker-)?compose/.test(a)){for(let i of t.matchAll(/VIRTUAL_HOST\s*[=:]\s*["']?([a-z0-9.-]+\.[a-z]{2,})/gi))o.push(i[1]);for(let i of t.matchAll(/Host\(\s*[`"']([^`"']+)[`"']/g))o.push(i[1])}if(/^next\.config/.test(a)){for(let i of t.matchAll(/hostname\s*:\s*["'`]([^"'`]+)["'`]/g))o.push(i[1]);for(let i of t.matchAll(/domains\s*:\s*\[([^\]]*)\]/g))for(let s of i[1].matchAll(/["'`]([^"'`]+)["'`]/g))o.push(s[1])}if(a==="vercel.json")for(let i of t.matchAll(/"alias"\s*:\s*\[?\s*"([^"]+)"/g))o.push(i[1]);if(a==="netlify.toml")for(let i of t.matchAll(/^\s*(?:url|domain|alias)\s*=\s*["']([^"']+)["']/gi))o.push(i[1]);if(a==="fly.toml")for(let i of t.matchAll(/^\s*(?:hostname|domain)\s*=\s*["']([^"']+)["']/gi))o.push(i[1]);return o}function ce(e){let t=new Set,o=[];for(let a of[...e].sort((r,i)=>j(r.path).localeCompare(j(i.path)))){if(!le(a.path))continue;let r=F(a.path)==="package.json",i=a.text.split(/\r?\n/);for(let s=0;s<i.length;s++)if(!(r&&!/^\s*"homepage"\s*:/.test(i[s])))for(let g of Be(a.path,i[s])){let p=g.toLowerCase().replace(/\.$/,"");!K(p)||t.has(p)||(t.add(p),o.push({host:p,file:j(a.path),line:s+1}))}}return o}var $e=864e5,de=(e,t)=>Math.floor((e.getTime()-t.getTime())/$e);async function W(e,t,o=O){let a=[];for(let r of e.slice(0,o))a.push(await t(r));return{results:a,skipped:e.slice(o)}}function pe(e,t={}){let o=t.connect??(i=>Ie.connect(i)),a=t.now??(()=>new Date),r=t.timeoutMs??se;return new Promise(i=>{let s=!1,g,p=l=>{if(!s){s=!0,clearTimeout(m);try{g?.destroy()}catch{}i(l)}},m=setTimeout(()=>p({host:e,error:`timed out after ${r} ms`}),r);try{g=o({host:e,port:443,servername:e,rejectUnauthorized:!1})}catch(l){return p({host:e,error:l.message})}g.on("error",l=>p({host:e,error:l.message})),g.on("timeout",()=>p({host:e,error:"timed out"})),g.on("close",()=>p({host:e,error:"connection closed before the handshake finished"})),g.on("secureConnect",()=>{let l=g.getPeerCertificate(),f=l?.valid_to?new Date(l.valid_to):null;if(!f||Number.isNaN(f.getTime()))return p({host:e,error:"no readable certificate expiry"});p({host:e,expiresOn:f.toISOString().slice(0,10),daysLeft:de(f,a()),issuer:l.issuer?.O??l.issuer?.CN??"unknown"})})})}var ze=new Set(["co.uk","org.uk","me.uk","ltd.uk","plc.uk","ac.uk","gov.uk","com.au","net.au","org.au","edu.au","gov.au","id.au","co.in","net.in","org.in","firm.in","gen.in","ind.in","ac.in","gov.in","res.in","co.nz","co.za","co.jp","ne.jp","or.jp","com.br","com.mx","com.cn","com.sg","com.hk","co.kr","co.id","com.tr","com.ar"]);function D(e){let t=e.toLowerCase().replace(/\.$/,"").split(".");return t.length<=2?t.join("."):ze.has(t.slice(-2).join("."))?t.slice(-3).join("."):t.slice(-2).join(".")}var B="this registry publishes no RDAP data",Le=e=>`ouchbill/${e&&/^[0-9A-Za-z.+-]{1,40}$/.test(e)?e:"dev"} (+https://github.com)`;function Ne(e,t,o){let a=t,r=a?.events?.find(m=>m.eventAction==="expiration"),i=r?.eventDate?new Date(r.eventDate):null;if(!i||Number.isNaN(i.getTime()))return{domain:e,error:"registry reply has no expiration date"};let s,p=a?.entities?.find(m=>m.roles?.includes("registrar"))?.vcardArray?.[1]??[];for(let m of p)Array.isArray(m)&&m[0]==="fn"&&typeof m[3]=="string"&&(s=m[3]);return{domain:e,expiresOn:i.toISOString().slice(0,10),daysLeft:de(i,o),...s?{registrar:s}:{}}}async function ue(e,t={}){let o=D(e),a=t.fetch??globalThis.fetch,r=t.now??(()=>new Date),i=t.timeoutMs??se,s=new AbortController,g=setTimeout(()=>s.abort(),i);try{let p=await a(`https://rdap.org/domain/${encodeURIComponent(o)}`,{redirect:"follow",headers:{accept:"application/rdap+json","user-agent":Le(t.version)},signal:s.signal});if(!p.ok){if(p.status===404){let m=null;try{m=await p.json()}catch{m=null}let l=m?.title;if(typeof l=="string"&&/no rdap service/i.test(l))return{domain:o,error:B}}return{domain:o,error:`RDAP answered HTTP ${p.status}`}}return Ne(o,await p.json(),r())}catch(p){return{domain:o,error:s.signal.aborted?`timed out after ${i} ms`:p.message}}finally{clearTimeout(g)}}import{createPublicKey as ot,verify as at}from"node:crypto";import{mkdir as rt,readFile as it,rename as st,writeFile as lt}from"node:fs/promises";import ke from"node:path";var A="2026-11-23",x={anthropic:"https://platform.claude.com/docs/en/about-claude/model-deprecations",openai:"https://developers.openai.com/api/docs/deprecations",google:"https://aistudio.google.com/docs/deprecations"},T=(e,t,o,a,r)=>({vendor:"anthropic",ids:e,date:t,replacement:o,announced:a,...r?{related:r}:{}}),S=(e,t,o,a,r)=>({vendor:"google",ids:e,date:t,replacement:o,announced:a,...r?{routesTo:r}:{}}),h=(e,t,o,a,r)=>({vendor:"openai",ids:e,date:t,replacement:o,announced:a,...r?{related:r}:{}}),G=[T(["claude-sonnet-4-5-20250929","claude-sonnet-4-5"],"2026-11-30","claude-sonnet-5-5","2026-09-30"),T(["claude-opus-4-5-20251101","claude-opus-4-5"],"2027-01-22","claude-opus-5-5","2026-11-23"),T(["claude-opus-4-1-20250805"],"2026-08-05","claude-opus-4-8","2026-06-05"),T(["claude-sonnet-4-20250514","claude-opus-4-20250514"],"2026-06-15","claude-sonnet-5-5 / claude-opus-4-8","2026-04-14"),T(["claude-3-haiku-20240307"],"2026-04-20","claude-haiku-4-5-20251001","2026-02-19"),T(["claude-3-5-haiku-20241022","claude-3-7-sonnet-20250219"],"2026-02-19","claude-haiku-4-5-20251001 / claude-sonnet-5-5","2025-10-28"),h(["gpt-image-1-mini","gpt-image-1.5","gpt-image-1.5-2025-12-16","chatgpt-image-latest"],"2026-12-01","gpt-image-2.6-sunburst or gpt-image-2.6-flare","2026-06-02"),h(["gpt-5","gpt-5-2025-08-07"],"2026-12-11","gpt-6.1-sol","2026-06-11"),h(["gpt-5-mini","gpt-5-mini-2025-08-07"],"2026-12-11","gpt-6.1-terra","2026-06-11"),h(["gpt-5-nano","gpt-5-nano-2025-08-07"],"2026-12-11","gpt-6-luna","2026-06-11"),h(["gpt-5-pro","gpt-5-pro-2025-10-06"],"2026-12-11","gpt-6.1-sol (reasoning.mode: pro, Responses API)","2026-06-11"),h(["o3","o3-2025-04-16"],"2026-12-11","gpt-6.1-sol","2026-06-11"),h(["o3-pro","o3-pro-2025-06-10"],"2026-12-11","gpt-6.1-sol (reasoning.mode: pro, Responses API)","2026-06-11"),h(["tts-1","tts-1-hd","gpt-4o-mini-tts","gpt-4o-mini-tts-2025-03-20","gpt-4o-mini-tts-2025-12-15"],"2027-01-06","gpt-realtime-2.1-mini","2026-10-01"),h(["gpt-4o-2024-08-06","gpt-4o-2024-11-20"],"2027-01-14","gpt-6-luna","2026-10-14",["gpt-4o"]),h(["gpt-4o-mini-2024-07-18"],"2027-01-14","gpt-6-luna","2026-10-14",["gpt-4o-mini"]),h(["gpt-4.1-2025-04-14"],"2027-01-14","gpt-6-luna","2026-10-14",["gpt-4.1"]),h(["gpt-4.1-mini-2025-04-14"],"2027-01-14","gpt-6-luna","2026-10-14",["gpt-4.1-mini"]),h(["gpt-realtime","gpt-realtime-2025-08-28","gpt-4o-realtime","gpt-realtime-mini","gpt-realtime-mini-2025-12-15","gpt-4o-mini-realtime"],"2027-01-20","gpt-realtime-2.1 / gpt-realtime-2.1-mini","2026-07-20"),h(["gpt-audio","gpt-audio-2025-08-28","gpt-4o-audio","gpt-audio-mini","gpt-audio-mini-2025-12-15","gpt-4o-mini-audio"],"2027-01-20","gpt-audio-1.5","2026-07-20"),h(["gpt-4o-mini-transcribe-2025-03-20"],"2027-01-20","gpt-4o-mini-transcribe-2025-12-15","2026-07-20"),h(["gpt-5.5-cyber-preview"],"2027-02-01","the most capable cyber model available to you","2026-11-05"),h(["gpt-image-2","gpt-image-2-2026-04-21"],"2027-02-10","gpt-image-2.6-sunburst or gpt-image-2.6-flare","2026-11-10"),h(["whisper-1","gpt-4o-transcribe","gpt-4o-mini-transcribe","gpt-4o-mini-transcribe-2025-12-15","gpt-4o-transcribe-diarize"],"2027-02-26","gpt-live-transcribe or gpt-transcribe","2026-08-26"),h(["gpt-5.3-codex"],"2027-04-01","gpt-6-sol","2026-10-01"),h(["gpt-5.4-nano","gpt-5.4-nano-2026-03-17"],"2027-04-01","gpt-6-luna","2026-10-01"),h(["gpt-5.1","gpt-5.1-2025-11-13"],"2027-04-01","gpt-6-sol","2026-10-01"),S(["gemini-2.5-pro"],"2026-12-01","gemini-3.8-flash","2026-11-23","gemini-3.8-flash"),S(["gemini-2.5-flash"],"2026-12-01","gemini-3.5-flash-lite","2026-11-23","gemini-3.5-flash-lite"),S(["gemini-omni-1.1-flash"],"2026-12-03","gemini-omni-1.2-flash","2026-11-23"),S(["gemini-3.1-flash-tts-preview","gemini-2.5-flash-preview-tts","gemini-2.5-pro-preview-tts"],"2026-12-18","gemini-3.8-flash-tts or gemini-3.8-flash-lite-tts","2026-11-23"),S(["gemini-2.5-flash-image"],"2027-03-15","gemini-3.1-flash-lite-image","2026-11-23"),S(["gemini-2.5-flash-native-audio-preview-12-2025"],"2027-03-31","gemini-3.8-live","2026-11-23"),S(["gemini-3.1-flash-lite"],"2027-05-07","gemini-3.5-flash-lite","2026-11-23"),S(["gemini-embedding-001"],"2028-05-14","gemini-embedding-2","2026-11-26")];function Me(e){let t=null;return o=>{if(!t){t=[0];for(let i=e.indexOf(`
1
+ // ouchbill 0.2.1 online module, loaded only for --fresh or --online. Copyright (c) 2026 Drevan. All rights reserved. Proprietary: see LICENSE. Third-party notices: THIRD_PARTY_NOTICES.txt.
2
+ import Kt from"node:dns";import V from"node:net";import Wt from"node:os";import O from"node:path";import Gt from"node:tls";import Le from"node:tls";var M=10,me=8e3,N=e=>e.replace(/\\/g,"/"),Y=e=>N(e).split("/").pop();function he(e){let t=Y(e);return/^\.env\.(example|sample|template|dist)$/.test(t)||/^\.env\.[a-z]+\.(example|sample)$/.test(t)||/^(vercel\.json|netlify\.toml|fly\.toml|CNAME|package\.json)$/.test(t)||/^next\.config\.(js|mjs|cjs|ts)$/.test(t)||/^(docker-)?compose[^/]*\.ya?ml$/.test(t)}var Ne=new Set(["localhost","test","example","invalid","local","internal","lan","home","corp","onion","arpa"]),Me=["openai.com","anthropic.com","googleapis.com","google.com","gstatic.com","github.com","githubusercontent.com","stripe.com","twilio.com","sendgrid.com","sendgrid.net","slack.com","discord.com","cohere.com","cohere.ai","mistral.ai","groq.com","x.ai","perplexity.ai","openrouter.ai","huggingface.co","replicate.com","elevenlabs.io","deepgram.com","amazonaws.com","azure.com","microsoft.com","microsoftonline.com","cloudflare.com","sentry.io","npmjs.org","npmjs.com","w3.org","schema.org","unsplash.com","gravatar.com","supabase.co","supabase.com","clerk.com","clerk.dev","auth0.com","posthog.com","mixpanel.com","segment.io","resend.com","mailgun.net","razorpay.com","paypal.com","vercel.com","netlify.com","fly.io","heroku.com","render.com","railway.app","docker.com","docker.io","ghcr.io","gitlab.com","bitbucket.org"],Fe=["vercel.app","netlify.app","fly.dev","herokuapp.com","onrender.com","pages.dev","workers.dev","up.railway.app"],qe=/(^|\.)(your-?domain|your-?app|your-?site|my-?domain|my-?app|my-?site|changeme|domain)\.[a-z]+$/,He=e=>/^\d{1,3}(\.\d{1,3}){3}$/.test(e)||e.includes(":"),pe=(e,t)=>e===t||e.endsWith("."+t);function J(e){let t=e.trim().toLowerCase().replace(/\.$/,"");if(!/^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$/.test(t)||He(t))return!1;let o=t.split("."),a=o[o.length-1];return!(Ne.has(a)||a.length<2||/^\d+$/.test(a)||o[o.length-2]==="example"||Me.some(r=>pe(t,r))||Fe.some(r=>pe(t,r))||qe.test(t))}var Ke=/\bhttps?:\/\/(?:[^\s/@"'`<>]*@)?([a-z0-9*${}][a-z0-9.*${}-]*)(?::\d+)?/gi,ge=/^[a-z0-9][a-z0-9.-]*\.[a-z]{2,}$/i;function We(e,t){let o=[],a=Y(e);for(let i of t.matchAll(Ke))o.push(i[1]);let r=t.replace(/\s+#.*$/,"").trim();if(a==="CNAME"&&ge.test(r)&&o.push(r),a.startsWith(".env")){let i=/^(?:export\s+)?[A-Z0-9_]*(HOST|HOSTNAME|DOMAIN|ORIGIN)\s*=\s*["']?([^"'\s#]+)/i.exec(r);i&&ge.test(i[2])&&o.push(i[2])}if(/^(docker-)?compose/.test(a)){for(let i of t.matchAll(/VIRTUAL_HOST\s*[=:]\s*["']?([a-z0-9.-]+\.[a-z]{2,})/gi))o.push(i[1]);for(let i of t.matchAll(/Host\(\s*[`"']([^`"']+)[`"']/g))o.push(i[1])}if(/^next\.config/.test(a)){for(let i of t.matchAll(/hostname\s*:\s*["'`]([^"'`]+)["'`]/g))o.push(i[1]);for(let i of t.matchAll(/domains\s*:\s*\[([^\]]*)\]/g))for(let s of i[1].matchAll(/["'`]([^"'`]+)["'`]/g))o.push(s[1])}if(a==="vercel.json")for(let i of t.matchAll(/"alias"\s*:\s*\[?\s*"([^"]+)"/g))o.push(i[1]);if(a==="netlify.toml")for(let i of t.matchAll(/^\s*(?:url|domain|alias)\s*=\s*["']([^"']+)["']/gi))o.push(i[1]);if(a==="fly.toml")for(let i of t.matchAll(/^\s*(?:hostname|domain)\s*=\s*["']([^"']+)["']/gi))o.push(i[1]);return o}function fe(e){let t=new Set,o=[];for(let a of[...e].sort((r,i)=>N(r.path).localeCompare(N(i.path)))){if(!he(a.path))continue;let r=Y(a.path)==="package.json",i=a.text.split(/\r?\n/);for(let s=0;s<i.length;s++)if(!(r&&!/^\s*"homepage"\s*:/.test(i[s])))for(let d of We(a.path,i[s])){let c=d.toLowerCase().replace(/\.$/,"");!J(c)||t.has(c)||(t.add(c),o.push({host:c,file:N(a.path),line:s+1}))}}return o}var Ge=864e5,ye=(e,t)=>Math.floor((e.getTime()-t.getTime())/Ge);async function X(e,t,o=M){let a=[];for(let r of e.slice(0,o))a.push(await t(r));return{results:a,skipped:e.slice(o)}}function be(e,t={}){let o=t.connect??(i=>Le.connect(i)),a=t.now??(()=>new Date),r=t.timeoutMs??me;return new Promise(i=>{let s=!1,d,c=l=>{if(!s){s=!0,clearTimeout(g);try{d?.destroy()}catch{}i(l)}},g=setTimeout(()=>c({host:e,error:`timed out after ${r} ms`}),r);try{d=o({host:e,port:443,servername:e,rejectUnauthorized:!1})}catch(l){return c({host:e,error:l.message})}d.on("error",l=>c({host:e,error:l.message})),d.on("timeout",()=>c({host:e,error:"timed out"})),d.on("close",()=>c({host:e,error:"connection closed before the handshake finished"})),d.on("secureConnect",()=>{let l=d.getPeerCertificate(),h=l?.valid_to?new Date(l.valid_to):null;if(!h||Number.isNaN(h.getTime()))return c({host:e,error:"no readable certificate expiry"});c({host:e,expiresOn:h.toISOString().slice(0,10),daysLeft:ye(h,a()),issuer:l.issuer?.O??l.issuer?.CN??"unknown"})})})}var Ze=new Set(["co.uk","org.uk","me.uk","ltd.uk","plc.uk","ac.uk","gov.uk","com.au","net.au","org.au","edu.au","gov.au","id.au","co.in","net.in","org.in","firm.in","gen.in","ind.in","ac.in","gov.in","res.in","co.nz","co.za","co.jp","ne.jp","or.jp","com.br","com.mx","com.cn","com.sg","com.hk","co.kr","co.id","com.tr","com.ar"]);function F(e){let t=e.toLowerCase().replace(/\.$/,"").split(".");return t.length<=2?t.join("."):Ze.has(t.slice(-2).join("."))?t.slice(-3).join("."):t.slice(-2).join(".")}var q="this registry publishes no RDAP data",Ve=e=>`ouchbill/${e&&/^[0-9A-Za-z.+-]{1,40}$/.test(e)?e:"dev"} (+https://github.com)`;function Ye(e,t,o){let a=t,r=a?.events?.find(g=>g.eventAction==="expiration"),i=r?.eventDate?new Date(r.eventDate):null;if(!i||Number.isNaN(i.getTime()))return{domain:e,error:"registry reply has no expiration date"};let s,c=a?.entities?.find(g=>g.roles?.includes("registrar"))?.vcardArray?.[1]??[];for(let g of c)Array.isArray(g)&&g[0]==="fn"&&typeof g[3]=="string"&&(s=g[3]);return{domain:e,expiresOn:i.toISOString().slice(0,10),daysLeft:ye(i,o),...s?{registrar:s}:{}}}async function ke(e,t={}){let o=F(e),a=t.fetch??globalThis.fetch,r=t.now??(()=>new Date),i=t.timeoutMs??me,s=new AbortController,d=setTimeout(()=>s.abort(),i);try{let c=await a(`https://rdap.org/domain/${encodeURIComponent(o)}`,{redirect:"follow",headers:{accept:"application/rdap+json","user-agent":Ve(t.version)},signal:s.signal});if(!c.ok){if(c.status===404){let g=null;try{g=await c.json()}catch{g=null}let l=g?.title;if(typeof l=="string"&&/no rdap service/i.test(l))return{domain:o,error:q}}return{domain:o,error:`RDAP answered HTTP ${c.status}`}}return Ye(o,await c.json(),r())}catch(c){return{domain:o,error:s.signal.aborted?`timed out after ${i} ms`:c.message}}finally{clearTimeout(d)}}import{createPublicKey as gt,verify as mt}from"node:crypto";import{mkdir as ht,readFile as ft,rename as yt,writeFile as bt}from"node:fs/promises";import Te from"node:path";var S="2026-12-06",U={anthropic:"https://platform.claude.com/docs/en/about-claude/model-deprecations",openai:"https://developers.openai.com/api/docs/deprecations",google:"https://aistudio.google.com/docs/deprecations"},_=(e,t,o,a,r)=>({vendor:"anthropic",ids:e,date:t,replacement:o,announced:a,...r?{related:r}:{}}),v=(e,t,o,a,r)=>({vendor:"google",ids:e,date:t,replacement:o,announced:a,...r?{routesTo:r}:{}}),f=(e,t,o,a,r)=>({vendor:"openai",ids:e,date:t,replacement:o,announced:a,...r?{related:r}:{}}),Q=[_(["claude-sonnet-4-5-20250929","claude-sonnet-4-5"],"2026-11-30","claude-sonnet-5-5","2026-09-30"),_(["claude-opus-4-5-20251101","claude-opus-4-5"],"2027-01-22","claude-opus-5-5","2026-11-23"),_(["claude-opus-4-1-20250805"],"2026-08-05","claude-opus-4-8","2026-06-05"),_(["claude-sonnet-4-20250514","claude-opus-4-20250514"],"2026-06-15","claude-sonnet-5-5 / claude-opus-4-8","2026-04-14"),_(["claude-3-haiku-20240307"],"2026-04-20","claude-haiku-4-5-20251001","2026-02-19"),_(["claude-3-5-haiku-20241022","claude-3-7-sonnet-20250219"],"2026-02-19","claude-haiku-4-5-20251001 / claude-sonnet-5-5","2025-10-28"),f(["gpt-image-1-mini","gpt-image-1.5","gpt-image-1.5-2025-12-16","chatgpt-image-latest"],"2026-12-01","gpt-image-2.6-sunburst or gpt-image-2.6-flare","2026-06-02"),f(["gpt-5","gpt-5-2025-08-07"],"2026-12-11","gpt-6.2-sol","2026-06-11"),f(["gpt-5-mini","gpt-5-mini-2025-08-07"],"2026-12-11","gpt-6.1-terra","2026-06-11"),f(["gpt-5-nano","gpt-5-nano-2025-08-07"],"2026-12-11","gpt-6-luna","2026-06-11"),f(["gpt-5-pro","gpt-5-pro-2025-10-06"],"2026-12-11","gpt-6.2-sol (reasoning.mode: pro, Responses API)","2026-06-11"),f(["o3","o3-2025-04-16"],"2026-12-11","gpt-6.2-sol","2026-06-11"),f(["o3-pro","o3-pro-2025-06-10"],"2026-12-11","gpt-6.2-sol (reasoning.mode: pro, Responses API)","2026-06-11"),f(["tts-1","tts-1-hd","gpt-4o-mini-tts","gpt-4o-mini-tts-2025-03-20","gpt-4o-mini-tts-2025-12-15"],"2027-01-06","gpt-realtime-2.1-mini","2026-10-01"),f(["gpt-4o-2024-08-06","gpt-4o-2024-11-20"],"2027-01-14","gpt-6-luna","2026-10-14",["gpt-4o"]),f(["gpt-4o-mini-2024-07-18"],"2027-01-14","gpt-6-luna","2026-10-14",["gpt-4o-mini"]),f(["gpt-4.1-2025-04-14"],"2027-01-14","gpt-6-luna","2026-10-14",["gpt-4.1"]),f(["gpt-4.1-mini-2025-04-14"],"2027-01-14","gpt-6-luna","2026-10-14",["gpt-4.1-mini"]),f(["gpt-realtime","gpt-realtime-2025-08-28","gpt-4o-realtime","gpt-realtime-mini","gpt-realtime-mini-2025-12-15","gpt-4o-mini-realtime"],"2027-01-20","gpt-realtime-2.1 / gpt-realtime-2.1-mini","2026-07-20"),f(["gpt-audio","gpt-audio-2025-08-28","gpt-4o-audio","gpt-audio-mini","gpt-audio-mini-2025-12-15","gpt-4o-mini-audio"],"2027-01-20","gpt-audio-1.5","2026-07-20"),f(["gpt-4o-mini-transcribe-2025-03-20"],"2027-01-20","gpt-4o-mini-transcribe-2025-12-15","2026-07-20"),f(["gpt-5.5-cyber-preview"],"2027-02-01","the most capable cyber model available to you","2026-11-05"),f(["gpt-image-2","gpt-image-2-2026-04-21"],"2027-02-10","gpt-image-2.6-sunburst or gpt-image-2.6-flare","2026-11-10"),f(["whisper-1","gpt-4o-transcribe","gpt-4o-mini-transcribe","gpt-4o-mini-transcribe-2025-12-15","gpt-4o-transcribe-diarize"],"2027-02-26","gpt-live-transcribe or gpt-transcribe","2026-08-26"),f(["gpt-5.3-codex"],"2027-04-01","gpt-6.2-sol","2026-10-01"),f(["gpt-5.4-nano","gpt-5.4-nano-2026-03-17"],"2027-04-01","gpt-6-luna","2026-10-01"),f(["gpt-5.1","gpt-5.1-2025-11-13"],"2027-04-01","gpt-6.2-sol","2026-10-01"),f(["gpt-realtime-2"],"2027-06-01","gpt-realtime-2.1","2026-12-01"),f(["gpt-live-1"],"2027-06-01","gpt-live-1.1","2026-12-01"),v(["gemini-2.5-pro"],"2026-12-01","gemini-3.8-flash","2026-11-23","gemini-3.8-flash"),v(["gemini-2.5-flash"],"2026-12-01","gemini-3.5-flash-lite","2026-11-23","gemini-3.5-flash-lite"),v(["gemini-omni-1.1-flash"],"2026-12-03","gemini-omni-1.2-flash","2026-11-23","gemini-omni-1.2-flash"),v(["gemini-4-argon"],"2026-12-15","gemini-4-carbon (or gemini-4-neon for faster responses)","2026-12-06","gemini-4-carbon"),v(["gemini-embedding-2-preview"],"2026-11-06","gemini-embedding-2","2026-11-06","gemini-embedding-2"),v(["gemini-3.1-flash-tts-preview","gemini-2.5-flash-preview-tts","gemini-2.5-pro-preview-tts"],"2026-12-18","gemini-3.8-flash-tts or gemini-3.8-flash-lite-tts","2026-11-23"),v(["gemini-2.5-flash-image"],"2027-03-15","gemini-3.1-flash-lite-image","2026-11-23"),v(["gemini-2.5-flash-native-audio-preview-12-2025"],"2027-03-31","gemini-4-live","2026-11-23"),v(["gemini-3.1-flash-lite"],"2027-05-07","gemini-3.5-flash-lite","2026-11-23"),v(["gemini-embedding-001"],"2028-05-14","gemini-embedding-2","2026-11-26")];function Je(e){let t=null;return o=>{if(!t){t=[0];for(let i=e.indexOf(`
3
3
  `);i!==-1;i=e.indexOf(`
4
- `,i+1))t.push(i+1)}let a=0,r=t.length-1;for(;a<r;){let i=a+r+1>>1;t[i]<=o?a=i:r=i-1}return{line:a+1,column:o-t[a]+1}}}var He=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),qe=/(?:^|[^A-Za-z0-9._-])(?:[a-z]{2,7}\.)?anthropic\.$/;function V(e){let t=e.flatMap(r=>[...r.ids.map(i=>({id:i,match:"exact",r})),...(r.related??[]).map(i=>({id:i,match:"related",r}))]).filter(r=>r.id.length>0).sort((r,i)=>i.id.length-r.id.length);if(!t.length)return()=>[];let o=new Map(t.map(r=>[r.id,r])),a=new RegExp(`(?<=^|[^A-Za-z0-9._-]|anthropic\\.)(${t.map(r=>He(r.id)).join("|")})(?=$|[^A-Za-z0-9_.-]|\\.(?![0-9])|(-v\\d+(?::\\d+)?)(?![A-Za-z0-9_.:-]))`,"g");return r=>{let i=[],s=Me(r);for(let g of r.matchAll(a)){let p=g[1],m=o.get(p),l=g.index??0,f=r[l-1]==="."&&qe.test(r.slice(Math.max(0,l-20),l));if(r[l-1]==="."&&!f)continue;let _=f||g[2]!==void 0;if(!(_&&m.r.vendor!=="anthropic")){if(p==="o3"||p==="o3-pro"){let q=r[l-1],ae=r[l+p.length];if(!(q&&ae&&/["'`]/.test(q)&&q===ae))continue}i.push({id:p,match:m.match,retirement:m.r,...s(l),..._?{platform:"bedrock"}:{}})}}return i}}var Fe=V(G);var b="2026-11-23",Z="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html",ge="https://docs.aws.amazon.com/lambda/latest/dg/runtime-support-policy.html",Y="https://github.blog/changelog/2026-09-23-node-20-is-no-longer-available-in-github-actions",I="https://github.blog/changelog/2026-10-01-github-actions-macos-14-runner-image-retirement",J="https://vercel.com/changelog/node-js-20-is-being-deprecated",We={nodejs:{name:"Node.js",kind:"runtime",by:"major",replacement:"Node.js 24",source:"https://endoflife.date/nodejs"},python:{name:"Python",kind:"runtime",by:"minor",replacement:"Python 3.14",source:"https://endoflife.date/python"},ruby:{name:"Ruby",kind:"runtime",by:"minor",replacement:"Ruby 4.0",source:"https://endoflife.date/ruby"},php:{name:"PHP",kind:"runtime",by:"minor",replacement:"PHP 8.5",source:"https://endoflife.date/php"},go:{name:"Go",kind:"runtime",by:"minor",replacement:"Go 1.26",source:"https://endoflife.date/go"},postgresql:{name:"PostgreSQL",kind:"database",by:"major",replacement:"PostgreSQL 18",source:"https://endoflife.date/postgresql"},mysql:{name:"MySQL",kind:"database",by:"minor",replacement:"MySQL 9.7",source:"https://endoflife.date/mysql"},redis:{name:"Redis",kind:"database",by:"minor",replacement:"Redis 8.2",source:"https://endoflife.date/redis"},mongodb:{name:"MongoDB",kind:"database",by:"minor",replacement:"MongoDB 8.0",source:"https://endoflife.date/mongodb"},nextjs:{name:"Next.js",kind:"framework",by:"major",replacement:"Next.js 16",source:"https://endoflife.date/nextjs"},angular:{name:"Angular",kind:"framework",by:"major",replacement:"Angular 21",source:"https://endoflife.date/angular"},django:{name:"Django",kind:"framework",by:"minor",replacement:"Django 5.2",source:"https://endoflife.date/django"},rails:{name:"Rails",kind:"framework",by:"minor",replacement:"Rails 8.1",source:"https://endoflife.date/rails"},laravel:{name:"Laravel",kind:"framework",by:"major",replacement:"Laravel 13",source:"https://endoflife.date/laravel"},"spring-boot":{name:"Spring Boot",kind:"framework",by:"minor",replacement:"Spring Boot 4.2",source:"https://endoflife.date/spring-boot"},"aws-lambda":{name:"AWS Lambda runtime",kind:"serverless",by:"id",replacement:"a supported Lambda runtime (nodejs24.x, python3.14, ruby3.4 or java25), see the AWS page",source:Z},dotnet:{name:".NET",kind:"runtime",by:"id",replacement:".NET 10 (LTS)",source:"https://endoflife.date/dotnet"},"eclipse-temurin":{name:"Eclipse Temurin (Java)",kind:"runtime",by:"major",replacement:"Eclipse Temurin 25 (LTS)",source:"https://endoflife.date/eclipse-temurin"},"gha-runner":{name:"GitHub-hosted runner",kind:"action",by:"id",replacement:"a current runner label (for example macos-15 or macos-26), see the GitHub changelog",source:I},"vercel-node":{name:"Node.js on Vercel",kind:"runtime",by:"id",replacement:"Node.js 24.x (or 26.x)",source:J},"gha-node":{name:"GitHub Action on",kind:"action",by:"id",replacement:"a newer major of the action (one that runs on Node 24)",source:Y}},n=(e,t,o)=>({product:e,cycle:t,date:o,source:We[e].source,checked:b}),u=(e,t,o)=>({product:"aws-lambda",cycle:e,date:t,source:o?ge:Z,checked:b}),$=[n("nodejs","26","2029-04-30"),n("nodejs","25","2026-06-01"),n("nodejs","24","2028-04-30"),n("nodejs","23","2025-06-01"),n("nodejs","22","2027-04-30"),n("nodejs","21","2024-06-01"),n("nodejs","20","2026-04-30"),n("nodejs","19","2023-06-01"),n("nodejs","18","2025-04-30"),n("nodejs","17","2022-06-01"),n("nodejs","16","2023-09-11"),n("nodejs","14","2023-04-30"),n("nodejs","12","2022-04-30"),n("python","3.15","2031-10-31"),n("python","3.14","2030-10-31"),n("python","3.13","2029-10-31"),n("python","3.12","2028-10-31"),n("python","3.11","2027-10-31"),n("python","3.10","2026-10-01"),n("python","3.9","2025-10-31"),n("python","3.8","2024-10-07"),n("python","3.7","2023-06-27"),n("ruby","4.0","2029-03-31"),n("ruby","3.4","2028-03-31"),n("ruby","3.3","2027-03-31"),n("ruby","3.2","2026-03-31"),n("ruby","3.1","2025-03-26"),n("ruby","3.0","2024-04-23"),n("ruby","2.7","2023-03-31"),n("ruby","2.6","2022-03-31"),n("php","8.6","2030-12-31"),n("php","8.5","2029-12-31"),n("php","8.4","2028-12-31"),n("php","8.3","2027-12-31"),n("php","8.2","2026-12-31"),n("php","8.1","2025-12-31"),n("php","8.0","2023-11-26"),n("php","7.4","2022-11-28"),n("go","1.25","2026-08-19"),n("go","1.24","2026-02-10"),n("go","1.23","2025-08-12"),n("go","1.22","2025-02-11"),n("go","1.21","2024-08-13"),n("go","1.20","2024-02-06"),n("go","1.19","2023-09-06"),n("go","1.18","2023-02-01"),n("go","1.17","2022-08-02"),n("go","1.16","2022-03-15"),n("postgresql","19","2031-11-19"),n("postgresql","18","2030-11-14"),n("postgresql","17","2029-11-08"),n("postgresql","16","2028-11-09"),n("postgresql","15","2027-11-11"),n("postgresql","14","2026-11-12"),n("postgresql","13","2025-11-13"),n("postgresql","12","2024-11-21"),n("postgresql","11","2023-11-09"),n("postgresql","10","2022-11-10"),n("mysql","26.7","2026-10-20"),n("mysql","9.7","2034-04-30"),n("mysql","9.6","2026-04-21"),n("mysql","9.5","2026-01-20"),n("mysql","9.4","2025-10-21"),n("mysql","9.3","2025-07-22"),n("mysql","9.2","2025-04-15"),n("mysql","9.1","2025-01-21"),n("mysql","9.0","2024-10-15"),n("mysql","8.4","2032-04-30"),n("mysql","8.3","2024-04-30"),n("mysql","8.2","2024-01-16"),n("mysql","8.1","2023-10-25"),n("mysql","8.0","2026-04-30"),n("mysql","5.7","2023-10-31"),n("redis","8.8","2027-01-29"),n("redis","8.6","2026-11-25"),n("redis","8.4","2026-08-10"),n("redis","8.2","2030-09-01"),n("redis","8.0","2026-12-01"),n("redis","7.4","2029-12-01"),n("redis","7.2","2029-12-01"),n("redis","7.0","2024-07-29"),n("redis","6.2","2027-04-01"),n("redis","6.0","2022-05-31"),n("redis","5.0","2022-04-27"),n("mongodb","9.0","2031-10-31"),n("mongodb","8.3","2029-10-31"),n("mongodb","8.2","2026-07-31"),n("mongodb","8.1","2025-09-30"),n("mongodb","8.0","2029-10-31"),n("mongodb","7.3","2024-10-02"),n("mongodb","7.2","2024-03-27"),n("mongodb","7.1","2024-01-23"),n("mongodb","7.0","2027-08-31"),n("mongodb","6.3","2023-08-31"),n("mongodb","6.2","2023-04-24"),n("mongodb","6.1","2023-02-09"),n("mongodb","6.0","2025-07-31"),n("mongodb","5.3","2022-07-19"),n("mongodb","5.2","2022-03-23"),n("mongodb","5.1","2022-01-19"),n("mongodb","5.0","2024-10-31"),n("mongodb","4.4","2024-02-29"),n("mongodb","4.2","2023-04-30"),n("mongodb","4.0","2022-04-30"),n("nextjs","16","2027-10-22"),n("nextjs","15","2027-01-31"),n("nextjs","14","2025-10-26"),n("nextjs","13","2024-12-21"),n("nextjs","12","2022-11-21"),n("nextjs","11","2022-01-27"),n("angular","22","2028-06-30"),n("angular","21","2027-06-30"),n("angular","20","2026-11-28"),n("angular","19","2026-05-19"),n("angular","18","2025-11-21"),n("angular","17","2025-05-15"),n("angular","16","2024-11-08"),n("angular","15","2024-05-18"),n("angular","14","2023-11-18"),n("angular","13","2023-05-04"),n("angular","12","2022-11-12"),n("angular","11","2022-05-11"),n("django","6.1","2027-12-31"),n("django","6.0","2027-04-30"),n("django","5.2","2028-04-30"),n("django","5.1","2025-12-03"),n("django","5.0","2025-04-02"),n("django","4.2","2026-04-07"),n("django","4.1","2023-12-01"),n("django","4.0","2023-04-01"),n("django","3.2","2024-04-01"),n("django","2.2","2022-04-11"),n("rails","8.1","2027-10-10"),n("rails","8.0","2026-11-07"),n("rails","7.2","2026-08-09"),n("rails","7.1","2025-10-01"),n("rails","7.0","2025-04-01"),n("rails","6.1","2024-10-01"),n("rails","6.0","2023-06-01"),n("rails","5.2","2022-06-01"),n("laravel","13","2028-03-17"),n("laravel","12","2027-02-24"),n("laravel","11","2026-03-12"),n("laravel","10","2025-02-04"),n("laravel","9","2024-02-06"),n("laravel","8","2023-01-24"),n("laravel","6","2022-09-06"),n("spring-boot","4.2","2027-12-31"),n("spring-boot","4.1","2027-07-31"),n("spring-boot","4.0","2026-12-31"),n("spring-boot","3.5","2026-06-30"),n("spring-boot","3.4","2025-12-31"),n("spring-boot","3.3","2025-06-30"),n("spring-boot","3.2","2024-12-31"),n("spring-boot","3.1","2024-06-30"),n("spring-boot","3.0","2023-12-31"),n("spring-boot","2.7","2023-06-30"),n("spring-boot","2.6","2022-11-24"),n("spring-boot","2.5","2022-05-19"),u("nodejs26.x","2029-04-30",!1),u("nodejs24.x","2028-04-30",!1),u("nodejs22.x","2027-05-30",!1),u("nodejs20.x","2026-04-30",!0),u("nodejs18.x","2025-09-01",!0),u("nodejs16.x","2024-06-12",!0),u("nodejs14.x","2023-12-04",!0),u("nodejs12.x","2023-03-31",!0),u("python3.15","2029-06-30",!1),u("python3.14","2029-06-30",!1),u("python3.13","2029-06-30",!1),u("python3.12","2028-10-31",!1),u("python3.11","2027-06-30",!1),u("python3.10","2026-10-31",!0),u("python3.9","2025-12-15",!0),u("python3.8","2024-10-14",!0),u("python3.7","2023-12-04",!0),u("python3.6","2022-07-18",!0),u("ruby4.0","2029-03-31",!1),u("ruby3.4","2028-03-31",!1),u("ruby3.3","2027-03-31",!1),u("ruby3.2","2026-03-31",!0),u("ruby2.7","2023-12-07",!0),u("java25","2029-06-30",!1),u("java21","2029-06-30",!1),u("java17.al2023","2029-06-30",!1),u("java11.al2023","2029-06-30",!1),u("java8.al2023","2029-06-30",!1),u("java17","2027-06-30",!1),u("java11","2027-06-30",!1),u("java8.al2","2027-06-30",!1),u("java8","2024-01-08",!0),u("dotnet10","2028-11-14",!1),u("dotnet8","2026-11-10",!0),u("dotnet6","2024-12-20",!0),u("dotnetcore3.1","2023-04-03",!0),u("provided.al2023","2029-06-30",!1),u("provided.al2","2026-07-31",!0),u("go1.x","2024-01-08",!0),n("dotnet","11","2028-11-14"),n("dotnet","10","2028-11-14"),n("dotnet","9","2026-11-10"),n("dotnet","8","2026-11-10"),n("dotnet","7","2024-05-14"),n("dotnet","6","2024-11-12"),n("dotnet","5","2022-05-10"),n("dotnet","3.1","2022-12-13"),n("eclipse-temurin","27","2027-03-23"),n("eclipse-temurin","26","2026-09-22"),n("eclipse-temurin","25","2031-09-30"),n("eclipse-temurin","24","2025-09-22"),n("eclipse-temurin","23","2025-03-18"),n("eclipse-temurin","22","2024-09-17"),n("eclipse-temurin","21","2029-12-31"),n("eclipse-temurin","20","2023-09-19"),n("eclipse-temurin","19","2023-03-31"),n("eclipse-temurin","18","2022-09-30"),n("eclipse-temurin","17","2027-10-31"),n("eclipse-temurin","11","2027-10-31"),n("eclipse-temurin","8","2030-12-31"),{product:"gha-runner",cycle:"macos-14",date:"2026-11-02",source:I,checked:b,note:"runner image retired"},{product:"gha-runner",cycle:"macos-14-large",date:"2026-11-02",source:I,checked:b,note:"runner image retired"},{product:"gha-runner",cycle:"macos-14-xlarge",date:"2026-11-02",source:I,checked:b,note:"runner image retired"},{product:"vercel-node",cycle:"20",date:"2026-10-01",source:J,checked:b,note:"deprecated for Builds and Functions on Vercel"},{product:"gha-node",cycle:"node12",date:"2022-04-30",source:"https://endoflife.date/nodejs",checked:b,note:"Node.js 12 end of life"},{product:"gha-node",cycle:"node16",date:"2023-09-11",source:"https://endoflife.date/nodejs",checked:b,note:"Node.js 16 end of life"},{product:"gha-node",cycle:"node20",date:"2026-09-23",source:Y,checked:b,note:"removed from GitHub-hosted runners"}];var X=["https://endoflife.date",Z,ge,Y,I,J],Vt=new Map($.map(e=>[`${e.product}|${e.cycle}`,e]));var Q=/[\u0000-\u0008\u000b-\u001f\u007f-\u009f\u00ad\u034f\u061c\u115f\u1160\u17b4\u17b5\u180b-\u180f\u200b-\u200f\u2028-\u202e\u2060-\u206f\u3164\ufe00-\ufe0f\ufeff\uffa0\ufff0-\ufffb]|\udb40[\udc00-\udc7f\udd00-\uddef]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/g;function Ge(e){Q.lastIndex=0;let t=Q.test(e);return Q.lastIndex=0,t}var Ve=/^(ai|assistant|assistants|llm|notice|urgent|important|attention|instruction|instructions|ignore|disregard|forget|bypass)$/,Ze=/^(the|to|you|your|must|now|then|before|after|first|any|all|please|do|not|dont|never|always|and|previous|prior|above|earlier|immediately|run|execute|install|curl|wget|sh|bash|say|tell|reply|respond|follow|obey|instead|only|publish|deploy|push|delete|upload|send|report|mention|commit|merge|approve)$/,Ye=/(ignore|disregard|forget|override|bypass)[^a-z0-9]*(all|any|the|your|previous|prior|above|earlier|system|instructions?|prompts?|rules?)/i;function Je(e){let t=e.replace(/([a-z])([A-Z])/g,"$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean),o=0,a=0;for(let r of t)Ve.test(r)?o++:Ze.test(r)&&a++;return{addressing:o,functional:a}}function ee(e){if(Ye.test(e))return!0;let{addressing:t,functional:o}=Je(e);return t>=1&&t*3+o>=5||o>=6}function z(e,t=200){return typeof e=="string"&&e.length>0&&e.length<=t&&!/[\n\r`<>]/.test(e)&&!Ge(e)&&!ee(e)}var me="https://www.digitalapplied.com/blog/ai-spend-controls-compared-usage-caps-2026",k="2026-11-03",Xe="2026-11-15";function c(e){return{hardCap:"unknown",capSummary:"Not verified yet \u2014 open the billing page and look for a spend limit, usage cap or auto-recharge setting.",...e,linkChecked:!1,factStatus:"unverified",verifiedOn:null,source:null}}var C="Usually prepaid credits; the danger is auto-recharge (auto top-up) quietly refilling the balance.",w="Billed by usage; a loop, a leaked key or a traffic spike can run up charges overnight.",Qe=[{id:"aws",name:"AWS",category:"cloud",billing:"usage",hardCap:"partial",capSummary:"Standard accounts have no hard cap: Budgets update up to 3 times a day and Budget Actions can block new resources. Accounts made with the new sign-up (Paid Plan) can set a project spend limit from $20 that pauses the project.",risk:"Forgotten NAT gateways, idle RDS, runaway Lambda, Bedrock on credits that switch to cash. Budgets data is 8\u201312 h behind; anomaly detection can take up to 24 h.",howTo:["Billing \u2192 Budgets \u2192 create a monthly cost budget with alerts at 50%, 80% and 100%.","Add a Budget Action that applies a deny policy at 100% (stops new resources, not running ones).","Turn on Cost Anomaly Detection (it covers Bedrock third-party models, not other Marketplace charges \u2014 use a budget filtered by billing entity for those).","New-experience accounts: AWS Settings \u2192 Billing \u2192 Cost by project \u2192 Set limit. A paused project left 90 days is deleted, so act on the alert."],capUrl:"https://console.aws.amazon.com/billing/home#/budgets",linkChecked:!0,factStatus:"verified",verifiedOn:k,source:"https://docs.aws.amazon.com/accounts/latest/reference/create-spend-limit.html",popular:!0},{id:"gcp",name:"Google Cloud",category:"cloud",billing:"usage",hardCap:"partial",capSummary:"Spend caps can pause one service in one project at 100% of a budget \u2014 so far only Gemini API, Agent Platform (Vertex AI), Cloud Run and Cloud Run functions. Everything else: budgets alert only.",risk:"Public or unrestricted API keys (Maps keys can reach Gemini), auto-scaling Cloud Run, BigQuery scans. Caps use estimated cost, so some overage still gets billed.",howTo:["Billing \u2192 Budgets & alerts \u2192 create a budget for each project.","On the budget, turn on a spend cap for each eligible service you use (Gemini API, Agent Platform, Cloud Run).","APIs & Services \u2192 Credentials \u2192 restrict every API key to specific APIs and referrers."],capUrl:"https://console.cloud.google.com/billing",linkChecked:!0,factStatus:"verified",verifiedOn:k,source:"https://docs.cloud.google.com/billing/docs/how-to/budgets-spend-caps",popular:!0},{id:"azure",name:"Microsoft Azure",category:"cloud",billing:"usage",hardCap:"no",capSummary:"Pay-as-you-go has no spending limit and no custom limit can be set; budgets alert only. Free and credit subscriptions stop at the credit amount.",risk:"Once the free credit limit is removed there is no ceiling; Marketplace services bill outside the limit.",howTo:["Cost Management \u2192 Budgets \u2192 create a monthly budget with alert thresholds.","Attach an action group so alerts reach email, SMS or a webhook."],capUrl:"https://portal.azure.com/",linkChecked:!0,factStatus:"verified",verifiedOn:k,source:"https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/spending-limit",popular:!0},c({id:"oracle",name:"Oracle Cloud",category:"cloud",billing:"usage",risk:w,howTo:["Billing \u2192 Budgets \u2192 create a budget with alert rules."],capUrl:"https://cloud.oracle.com/"}),c({id:"digitalocean",name:"DigitalOcean",category:"cloud",billing:"usage",risk:"Droplets and bandwidth bill by the hour; forgotten resources keep billing.",howTo:["Settings \u2192 Billing \u2192 set a billing alert."],capUrl:"https://cloud.digitalocean.com/account/billing"}),c({id:"hetzner",name:"Hetzner",category:"cloud",billing:"fixed",risk:"Mostly fixed monthly prices; traffic overage and forgotten servers are the usual surprise.",howTo:["Check server and traffic limits in the Cloud Console."],capUrl:"https://console.hetzner.com/"}),c({id:"linode",name:"Akamai (Linode)",category:"cloud",billing:"usage",risk:w,howTo:["Account \u2192 Billing \u2192 review usage and set alerts."],capUrl:"https://cloud.linode.com/account/billing"}),{id:"openai",name:"OpenAI API",category:"ai_api",billing:"usage",hardCap:"yes",capSummary:"Hard monthly spend limits for the organization and each project; over-limit requests get a 429. Alerts alone do not stop traffic, and enforcement is not instant.",risk:"Agent loops, leaked keys, batch jobs. Recorded spend can slightly exceed the limit.",howTo:["Settings \u2192 Organization \u2192 Limits \u2192 set an organization hard limit.","Set a lower hard limit on each project, especially test projects.","Add alert thresholds below the limit so you hear before it stops."],capUrl:"https://platform.openai.com/settings/organization/limits",linkChecked:!0,factStatus:"verified",verifiedOn:k,source:"https://developers.openai.com/api/docs/guides/spend-limits.md",popular:!0},{id:"anthropic",name:"Claude API (Anthropic)",category:"ai_api",billing:"usage",hardCap:"yes",capSummary:"Every tier has a monthly cap ($500 / $1,000 / $200,000) that stops requests until the 1st; you can set your own lower limit, and lower limits per workspace.",risk:"Agent loops and leaked keys; a cap stopping every app on the organization at once. The default workspace cannot have its own limit.",howTo:["Claude Console \u2192 Billing \u2192 Spend limits \u2192 Set limit (below your tier cap).","Move each project out of the default workspace into its own workspace and give it a lower spend limit.","Add email notifications at chosen spend amounts on each workspace."],capUrl:"https://platform.claude.com/settings/billing",linkChecked:!0,factStatus:"verified",verifiedOn:k,source:"https://platform.claude.com/docs/en/api/rate-limits",popular:!0},{id:"gemini",name:"Google Gemini API",category:"ai_api",billing:"usage",hardCap:"yes",capSummary:"Billing-account tier caps ($250 / $2,000 / $20K+) pause every linked project; per-project caps are experimental. Billing data lags about 10 minutes and batch jobs can run past a cap.",risk:"Stolen or public keys \u2014 including old Maps keys that can now call Gemini. $6K in 40 minutes from a key in a Vite bundle.",howTo:["Google AI Studio \u2192 Spend \u2192 set a project spend cap (needs editor, owner or admin).","Restrict API keys to the Gemini API only and rotate any key that has been in client code. The Gemini API now rejects unrestricted standard keys.","Check old Maps and Firebase keys in the same project \u2014 several 2026 bills came from keys created years before Gemini was turned on.","Google Cloud console \u2192 APIs & Services \u2192 Generative Language API \u2192 Quotas: lower requests per minute so a stolen key can\u2019t burn thousands per hour."],capUrl:"https://aistudio.google.com/",linkChecked:!0,factStatus:"verified",verifiedOn:k,source:"https://aistudio.google.com/docs/billing",popular:!0},{id:"bedrock",name:"AWS Bedrock",category:"ai_api",billing:"usage",hardCap:"partial",capSummary:"No Bedrock-specific cap; covered by AWS Budgets and Cost Anomaly Detection (which does include third-party Bedrock models). New-experience spend limits can pause top cost drivers, Bedrock included.",risk:"Testing large models on credits; when credits run out billing switches to cash with no notice ($30\u201338K case, May 2026).",howTo:["Create an AWS budget filtered to Bedrock (and to the AWS Marketplace billing entity for third-party models).","Turn on Cost Anomaly Detection \u2014 expect up to 24 h before it fires.","Watch Bedrock invocation metrics in CloudWatch for faster warning."],capUrl:"https://console.aws.amazon.com/billing/home#/budgets",linkChecked:!0,factStatus:"verified",verifiedOn:k,source:"https://docs.aws.amazon.com/cost-management/latest/userguide/manage-ad.html",popular:!0},c({id:"azure-openai",name:"Azure OpenAI",category:"ai_api",billing:"usage",hardCap:"no",capSummary:"Covered by Azure budgets, which alert only (Azure has no hard cap).",risk:w,howTo:["Create an Azure budget scoped to the resource group of your OpenAI resource."],capUrl:"https://portal.azure.com/"}),{id:"vertex",name:"Vertex AI (Agent Platform)",category:"ai_api",billing:"usage",hardCap:"yes",capSummary:"Eligible for Google Cloud spend caps: new usage in the project pauses at 100% of the budget. In-flight requests and fixed commitments still bill.",risk:w,howTo:["Billing \u2192 Budgets & alerts \u2192 create a project budget and turn on its spend cap for Agent Platform."],capUrl:"https://console.cloud.google.com/billing",linkChecked:!0,factStatus:"verified",verifiedOn:k,source:"https://docs.cloud.google.com/billing/docs/how-to/budgets-spend-caps"},{id:"openrouter",name:"OpenRouter",category:"ai_api",billing:"prepaid",hardCap:"yes",capSummary:"Hard limits on the account balance and per API key; small balances refuse requests once in-flight spend fills the budget.",risk:C,howTo:["Keys \u2192 set a credit limit on every key.","Credits \u2192 turn off auto top-up or set a low ceiling."],capUrl:"https://openrouter.ai/settings/keys",linkChecked:!1,factStatus:"third_party",verifiedOn:k,source:me,popular:!0},c({id:"xai",name:"xAI Grok API",category:"ai_api",billing:"prepaid",risk:C,howTo:["Billing \u2192 check auto-recharge and any spending limit."],capUrl:"https://console.x.ai/",popular:!0}),c({id:"mistral",name:"Mistral AI",category:"ai_api",billing:"usage",risk:w,howTo:["Billing \u2192 look for usage limits or alerts."],capUrl:"https://console.mistral.ai/"}),c({id:"deepseek",name:"DeepSeek API",category:"ai_api",billing:"prepaid",risk:C,howTo:["Top up only what you need; check for auto top-up."],capUrl:"https://platform.deepseek.com/",popular:!0}),c({id:"groq",name:"Groq",category:"ai_api",billing:"usage",risk:w,howTo:["Settings \u2192 Billing \u2192 set a spend limit if offered."],capUrl:"https://console.groq.com/settings/billing"}),c({id:"together",name:"Together AI",category:"ai_api",billing:"usage",risk:w,howTo:["Billing \u2192 check credits, auto-recharge and limits."],capUrl:"https://api.together.ai/"}),c({id:"fireworks",name:"Fireworks AI",category:"ai_api",billing:"usage",risk:w,howTo:["Billing \u2192 check spend limits and alerts."],capUrl:"https://fireworks.ai/"}),c({id:"perplexity",name:"Perplexity API",category:"ai_api",billing:"prepaid",risk:C,howTo:["API settings \u2192 check auto top-up."],capUrl:"https://www.perplexity.ai/settings/api"}),c({id:"cohere",name:"Cohere",category:"ai_api",billing:"usage",risk:w,howTo:["Dashboard \u2192 Billing \u2192 check limits."],capUrl:"https://dashboard.cohere.com/"}),c({id:"replicate",name:"Replicate",category:"ai_api",billing:"usage",risk:"Per-second GPU billing; a long-running or looping prediction keeps charging.",howTo:["Account \u2192 Billing \u2192 look for a spend limit."],capUrl:"https://replicate.com/account/billing"}),c({id:"huggingface",name:"Hugging Face",category:"ai_api",billing:"usage",risk:"Inference endpoints bill while running, even with no traffic.",howTo:["Settings \u2192 Billing \u2192 review endpoints and set limits."],capUrl:"https://huggingface.co/settings/billing"}),{id:"cursor",name:"Cursor",category:"ai_coding",billing:"subscription_overage",hardCap:"yes",capSummary:"Spend limit on on-demand usage \u2014 but enforcement is not instant, so usage can run past it; raising the limit in the same cycle can bill that overage. Per-member limits only on Enterprise.",risk:"An agent stuck in a loop during a meeting: a team reported about $1,400 in one hour with only a high monthly limit set.",howTo:["Dashboard \u2192 Settings \u2192 set an on-demand spend limit (or turn on-demand off).","Set it below what you can afford \u2014 enforcement lags.","Don\u2019t raise the limit right after hitting it in the same cycle unless you accept the overage being billed."],capUrl:"https://cursor.com/dashboard",linkChecked:!1,factStatus:"verified",verifiedOn:k,source:"https://cursor.com/help/account-and-billing/spend-limits",popular:!0},{id:"copilot",name:"GitHub Copilot",category:"ai_coding",billing:"seat_usage",hardCap:"yes",capSummary:"Budgets can hard-stop metered AI credits (down to per user); seat-licence budgets only warn.",risk:"Premium requests and metered credits beyond the plan allowance.",howTo:["Settings \u2192 Billing and licensing \u2192 Budgets \u2192 create a budget for Copilot premium requests with 'stop usage' on."],capUrl:"https://github.com/settings/billing",linkChecked:!1,factStatus:"third_party",verifiedOn:k,source:me,popular:!0},{id:"claude-code",name:"Claude Code",category:"ai_coding",billing:"subscription_overage",hardCap:"partial",capSummary:"On a Pro/Max/Ultra plan, usage windows are the ceiling and usage credits can have a monthly spend limit. But an ANTHROPIC_API_KEY in your shell outranks your plan: once approved (always, with -p) every request bills the API.",risk:"A forgotten ANTHROPIC_API_KEY in .zshrc or .bashrc quietly moves agent sessions from your plan to pay-per-token.",howTo:["Run /status in Claude Code \u2014 it shows which credential is in use.","If you meant to use your plan: unset ANTHROPIC_API_KEY and remove it from your shell profile.","If you use an API key on purpose: give Claude Code its own Console workspace with a low spend limit.","Using usage credits on a plan? Set a monthly spend limit in Settings \u2192 Usage."],capUrl:"https://claude.ai/settings/usage",linkChecked:!1,factStatus:"verified",verifiedOn:k,source:"https://code.claude.com/docs/en/authentication",popular:!0},c({id:"codex",name:"OpenAI Codex",category:"ai_coding",billing:"subscription_overage",capSummary:"Not verified yet \u2014 on a ChatGPT plan usage is bounded by plan limits; on an API key, OpenAI project hard limits apply.",risk:"Codex on an API key bills per token; a long autonomous task can burn far more than expected.",howTo:["Run Codex on its own OpenAI project with a low hard limit."],capUrl:"https://platform.openai.com/settings/organization/limits",popular:!0}),c({id:"windsurf",name:"Devin Desktop (was Windsurf)",category:"ai_coding",billing:"subscription_overage",risk:"Add-on credits beyond the plan allowance.",howTo:["Account \u2192 usage \u2192 check add-on credit settings."],capUrl:"https://devin.ai/"}),c({id:"replit",name:"Replit",category:"ai_coding",billing:"subscription_overage",risk:"Agent usage and deployments billed by usage beyond plan credits.",howTo:["Account \u2192 Usage \u2192 set usage alerts or limits."],capUrl:"https://replit.com/",popular:!0}),c({id:"lovable",name:"Lovable",category:"ai_coding",billing:"subscription_overage",risk:"Credit top-ups and plan overages.",howTo:["Settings \u2192 Plans & credits \u2192 check auto top-up."],capUrl:"https://lovable.dev/"}),c({id:"bolt",name:"Bolt.new",category:"ai_coding",billing:"subscription_overage",risk:"Token reloads beyond the plan.",howTo:["Settings \u2192 Subscription \u2192 check token reloads."],capUrl:"https://bolt.new/"}),c({id:"v0",name:"v0 by Vercel",category:"ai_coding",billing:"subscription_overage",risk:"Credit usage beyond the plan.",howTo:["Settings \u2192 Billing \u2192 check additional credit settings."],capUrl:"https://v0.app/"}),{id:"vercel",name:"Vercel",category:"hosting",billing:"subscription_overage",hardCap:"yes",capSummary:"Spend Management (Pro) can pause every project's production deployment when your amount is reached \u2014 only if Pause Production Deployments is on. Checked every few minutes; AI Gateway, v0 and storage keep billing.",risk:"Bot traffic on uncached routes, serverless execution and bandwidth spikes.",howTo:["Team Settings \u2192 Billing \u2192 Spend Management \u2192 set an amount.","Confirm 'Pause production deployment' is on, and add a webhook for alerts.","Know how to resume: each project is resumed by hand (dashboard or API); raising the amount does not unpause them."],capUrl:"https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fsettings%2Fbilling",linkChecked:!0,factStatus:"verified",verifiedOn:k,source:"https://vercel.com/docs/spend-management",popular:!0},c({id:"netlify",name:"Netlify",category:"hosting",billing:"subscription_overage",risk:"Bandwidth and function usage beyond plan credits.",howTo:["Team settings \u2192 Billing \u2192 check usage limits and auto-upgrade."],capUrl:"https://app.netlify.com/",popular:!0}),c({id:"cloudflare",name:"Cloudflare",category:"hosting",billing:"usage",risk:"Workers requests, Durable Objects wall time, R2 operations; a feedback loop can multiply requests.",howTo:["Billing \u2192 set usage notifications for Workers and R2."],capUrl:"https://dash.cloudflare.com/",popular:!0}),c({id:"supabase",name:"Supabase",category:"hosting",billing:"subscription_overage",risk:"Compute add-ons, egress and storage beyond plan quotas when the spend cap is off.",howTo:["Organization \u2192 Billing \u2192 check the Spend Cap toggle."],capUrl:"https://supabase.com/dashboard",popular:!0}),c({id:"firebase",name:"Firebase",category:"hosting",billing:"usage",risk:"Blaze plan reads/writes and functions; recursive function triggers are a classic runaway.",howTo:["Uses Google Cloud billing: create a budget for the Firebase project.","Restrict API keys and set App Check."],capUrl:"https://console.firebase.google.com/",popular:!0}),c({id:"render",name:"Render",category:"hosting",billing:"usage",risk:w,howTo:["Workspace \u2192 Billing \u2192 check spend limits and autoscaling caps."],capUrl:"https://dashboard.render.com/"}),c({id:"railway",name:"Railway",category:"hosting",billing:"usage",risk:w,howTo:["Workspace \u2192 Usage \u2192 set a usage limit."],capUrl:"https://railway.com/",popular:!0}),c({id:"fly",name:"Fly.io",category:"hosting",billing:"usage",risk:"Machines left running and bandwidth.",howTo:["Organization \u2192 Billing \u2192 review usage."],capUrl:"https://fly.io/dashboard"}),c({id:"neon",name:"Neon",category:"hosting",billing:"usage",risk:"Compute hours when autosuspend is off.",howTo:["Project settings \u2192 check autosuspend and compute limits."],capUrl:"https://console.neon.tech/"}),c({id:"mongodb",name:"MongoDB Atlas",category:"hosting",billing:"usage",risk:"Auto-scaling clusters and data transfer.",howTo:["Billing \u2192 set billing alerts; cap cluster auto-scaling tier."],capUrl:"https://cloud.mongodb.com/"}),c({id:"upstash",name:"Upstash",category:"hosting",billing:"usage",risk:"Pay-as-you-go commands with no ceiling unless a budget is set.",howTo:["Database \u2192 Usage \u2192 set a monthly budget."],capUrl:"https://console.upstash.com/"}),c({id:"pinecone",name:"Pinecone",category:"hosting",billing:"usage",risk:"Read/write units and storage on serverless indexes.",howTo:["Settings \u2192 Usage \u2192 check limits."],capUrl:"https://app.pinecone.io/"}),c({id:"elevenlabs",name:"ElevenLabs",category:"voice_media",billing:"subscription_overage",risk:"Usage-based billing beyond plan characters when enabled.",howTo:["Subscription \u2192 check usage-based billing and set a limit."],capUrl:"https://elevenlabs.io/app/subscription",popular:!0}),c({id:"twilio",name:"Twilio",category:"voice_media",billing:"prepaid",risk:"Auto-recharge plus SMS pumping fraud or a calling loop.",howTo:["Billing \u2192 check auto-recharge.","Usage \u2192 Triggers \u2192 create usage triggers."],capUrl:"https://console.twilio.com/",popular:!0}),c({id:"deepgram",name:"Deepgram",category:"voice_media",billing:"usage",risk:w,howTo:["Billing \u2192 check usage limits."],capUrl:"https://console.deepgram.com/"}),c({id:"assemblyai",name:"AssemblyAI",category:"voice_media",billing:"usage",risk:w,howTo:["Billing \u2192 check auto-recharge."],capUrl:"https://www.assemblyai.com/dashboard"}),c({id:"sarvam",name:"Sarvam AI",category:"voice_media",billing:"prepaid",risk:C,howTo:["Dashboard \u2192 Billing \u2192 check credits."],capUrl:"https://dashboard.sarvam.ai/"}),c({id:"vapi",name:"Vapi",category:"voice_media",billing:"prepaid",risk:"Per-minute voice agent calls stacked with model and telephony costs.",howTo:["Billing \u2192 check auto-reload and limits."],capUrl:"https://dashboard.vapi.ai/"}),c({id:"retell",name:"Retell AI",category:"voice_media",billing:"usage",risk:"Per-minute call costs; a dialing loop multiplies them.",howTo:["Billing \u2192 check limits."],capUrl:"https://www.retellai.com/"}),c({id:"livekit",name:"LiveKit Cloud",category:"voice_media",billing:"usage",risk:"Connection minutes and agent sessions beyond the plan.",howTo:["Project \u2192 Billing \u2192 check usage limits."],capUrl:"https://cloud.livekit.io/"}),c({id:"fal",name:"fal.ai",category:"voice_media",billing:"prepaid",risk:C,howTo:["Billing \u2192 check auto top-up."],capUrl:"https://fal.ai/dashboard"}),c({id:"runway",name:"Runway",category:"voice_media",billing:"subscription_overage",risk:"Credit purchases for video generation.",howTo:["Settings \u2192 Plans \u2192 check credit top-ups."],capUrl:"https://app.runwayml.com/"}),c({id:"runpod",name:"RunPod",category:"gpu",billing:"prepaid",risk:"Pods left running; auto-pay refilling credits.",howTo:["Billing \u2192 check auto-pay; stop idle pods."],capUrl:"https://www.runpod.io/console/user/billing",popular:!0}),c({id:"modal",name:"Modal",category:"gpu",billing:"usage",risk:"GPU functions scaling out under load.",howTo:["Settings \u2192 Usage \u2192 set a workspace budget."],capUrl:"https://modal.com/settings"}),c({id:"lambda",name:"Lambda Cloud",category:"gpu",billing:"usage",risk:"GPU instances billed by the hour until terminated.",howTo:["Terminate idle instances; check billing alerts."],capUrl:"https://cloud.lambda.ai/"}),c({id:"vast",name:"Vast.ai",category:"gpu",billing:"prepaid",risk:C,howTo:["Billing \u2192 check auto-recharge."],capUrl:"https://cloud.vast.ai/billing/"})];function d(e){return{factStatus:"verified",verifiedOn:Xe,linkChecked:!1,...e}}var he={openai:d({hardCap:"yes",capSummary:"Hard monthly spend limits for the organization and each project; over-limit requests get a 429. Alerts alone do not stop traffic, and enforcement is not instant.",howTo:["Settings \u2192 Organization \u2192 Limits \u2192 set an organization hard limit.","Set a lower hard limit on each project, especially test projects.","Add alert thresholds below the limit so you hear before it stops."],capUrl:"https://platform.openai.com/settings/organization/limits",source:"https://developers.openai.com/api/docs/guides/spend-limits.md",evidence:'"When tracked spend reaches an applicable hard limit, affected API requests return a 429 error"; "Enforcement is not instantaneous, so recorded spend can slightly exceed the configured amount."',linkChecked:!0}),anthropic:d({hardCap:"yes",capSummary:"Every tier has a monthly cap ($500 / $1,000 / $200,000) that pauses requests until the 1st; you can set your own lower limit, and lower limits per workspace (not on the default workspace).",howTo:["Claude Console \u2192 Settings \u2192 Spend limits \u2192 Adjust limit / Set limit (below your tier cap).","Move each project out of the default workspace into its own workspace and give it a lower spend limit.","Add email notifications at chosen spend amounts on each workspace."],capUrl:"https://platform.claude.com/settings/spend-limits",source:"https://platform.claude.com/docs/en/api/rate-limits",evidence:`"Once you reach your tier's spend cap, API usage pauses until 00:00 UTC on the first day of the next month"; "You can't set spend limits on the default workspace."`}),gemini:d({hardCap:"yes",capSummary:"Billing-account tier caps ($250 / $2,000 / $20K+) pause every linked project; per-project caps are experimental. Billing data lags about 10 minutes and batch jobs can run past a cap.",howTo:["Google AI Studio \u2192 Spend \u2192 set a project spend cap (needs editor, owner or admin).","Restrict API keys to the Gemini API only and rotate any key that has been in client code.","Check old Maps and Firebase keys in the same project."],capUrl:"https://aistudio.google.com/",source:"https://aistudio.google.com/docs/billing",evidence:'"Monthly usage caps are enforced for the Gemini API at the billing account level."; "You can set your own project-level spend caps in AI Studio."; "Long-running tasks like batch mode completions and agent sessions may incur overages beyond your project spend cap."',linkChecked:!0}),vertex:d({hardCap:"yes",capSummary:"Eligible for Google Cloud spend caps: new usage in the project pauses at 100% of the budget. In-flight requests and persistent resources still bill.",howTo:["Billing \u2192 Budgets & alerts \u2192 create a project budget and turn on its spend cap for Agent Platform."],capUrl:"https://console.cloud.google.com/billing",source:"https://docs.cloud.google.com/billing/docs/how-to/budgets-spend-caps",evidence:'Spend caps are available for Gemini API, Gemini Enterprise Agent Platform (formerly Vertex AI), Cloud Run and Cloud Run functions; "The spend cap is enforced when your gross, estimated usage costs exceed 100% of your budget amount."',linkChecked:!0}),gcp:d({hardCap:"partial",capSummary:"Spend caps can pause one service in one project at 100% of a budget \u2014 only Gemini API, Agent Platform (Vertex AI), Cloud Run and Cloud Run functions. Everything else: budgets alert only.",howTo:["Billing \u2192 Budgets & alerts \u2192 create a budget for each project.","On the budget, turn on a spend cap for each eligible service you use.","APIs & Services \u2192 Credentials \u2192 restrict every API key to specific APIs and referrers."],capUrl:"https://console.cloud.google.com/billing",source:"https://docs.cloud.google.com/billing/docs/how-to/budgets-spend-caps",evidence:'"The spend cap is enforced when your gross, estimated usage costs exceed 100% of your budget amount." (four services only)',linkChecked:!0}),aws:d({hardCap:"partial",capSummary:"Standard accounts have no hard cap: Budgets update up to 3 times a day and Budget Actions can block new resources. Accounts on the new sign-up (Paid Plan) can set a project spend limit from $20 that pauses the project.",howTo:["Billing \u2192 Budgets \u2192 create a monthly cost budget with alerts at 50%, 80% and 100%.","Add a Budget Action that applies a deny policy at 100% (stops new resources, not running ones).","Turn on Cost Anomaly Detection.","New-experience accounts: AWS Settings \u2192 Billing \u2192 Cost by project \u2192 Set limit. A paused project left 90 days is deleted, so act on the alert."],capUrl:"https://console.aws.amazon.com/billing/home#/budgets",source:"https://docs.aws.amazon.com/accounts/latest/reference/create-spend-limit.html",evidence:'"If your usage in a project reaches its limit, AWS pauses that project which stops its resources"; "If you take no action within 90 days of your project being paused, AWS permanently deletes your project data."',linkChecked:!0}),bedrock:d({hardCap:"partial",capSummary:"No Bedrock-specific cap. Cost Anomaly Detection covers third-party Bedrock models but can take up to 24 hours; AWS Budgets handle other Marketplace charges. New-experience (Paid Plan) project spend limits can pause top cost drivers, Bedrock included, and pause the whole project at the limit.",howTo:["Create an AWS budget filtered to Bedrock (and to the AWS Marketplace billing entity for third-party models).","Turn on Cost Anomaly Detection \u2014 expect up to 24 h before it fires.","New-experience accounts: set a project spend limit and turn on Pause top cost drivers.","Watch Bedrock invocation metrics in CloudWatch for faster warning."],capUrl:"https://console.aws.amazon.com/billing/home#/budgets",source:"https://docs.aws.amazon.com/accounts/latest/reference/create-spend-limit.html",evidence:'"At this time, we select the resources from these five services: EC2, RDS, Lambda, Bedrock, and SageMaker."; Cost Anomaly Detection: "it can take up to 24 hours to detect an anomaly after a usage occurs" and covers "third-party foundation models on Amazon Bedrock".'}),azure:d({hardCap:"no",capSummary:"Pay-as-you-go has no spending limit and no custom limit can be set; budgets alert only. Free and credit subscriptions stop at the credit amount.",howTo:["Cost Management \u2192 Budgets \u2192 create a monthly budget with alert thresholds.","Attach an action group so alerts reach email, SMS or a webhook."],capUrl:"https://portal.azure.com/",source:"https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/tutorial-acm-create-budgets",evidence:`"Notifications are triggered when the budget thresholds are exceeded. Resources aren't affected, and your consumption isn't stopped."`,linkChecked:!0}),"azure-openai":d({hardCap:"no",capSummary:"Covered by Azure budgets, which alert only: Microsoft says resources aren't affected and consumption isn't stopped. Budgets can be scoped to the resource group of your OpenAI resource.",howTo:["Create an Azure budget scoped to the resource group of your OpenAI resource.","Attach an action group so the alert reaches you (and any automation you build)."],capUrl:"https://portal.azure.com/",source:"https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/tutorial-acm-create-budgets",evidence:`"Notifications are triggered when the budget thresholds are exceeded. Resources aren't affected, and your consumption isn't stopped." (Azure OpenAI has no spend-limit page of its own; this is the budgets page it falls under.)`}),openrouter:d({hardCap:"yes",capSummary:"An optional credit limit on each API key blocks requests once spent; org admins can also set guardrail and workspace budgets. An account balance that goes negative makes requests fail.",howTo:["Keys \u2192 set a credit limit on every key.","Check the remaining limit with GET /api/v1/key (limit, limit_reset, limit_remaining).","Keep the account balance low and add credits on demand."],capUrl:"https://openrouter.ai/settings/keys",source:"https://openrouter.ai/docs/api-reference/limits",evidence:'"Per-key credit limits, an optional spending cap configured on an individual API key." (auto top-up is not mentioned on this page)'}),xai:d({hardCap:"yes",capSummary:"Prepaid credits: with the default $0 invoiced billing limit, requests are rejected once credits run out. Auto top-up can have a monthly cap.",howTo:["Billing \u2192 keep the invoiced billing limit at $0 (the default).","If you use auto top-up, set the monthly cap on top-up spending."],capUrl:"https://console.x.ai/",source:"https://docs.x.ai/docs/key-information/billing",evidence:'"Your API requests will be automatically rejected once your prepaid credits are depleted."'}),mistral:d({hardCap:"yes",capSummary:"Organization and workspace monthly spending limits; at the limit API access is suspended until next month or an admin raises it. Workspaces have no cap by default.",howTo:["Admin Panel \u2192 Administration \u2192 Workspaces \u2192 pick a workspace \u2192 Settings \u2192 Monthly spending limit.","Set an organization limit too (a workspace limit cannot exceed it)."],capUrl:"https://console.mistral.ai/",source:"https://docs.mistral.ai/admin/workspaces/usage-limits",evidence:'"API access for that Workspace is suspended until the next month begins or an admin increases the limit."'}),groq:d({hardCap:"yes",capSummary:"Organization-wide monthly spend limit (paid plan, owner only); at the cap every key returns 400 blocked_api_access. Spend tracking lags 10-15 minutes.",howTo:["Settings \u2192 Billing \u2192 Limits \u2192 add a monthly dollar limit.","Expect slight overshoot because of the tracking delay."],capUrl:"https://console.groq.com/settings/billing",source:"https://console.groq.com/docs/spend-limits",evidence:'"API calls from any key in your organization will return a 400 with code `blocked_api_access`."; "There\'s a 10-15 minute delay in spend tracking."'}),together:d({hardCap:"partial",capSummary:"Prepaid only: API access stops when the balance reaches zero, but there are no per-key or per-project caps and auto-recharge keeps buying credits. Budgets are planned, not available.",howTo:["Keep auto-recharge off, or set a low target balance.","A card default enables auto-recharge; an ACH default turns it off."],capUrl:"https://api.together.ai/",source:"https://docs.together.ai/docs/billing-spend-controls",evidence:`"API access stops when your organization's balance reaches zero and resumes after you add credits."; "The cut-off does not guarantee an exact spending cap."; "API keys do not currently support independent spending limits."`}),fireworks:d({hardCap:"yes",capSummary:"Monthly spend limit: at 100% all API requests pause across serverless, deployments and training. Does not apply to Enterprise accounts.",howTo:["firectl quota update monthly-spend-usd --value <AMOUNT>","Raise the limit to resume; adding credits does not change it."],capUrl:"https://fireworks.ai/",source:"https://docs.fireworks.ai/guides/quotas_usage/account-quotas",evidence:'"When usage reaches 100% of the limit, all API requests pause automatically across serverless inference, deployments, and training."; "The suspension behavior described here does not apply to Enterprise accounts."'}),perplexity:d({hardCap:"partial",capSummary:"Prepaid credits: keys are blocked when credits run out, but auto reload is available and no spend-limit setting is documented.",howTo:["Billing \u2192 leave Auto reload off (or set a small threshold)."],capUrl:"https://www.perplexity.ai/settings/api",source:"https://docs.perplexity.ai/docs/getting-started/projects",evidence:'"If you run out of credits, your API keys will be blocked until you add to your credit balance."'}),replicate:d({hardCap:"partial",capSummary:"Prepaid credit: at zero Replicate stops new work and shuts down infrastructure, but a running prediction can overrun and is billed at month end. The monthly spend limit was deprecated.",howTo:["Keep auto reload off or at a low preset.","Cap deployment instances to bound spend."],capUrl:"https://replicate.com/account/billing",source:"https://replicate.com/docs/topics/billing/prepaid-credit",evidence:'"As soon as your balance hits zero, we will prevent any new work from starting"; changelog: "The ability to set a monthly spend limit on your account has been deprecated."'}),huggingface:d({hardCap:"partial",capSummary:"Team and Enterprise organization admins can set a spending limit for Inference Providers; no limit is documented for personal accounts, and the Inference Endpoints pricing page mentions no spend cap.",howTo:["Organization settings \u2192 set a spending limit (Team or Enterprise).","Pause Inference Endpoints you are not using."],capUrl:"https://huggingface.co/settings/billing",source:"https://huggingface.co/docs/inference-providers/pricing",evidence:`"Team & Enterprise organization administrators can also set a spending limit and disable a set of Inference Providers from the organization's settings."`}),cursor:d({hardCap:"yes",capSummary:"Spend limit on on-demand usage: additional usage stops at the limit, but enforcement is not instant; raising the limit in the same cycle can bill the overage on legacy plans.",howTo:["Dashboard \u2192 Settings \u2192 set an on-demand spend limit (or turn on-demand off).","Set it below what you can afford \u2014 enforcement lags.","Don't raise the limit right after hitting it in the same cycle unless you accept the overage being billed."],capUrl:"https://cursor.com/dashboard",source:"https://cursor.com/help/account-and-billing/spend-limits",evidence:'"When a limit is reached, additional usage stops for that user until the limit is increased or the next period starts."; "Enforcement is not instant, so usage can briefly exceed your spend limit."'}),copilot:d({hardCap:"partial",capSummary:"Budgets can stop usage for metered products such as Copilot AI credits; budgets on licence-based Copilot only alert.",howTo:["Settings \u2192 Billing and licensing \u2192 Budgets \u2192 create a budget for Copilot AI credits with 'stop usage when the limit is reached' on."],capUrl:"https://github.com/settings/billing",source:"https://docs.github.com/en/billing/concepts/budgets-and-alerts",evidence:'Budgets on metered products (including Copilot AI credits) can "prevent usage once the budget threshold is reached"; for license-based products a budget "does not prevent usage over the budget amount but does provide alerts."'}),"claude-code":d({hardCap:"partial",verifiedOn:k,capSummary:"On a Pro/Max/Ultra plan, usage windows are the ceiling and usage credits can have a monthly spend limit. But an ANTHROPIC_API_KEY in your shell outranks your plan: once approved (always, with -p) every request bills the API.",howTo:["Run /status in Claude Code \u2014 it shows which credential is in use.","If you meant to use your plan: unset ANTHROPIC_API_KEY and remove it from your shell profile.","If you use an API key on purpose: give Claude Code its own Console workspace with a low spend limit.","Using usage credits on a plan? Set a monthly spend limit in Settings \u2192 Usage."],capUrl:"https://claude.ai/settings/usage",source:"https://code.claude.com/docs/en/authentication",evidence:"Read 2026-11-03, not re-read in this refresh: credential precedence puts ANTHROPIC_API_KEY above the subscription login."}),replit:d({hardCap:"yes",capSummary:"Usage limits cap spend beyond monthly credits; at the limit usage-based services are blocked. A separate service-shutdown limit suspends services.",howTo:["Settings \u2192 Usage \u2192 Manage limits (Account usage).","Organizations: Usage page \u2192 Manage limits (admin or owner)."],capUrl:"https://replit.com/usage",source:"https://docs.replit.com/billing/managing-spend",evidence:'"When you reach your limit, usage-based services are blocked until the next billing cycle or until you increase the limit."'}),vercel:d({hardCap:"yes",capSummary:"Spend Management (Pro) can pause production deployments for the team or one project when the budget is reached, only if Pause production deployments is on. Checked every few minutes; AI Gateway and v0 usage keeps billing and storage charges continue.",howTo:["Team Settings \u2192 Billing \u2192 Spend Management \u2192 Add Budget (Team or Project).","Turn on Pause production deployments and add a webhook for alerts. CLI: vercel billing budgets set --amount 200 --pause","Know how to resume: each project is resumed by hand (dashboard or API); raising the amount does not unpause them."],capUrl:"https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fsettings%2Fbilling",source:"https://vercel.com/docs/spend-management",evidence:'"Setting a budget does not stop usage on its own. To stop incurring costs above the budget amount, turn on Pause production deployments"; "Pausing only affects production deployments. It does not stop AI Gateway API key usage or v0 usage billed to your team."',linkChecked:!0}),netlify:d({hardCap:"partial",capSummary:"Credit-based plans: when monthly credits are used up all web projects are paused (auto recharge is off by default). The FAQ describes no general hard spending limit, only an AI-feature usage limit.",howTo:["Usage & billing \u2192 Configure auto recharge \u2192 Disabled (Team Owner).","Set the AI feature usage limit for the team."],capUrl:"https://app.netlify.com/",source:"https://docs.netlify.com/manage/accounts-and-billing/billing/billing-for-credit-based-plans/billing-faq-for-credit-based-plans/",evidence:'"Once your monthly credit allotment is used up for all web projects on your team, all of your web projects (sites/apps) are paused"; the FAQ answer on a hard spending limit lists workarounds only.'}),cloudflare:d({hardCap:"partial",capSummary:"Spend Management limits block Workers and Durable Objects once the monthly limit is reached; other products are not covered yet. Blocking is not instant and a limit does not guarantee a maximum invoice.",howTo:["Dashboard \u2192 Billing \u2192 Spend Management.","Workers or Durable Objects row \u2192 Edit the spending limit \u2192 Monthly limit (USD) \u2192 Save limit \u2192 confirm it is On.","Add a notification email through the cf CLI; dashboard limits have none by default."],capUrl:"https://dash.cloudflare.com/",source:"https://developers.cloudflare.com/billing/manage/spend-management/",evidence:'"Cloudflare blocks supported operations until the next billing period or until you change the limit."; "A limit does not guarantee a maximum invoice amount."; "Support for more products is coming soon."'}),supabase:d({hardCap:"partial",capSummary:"Spend Cap (Pro plan) stops usage past quota for covered items such as egress, storage and monthly active users; compute, IPv4, custom domain and point-in-time recovery are not covered.",howTo:["Organization \u2192 Billing \u2192 Cost Control \u2192 turn on Spend Cap.","Remember compute add-ons still bill with the cap on."],capUrl:"https://supabase.com/dashboard/org/_/billing",source:"https://supabase.com/docs/guides/platform/cost-control",evidence:"Once a covered usage item exceeds its quota, further use of that item stops until the next billing cycle; not covered: compute, branching compute, read replica compute, custom domain, IPv4, point-in-time recovery."}),firebase:d({hardCap:"partial",capSummary:"Service-level spend caps pause Firebase AI Logic, App Hosting, Cloud Functions and Extensions at 100% of a budget; other services (Firestore, Storage...) have none, and the page says caps are not hard caps.",howTo:["Project \u2192 Settings \u2192 Usage and billing \u2192 Details & settings \u2192 Service-level spend caps \u2192 pick a service \u2192 enter a monthly amount \u2192 Configure.","Set the budget below your real limit; enforcement lags several minutes.","Restrict API keys and set App Check."],capUrl:"https://console.firebase.google.com/",source:"https://firebase.google.com/docs/projects/billing/spend-caps",evidence:'"Cloud Billing pauses that service for the rest of the month."; "Spend caps are not "hard caps"."'}),railway:d({hardCap:"yes",capSummary:"Usage hard limit: when billing-cycle usage hits it, all workloads are taken offline. A separate agent hard limit exists. Reminders at 75/90/100%.",howTo:["Workspace Usage page \u2192 set the hard limit (workspace admin).","CLI: railway usage limit set."],capUrl:"https://railway.com/",source:"https://docs.railway.com/pricing/cost-control",evidence:'"Once your resource usage hits the specified hard limit, all your workloads will be taken offline"'}),runpod:d({hardCap:"partial",capSummary:"Prepaid balance: at $0 all running Pods stop (Pods without a network volume are terminated). Auto-pay can refill it; a default $80/hour spend limit exists but is not user-set.",howTo:["Billing \u2192 keep auto-pay off or set a low reload amount.","Use network volumes so data survives a stop."],capUrl:"https://www.runpod.io/console/user/billing",source:"https://docs.runpod.io/accounts-billing/billing",evidence:'"When your balance reaches $0, Runpod automatically stops all of your running Pods."; "Runpod accounts have a default spend limit of $80 per hour across all resources."'}),digitalocean:d({hardCap:"partial",capSummary:"Spend alerts notify only, except Serverless Inference model access keys (public preview): an alert can pause a key at 100% of its budget. Droplets and other resources have no cap.",howTo:["Billing \u2192 Spend alerts \u2192 create alerts.","For Serverless Inference keys, turn on pause at 100% of the budget."],capUrl:"https://cloud.digitalocean.com/account/billing",source:"https://docs.digitalocean.com/products/billing/",evidence:'"have the alert pause the key when its spend reaches 100% of its budget" (Serverless Inference only, public preview)'}),modal:d({hardCap:"yes",capSummary:"Workspace spend limit: when it is reached Modal stops workloads that would incur out-of-pocket charges; workspace and environment budgets are separate caps on total usage. Only Owners and Managers can set them.",howTo:["Settings \u2192 Usage & Billing \u2192 set the spend limit.","Add an environment budget for each non-production environment (Team and Enterprise)."],capUrl:"https://modal.com/settings",source:"https://modal.com/docs/guide/budgets",evidence:'"When the spend limit is reached, Modal stops workloads that would incur additional out-of-pocket charges."'}),lovable:d({hardCap:"yes",capSummary:"Owners and admins (paid plan) can set blocking usage limits per workspace, project, user, group or access token; at the limit the affected usage stops. Usage is recorded before limits are checked, so it can slightly overshoot. Adding credits does not lift a block.",howTo:["Workspace settings \u2192 Usage limits & alerts \u2192 create a limit with Block all usage.","Scope Run-credit caps to a project or the workspace (user limits only count Build credits).","Set the auto top-up monthly credit limit instead of leaving it at No limit."],capUrl:"https://lovable.dev/",source:"https://docs.lovable.dev/features/usage-limits-and-alerts",evidence:'"When a blocking limit is reached, the affected usage stops."; "Usage is recorded before limits are evaluated, so usage can slightly exceed a hard limit before the block takes effect."'}),retell:d({hardCap:"yes",capSummary:"Optional monthly spending limit: at 100% calls and API requests pause until you raise it or the next UTC month. Leaving it off means no cap. Auto recharge can refill credits; at zero credits usage stops.",howTo:["Billing \u2192 set a monthly spending limit.","Keep Auto recharge off or set the trigger low."],capUrl:"https://www.retellai.com/",source:"https://docs.retellai.com/accounts/billing",evidence:'"At 100%, calls and API requests pause."; "Leave it off for no cap and no spending emails."; "When your credit balance reaches zero, calls, chat, and other usage stop"'}),codex:d({hardCap:"partial",capSummary:"On a ChatGPT plan, Codex usage is bounded by plan usage limits and extra use needs credits you buy yourself (the page mentions no automatic purchase and no credit spend cap). Codex on an API key is billed separately at API rates, so the OpenAI project hard limit applies there.",howTo:["Use Codex on a ChatGPT plan rather than an API key for a bounded bill.","If you run it on an API key, give it its own OpenAI project with a low hard limit."],capUrl:"https://platform.openai.com/settings/organization/limits",source:"https://learn.chatgpt.com/docs/pricing",evidence:'"Plus and Pro users who reach their usage limit can purchase additional credits to continue working"; the page mentions no automatic credit purchase and no credit spend cap. (developers.openai.com/codex/pricing redirects here)'}),render:d({hardCap:"partial",capSummary:"Only build pipeline minutes have a spend limit: when it is reached Render stops pipeline tasks, including service builds, for the rest of the month. The page describes no cap on compute, storage or bandwidth.",howTo:["Workspace Settings \u2192 Build Pipeline \u2192 set a monthly spend limit for pipeline minutes.","Cap instance counts and plan sizes yourself; no spend cap exists for compute."],capUrl:"https://dashboard.render.com/",source:"https://render.com/docs/build-pipeline",evidence:'"You can set a maximum amount to spend on pipeline minutes each month."; "Render stops running pipeline tasks (including service builds!) for the remainder of the current month."'}),neon:d({hardCap:"partial",capSummary:"Per-project consumption limits, set through the API, suspend all computes in the project when a compute, storage or data-transfer quota is met, until the next billing period or a raise. Spend notifications are email alerts only. Plan availability is not stated.",howTo:["Update the project via the API with a quota object (an update replaces the whole object).","Set a max autoscaling limit on computes.","Add spend notifications as a warning, not a stop."],capUrl:"https://console.neon.tech/",source:"https://neon.com/docs/guides/consumption-limits",evidence:`"all active computes for that project are automatically suspended."; spend notifications are "email alerts when your organization's total monthly charges approach a dollar amount, without stopping usage."`}),upstash:d({hardCap:"partial",capSummary:"Pay-as-you-go databases can have a monthly budget: at the budget the database is rate-limited rather than continuing to bill. Budgets are per database, there is no account-wide budget, and the per-database surplus charge is not covered.",howTo:["Database \u2192 Usage tab \u2192 Change Budget (per database).","Set it on every pay-as-you-go database."],capUrl:"https://console.upstash.com/",source:"https://upstash.com/docs/redis/overall/billing",evidence:'"When the budget is reached the database is rate-limited rather than continuing to bill."; "there is no account-wide budget."'}),pinecone:d({hardCap:"partial",capSummary:"No spend limit or budget setting. Builder plan usage beyond its limits is blocked, and Starter and Builder reads are blocked once the egress allowance is reached; Standard and Enterprise bill overage and reads continue.",howTo:["Stay on a plan whose limits block rather than bill if you need a ceiling.","On Standard, track usage yourself; nothing stops overage."],capUrl:"https://app.pinecone.io/",source:"https://docs.pinecone.io/guides/manage-cost/understanding-cost",evidence:'"additional usage beyond Builder limits is blocked rather than billed."'}),vast:d({hardCap:"partial",capSummary:"Prepaid balance: at zero or below your instances are stopped (storage keeps billing). With a saved card the balance is charged to cover the negative amount; without a card instances and data are destroyed. Autobilling tops up from a card.",howTo:["Billing \u2192 keep autobilling off or set the threshold near your daily spend.","Set a low-balance email alert."],capUrl:"https://cloud.vast.ai/billing/",source:"https://docs.vast.ai/guides/reference/billing",evidence:'"Your instances are stopped automatically."; "Your credit card will be periodically and automatically charged to cover any negative balance."'}),assemblyai:d({hardCap:"partial",capSummary:"Prepaid balance: without auto-pay, API access is restricted when the balance hits $0 or goes negative. Auto-pay refills from your card; no spend cap is described, only low-balance alerts.",howTo:["Workspace \u2192 Settings \u2192 Billing \u2192 turn auto-pay off, or set a low target balance.","Workspace \u2192 Settings \u2192 Alerts \u2192 set a low-balance alert."],capUrl:"https://www.assemblyai.com/dashboard",source:"https://www.assemblyai.com/docs/billing-and-pricing",evidence:'"When your balance hits $0 or goes negative without auto-pay, your API access is restricted until you add funds."'}),sarvam:d({hardCap:"partial",capSummary:"Credits are one prepaid balance per organisation; when it is empty requests fail with 402 until you top up. The page documents no spend limit or budget and does not mention auto-recharge.",howTo:["Settings \u2192 Billing \u2192 top up only what you need.","Use a separate organisation to cap a project's spend (no per-workspace budgets)."],capUrl:"https://dashboard.sarvam.ai/",source:"https://docs.sarvam.ai/api/getting-started/ratelimits",evidence:`"API requests fail with 402 (insufficient_quota_error)" when "the organisation's credit balance is empty".`}),windsurf:d({hardCap:"partial",capSummary:"Add-on credits are used after monthly prompt credits; automatic refills (below 15 credits) are subject to a maximum monthly budget cap, $160 by default. The page does not say what happens when no add-on credits are left.",howTo:["Plan settings \u2192 set the maximum monthly refill budget (default $160) and lower it.","Turn auto-refill off if you want usage to stop at the plan allowance."],capUrl:"https://devin.ai/",source:"https://docs.devin.ai/desktop/accounts/usage",evidence:'"Refills are subject to maximum monthly budget caps ($160 by default)."'}),livekit:d({hardCap:"partial",capSummary:"On the free Build plan the included allowances are hard caps: new requests fail with no overage charge. On paid plans usage past the allowance is billed at the published rate, and the page mentions no spend cap.",howTo:["Stay on Build for a hard ceiling.","On paid plans, watch usage in the dashboard (Settings \u2192 Project); nothing stops overage."],capUrl:"https://cloud.livekit.io/",source:"https://docs.livekit.io/deploy/admin/quotas-and-limits/",evidence:`Free Build allowances are "a hard cap"; paid: "usage beyond the included allowance is billed incrementally at the plan's published rate."`}),runway:d({hardCap:"partial",capSummary:"Each API usage tier has a maximum monthly spend: the most credits that can be purchased in any 30-day window ($100 at Tier 1 up to $100,000 at Tier 5). The page does not say what happens when credits reach zero.",howTo:["Billing \u2192 autobilling: set a high 'recharge below' only if you want refills.","Stay on a low tier to keep the monthly purchase ceiling low."],capUrl:"https://app.runwayml.com/",source:"https://docs.dev.runwayml.com/usage/autobilling/",evidence:'"Each usage tier specifies a maximum monthly spend amount."; "This is the maximum number of credits that can be purchased in any 30 day window."'}),deepseek:{capSummary:"Checked 2026-11-15: the pricing page says fees come out of the topped-up balance but not what happens at zero, and mentions no auto top-up or spend limit. Unknown."},cohere:{capSummary:"Checked 2026-11-15: the rate-limits page says nothing about a spend limit or billing cap. Unknown."},oracle:{capSummary:"Checked 2026-11-15: Oracle calls budgets soft limits that email alerts; no page found that stops spend. Unknown."},hetzner:{capSummary:"Checked 2026-11-15: each server's bill never exceeds its monthly price cap, but the billing FAQ describes no account-wide spending limit and says alerts do not stop usage. Unknown."},linode:{capSummary:"Checked 2026-11-15: the billing FAQ describes a credit limit that triggers an invoice, not a spend limit or budget. Unknown."},fly:{capSummary:"Checked 2026-11-15: Fly's cost-management page describes no spending limit, says free allowances do not cap your bill and that billing alerts are not supported (yet). Not stated as a hard 'no', so unknown."},mongodb:{capSummary:"Checked 2026-11-15: the Atlas billing page describes billing alerts only; no spend cap and no stop is described. The Flex cost page was not opened. Unknown."},vapi:{capSummary:"Checked 2026-11-15: the pay-as-you-go page does not say what happens at $0 or mention a spend cap (a related page was only seen as a link). Unknown."},fal:{capSummary:"Checked 2026-11-15: fal's pricing page says credits are prepaid but not what happens at zero, and mentions no auto top-up or spending limit. Unknown."},lambda:{capSummary:"Checked 2026-11-15: Lambda's billing page mentions no spending limit, alert or zero-balance behaviour. Unknown."},bolt:{capSummary:"Checked 2026-11-15: Bolt's tokens page says reloads are manual and mentions no spend cap; what happens at zero on paid plans is not stated. Unknown."},elevenlabs:{capSummary:"Checked 2026-11-15: Pay As You Go has an optional monthly spend cap (off by default) but the page does not say what happens when it is reached. Unknown."}},et=Qe.map(e=>he[e.id]?{...e,...he[e.id]}:e);var tt=/^(?:claude|gpt|gemini)-[a-z2-7]{13}$/;function te(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;let t=e;return t.watermark?!0:Array.isArray(t.ids)&&t.ids.length===1&&typeof t.ids[0]=="string"&&tt.test(t.ids[0])&&typeof t.date=="string"&&t.date<A}var nt="https://ouchbill.com/api/table";function fe(e,t,o,a){let r=V(e.filter(s=>!te(s))),i=new Map(t.map(s=>[`${s.product}|${s.cycle}`,s]));return{retirementsChecked:o,eolChecked:a,findRetiring:s=>r(s),findEolRow:(s,g)=>i.get(`${s}|${g}`),sourceFor:s=>Object.prototype.hasOwnProperty.call(x,s)?x[s]:nt}}var ct="https://ouchbill.com/api/table",dt=1,we="table.json",E=1440*60*1e3,pt=7*E,ut=E,ve=2*1024*1024,gt={"placeholder-2026-11-23":["-----BEGIN PUBLIC KEY-----","MCowBQYDK2VwAyEAGZkS3hUheX90J5wong5X35dnDIQDrbifS25srzqgv8o=","-----END PUBLIC KEY-----"].join(`
5
- `)},oe=/^obt_[A-Za-z0-9_-]{43}$/,L=class extends Error{constructor(o){super(`HTTP ${o}`);this.status=o}status},y=e=>({ok:!1,reason:e}),P=e=>typeof e=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(e)&&!Number.isNaN(Date.parse(`${e}T00:00:00Z`)),v=e=>typeof e=="string";var N=e=>e&&typeof e=="object"&&!Array.isArray(e)?e:null,Ae=/^[A-Za-z0-9][A-Za-z0-9._:@/-]{0,99}$/,mt=/^[a-z][a-z0-9-]{1,30}$/,ht=/^[a-z0-9][a-z0-9.-]{0,39}$/,ft=/^[A-Za-z0-9][A-Za-z0-9._-]{0,39}$/,yt=200,ye=5e3,bt=new Set([...X,...$.map(e=>e.source),...Object.values(x)].map(e=>new URL(e).hostname)),kt=30*E,be=e=>Array.isArray(e)&&e.length>0&&e.length<=yt&&e.every(t=>v(t)&&Ae.test(t));function wt(e){if(!z(e,300)||!/^https:\/\/\S+$/.test(e))return!1;try{let t=new URL(e);return t.protocol==="https:"&&t.username===""&&t.password===""&&t.port===""&&bt.has(t.hostname)}catch{return!1}}function vt(e){return z(e,120)&&/^[ -~]+$/.test(e)&&!/\]\(|!\[|:\/\/|www\./i.test(e)}function At(e){let t=N(e);return!!t&&v(t.vendor)&&mt.test(t.vendor)&&be(t.ids)&&P(t.date)&&vt(t.replacement)&&P(t.announced)&&(t.related===void 0||Array.isArray(t.related)&&(t.related.length===0||be(t.related)))&&(t.routesTo===void 0||v(t.routesTo)&&Ae.test(t.routesTo))}function St(e){let t=N(e);return!!t&&v(t.product)&&ht.test(t.product)&&v(t.cycle)&&ft.test(t.cycle)&&P(t.date)&&wt(t.source)&&P(t.checked)&&(t.note===void 0||z(t.note,300))}function Se(e,t,o){let a=N(e);if(!a||!v(a.payload)||!v(a.signature)||!v(a.keyId))return y("not a signed table");if(a.payload.length>ve)return y("table too large");if(!Object.prototype.hasOwnProperty.call(t,a.keyId))return y(`unknown signing key "${a.keyId.slice(0,40)}"`);let r=Buffer.from(a.signature,"base64"),i=!1;try{i=r.length===64&&at(null,Buffer.from(a.payload,"utf8"),ot(t[a.keyId]),r)}catch{i=!1}if(!i)return y("signature does not verify");let s;try{s=N(JSON.parse(a.payload))}catch{return y("payload is not JSON")}if(!s)return y("payload is not an object");if(s.version!==dt)return y(`unknown table version ${String(s.version)}`);let g=v(s.issuedAt)?Date.parse(s.issuedAt):NaN,p=v(s.expiresAt)?Date.parse(s.expiresAt):NaN;if(Number.isNaN(g)||Number.isNaN(p))return y("table has no valid dates");if(p<=o.getTime())return y(`table expired on ${String(s.expiresAt).slice(0,10)}`);if(g>o.getTime()+ut)return y("table is dated in the future");if(p-g>kt)return y("table claims a validity longer than 30 days");if(!P(s.retirementsChecked)||!P(s.eolChecked))return y("table has no checked dates");if(!Array.isArray(s.retirements)||s.retirements.length>ye||!s.retirements.every(At))return y("retirement rows are malformed");if(!Array.isArray(s.eol)||s.eol.length>ye||!s.eol.every(St))return y("end-of-life rows are malformed");if(s.retirementsChecked<A||s.eolChecked<b)return y("table is older than the bundled snapshot");let m=s.retirements.filter(l=>!Ct(l));return{ok:!0,value:{doc:{payload:a.payload,signature:a.signature,keyId:a.keyId},issuedAt:new Date(g).toISOString(),retirementsChecked:s.retirementsChecked,eolChecked:s.eolChecked,retirements:m,eol:s.eol}}}var Ct=e=>te(e),Ce=(e,t,o)=>{let a=e<t?e:t;return Math.max(0,Math.floor((o.getTime()-Date.parse(`${a}T00:00:00Z`))/E))};function ne(e,t,o,a){return{source:e,issuedAt:t.issuedAt,ageDays:Ce(t.retirementsChecked,t.eolChecked,o),retirementsChecked:t.retirementsChecked,eolChecked:t.eolChecked,retirements:t.retirements,eol:t.eol,...a?{warning:a}:{}}}function Te(e,t){let o=Ce(A,b,e),a=A<b?A:b;return{source:"bundled",issuedAt:null,ageDays:o,retirementsChecked:A,eolChecked:b,retirements:G,eol:$,warning:`Using the tables bundled with this version, last checked ${a} (${o} day${o===1?"":"s"} ago)`+(t?`; live tables unavailable: ${t}.`:".")}}async function Tt(e,t,o){let a;try{a=await it(ke.join(e,we),"utf8")}catch{return y("no cache")}try{return Se(JSON.parse(a),t,o)}catch{return y("cache is not JSON")}}async function xt(e,t){await rt(e,{recursive:!0});let o=ke.join(e,we),a=`${o}.${process.pid}.${Date.now()}.tmp`;await lt(a,JSON.stringify(t),"utf8"),await st(a,o)}async function Pt(e,t){let o=e.url??ct,a={accept:"application/json","user-agent":`ouchbill/${e.clientVersion??"dev"}`};if(e.tableKey!==void 0){if(new URL(o).protocol!=="https:")throw new Error("table URL is not https; the key was not sent");if(!oe.test(e.tableKey))throw new Error("the data feed key is not in the obt_ format; it was not sent");a.authorization=`Bearer ${e.tableKey}`}let r=await t(o,{method:"GET",headers:a,redirect:"error",signal:AbortSignal.timeout(e.timeoutMs??5e3)});if(r.status===401||r.status===403)throw new L(r.status);if(!r.ok)throw new Error(`HTTP ${r.status}`);let i=await r.text();if(i.length>ve*2)throw new Error("response too large");return JSON.parse(i)}async function Rt(e,t){let o=e.publicKeys??gt,a=await Tt(e.cacheDir,o,t),r=a.ok&&t.getTime()-Date.parse(a.value.issuedAt)<pt;if(a.ok&&r)return ne("cache",a.value,t);let i=null;if(e.allowNetwork&&e.fetch)try{let s=Se(await Pt(e,e.fetch),o,t);if(!s.ok)i=s.reason;else if(a.ok&&s.value.issuedAt<a.value.issuedAt)i="server sent an older table than the cached one (refused)";else{let g;try{await xt(e.cacheDir,s.value.doc)}catch{g="Live tables loaded, but the cache could not be written; the next run will fetch again."}return ne("live",s.value,t,g)}}catch(s){i=s instanceof L?`the server refused the data feed key (HTTP ${s.status})`:`could not reach the server (${s instanceof Error?s.message.slice(0,80):"error"})`}else i="network refresh is off";if(a.ok){let s=Math.floor((t.getTime()-Date.parse(a.value.issuedAt))/E);return ne("cache",a.value,t,`Using cached tables from ${s} days ago; refresh failed: ${i}.`)}return Te(t,i)}async function xe(e){let t=e.now??new Date;try{return await Rt(e,t)}catch(o){return Te(t,`unexpected error (${o instanceof Error?o.message.slice(0,80):"error"})`)}}var _t=new Set(["localhost","localdomain","local","internal","intranet","private","lan","home","corp","test","example","invalid","onion","arpa","alt","docker","kubernetes","cluster","svc"]),jt=["nip.io","sslip.io","xip.io","localtest.me","lvh.me","vcap.me","lacolhost.com","traefik.me"],Ot=/(ignore|disregard|forget|override|bypass)[^a-z0-9]*(all|any|the|your|previous|prior|above|earlier|system|instructions?|prompts?|rules?)/;function Pe(e){if(typeof e!="string"||e.length===0||e.length>253)return null;let t=e.toLowerCase().replace(/\.$/,"");if(!/^[a-z0-9.-]+$/.test(t)||H.isIP(t)!==0)return null;let o=t.split(".");if(o.length<2||o.some(r=>r.length===0||r.length>63||r.startsWith("-")||r.endsWith("-")))return null;let a=o[o.length-1];return _t.has(a)||!(/^[a-z]{2,63}$/.test(a)||/^xn--[a-z0-9-]+$/.test(a))||jt.some(r=>t===r||t.endsWith(`.${r}`))||Ot.test(t)||ee(t)||o.some(r=>r.split("-").length>5)?null:K(t)?t:null}var U=new H.BlockList;for(let[e,t]of[["0.0.0.0",8],["10.0.0.0",8],["100.64.0.0",10],["127.0.0.0",8],["169.254.0.0",16],["172.16.0.0",12],["192.0.0.0",24],["192.0.2.0",24],["192.168.0.0",16],["198.18.0.0",15],["198.51.100.0",24],["203.0.113.0",24],["224.0.0.0",4],["240.0.0.0",4]])U.addSubnet(e,t,"ipv4");for(let[e,t]of[["::",128],["::1",128],["64:ff9b::",96],["100::",64],["2001::",32],["2001:db8::",32],["2002::",16],["fc00::",7],["fe80::",10],["fec0::",10],["ff00::",8]])U.addSubnet(e,t,"ipv6");function Dt(e){let t=e.toLowerCase(),o=/^(.*:)(\d+\.\d+\.\d+\.\d+)$/.exec(t);if(o){if(H.isIPv4(o[2])===!1)return null;let[p,m,l,f]=o[2].split(".").map(Number);t=`${o[1]}${(p<<8|m).toString(16)}:${(l<<8|f).toString(16)}`}let a=t.split("::");if(a.length>2)return null;let r=a[0]?a[0].split(":"):[],i=a.length===2&&a[1]?a[1].split(":"):[],s=a.length===2?8-r.length-i.length:0;if(s<0||a.length===1&&r.length!==8)return null;let g=[...r,...Array(s).fill("0"),...i].map(p=>/^[0-9a-f]{1,4}$/.test(p)?parseInt(p,16):NaN);return g.length===8&&g.every(p=>!Number.isNaN(p))?g:null}function Bt(e){let t=H.isIP(e);if(t===0)return!0;if(t===4)return U.check(e,"ipv4");let o=Dt(e);if(!o)return!0;let a=r=>o.slice(0,r).every(i=>i===0);return a(5)&&o[5]===65535?U.check(`${o[6]>>8}.${o[6]&255}.${o[7]>>8}.${o[7]&255}`,"ipv4"):a(6)?!0:U.check(e,"ipv6")}function $t(e,t,o,a=It.lookup){a(e,{...t,all:!0},(r,i)=>{if(r)return o(r);let s=i;if(s.length===0||s.some(g=>Bt(g.address)))return o(Object.assign(new Error("refused: resolves to a private address"),{code:"EOUCHBILLPRIVATE"}));if(t.all)return o(null,s);o(null,s[0].address,s[0].family)})}var zt=e=>Ut.connect({...e,lookup:$t});function Lt(e,t){let o=e.HOME||e.USERPROFILE||Et.homedir();if(t==="win32")return R.join(e.LOCALAPPDATA||R.join(o,"AppData","Local"),"ouchbill");if(t==="darwin")return R.join(o,"Library","Caches","ouchbill");let a=e.XDG_CACHE_HOME;return R.join(a&&R.isAbsolute(a)?a:R.join(o,".cache"),"ouchbill")}var M="OUCHBILL_TABLE_KEY",Re=`Fresh tables need a free data feed key: sign in at https://ouchbill.com, open Settings, create a data feed key and set it in the ${M} environment variable.`;function Nt(e){let t=e[M];if(t===void 0||t.trim()==="")return{state:"missing"};let o=t.trim();return oe.test(o)?{state:"ok",key:o}:{state:"malformed"}}function Mt(e,t){if(!e.warning)return null;if(e.source==="live")return"Live tables loaded, but the cache could not be written; the next run will fetch again.";let o=e.warning.split(/unavailable: |refresh failed: /)[1]??"",a="",r;t.state==="missing"?(r="no data feed key is set",a=` ${Re}`):t.state==="malformed"?(r=`${M} does not hold a data feed key (keys start with obt_), so nothing was sent`,a=` ${Re}`):/^the server refused the data feed key/.test(o)?(r=`the server did not accept the data feed key in ${M} (it may be revoked or mistyped)`,a=" Create a new key in Settings at https://ouchbill.com."):/^could not reach the server \(HTTP 429\)/.test(o)?r="the server is limiting requests for this key; try again later (use one key per person or CI system)":r=o===""||/^(could not reach|unexpected error)/.test(o)?"the server could not be reached":/^(signature|unknown signing key)/.test(o)?"its signature did not verify":/older/.test(o)?"the server sent an older table (refused)":"the server's table was not valid";let i=e.retirementsChecked<e.eolChecked?e.retirementsChecked:e.eolChecked;return e.source==="cache"?`Using cached tables last checked ${i}; the refresh did not run or failed because ${r}.${a}`:`Using the tables bundled with this version, last checked ${i} (${e.ageDays} day${e.ageDays===1?"":"s"} ago); live tables unavailable because ${r}.${a}`}async function Un(e){let t=e.deps??{},o=Nt(e.env),a=await xe({fetch:t.fetch??globalThis.fetch,cacheDir:t.cacheDir??Lt(e.env,e.platform),now:e.now,allowNetwork:o.state==="ok",clientVersion:e.version,...o.state==="ok"?{tableKey:o.key}:{},...t.publicKeys?{publicKeys:t.publicKeys}:{},...t.timeoutMs?{timeoutMs:t.timeoutMs}:{}}),r={source:a.source,issuedAt:a.issuedAt,ageDays:a.ageDays,retirementsChecked:a.retirementsChecked,eolChecked:a.eolChecked,warning:Mt(a,o)};return a.source==="bundled"?{report:r}:{tables:fe(a.retirements,a.eol,a.retirementsChecked,a.eolChecked),report:r}}function _n(e){let t=[],o=0;for(let i of ce(e)){let s=Pe(i.host);s?t.push({host:s,file:i.file,line:i.line}):o++}let a=t.slice(0,O),r=[...new Set(a.map(i=>D(i.host)))].filter(i=>Pe(i)!==null);return{hosts:a,domains:r,skipped:t.slice(O).map(i=>i.host),refused:o}}var Ht=e=>/timed out/.test(e)?"timed out":/private address/.test(e)?"refused: it resolves to a private address":/certificate expiry/.test(e)?"no readable certificate":"could not connect",qt=e=>{let t=/HTTP (\d{3})/.exec(e)?.[1];return e===B?B:t?`the registry lookup answered HTTP ${t}`:/timed out/.test(e)?"timed out":/no expiration/.test(e)?"the registry reply has no expiry date":"the registry lookup failed"};async function jn(e,t){let o=t.deps??{},a=()=>t.now,r=o.timeoutMs?{timeoutMs:o.timeoutMs}:{},i=[],s=new Map(e.hosts.map(l=>[l.host,l])),g=await W(e.hosts.map(l=>l.host),l=>pe(l,{connect:o.tlsConnect??zt,now:a,...r}));for(let l of g.results){let f=s.get(l.host);i.push("error"in l?{kind:"certificate",name:l.host,file:f.file,line:f.line,expiresOn:null,daysLeft:null,error:Ht(l.error)}:{kind:"certificate",name:l.host,file:f.file,line:f.line,expiresOn:l.expiresOn,daysLeft:l.daysLeft,error:null})}let p=o.fetch??globalThis.fetch,m=await W(e.domains,l=>ue(l,{fetch:p,now:a,...r,...t.version?{version:t.version}:{}}));for(let l of m.results){let f=e.hosts.find(_=>D(_.host)===l.domain);i.push("error"in l?{kind:"domain",name:l.domain,file:f.file,line:f.line,expiresOn:null,daysLeft:null,error:qt(l.error)}:{kind:"domain",name:l.domain,file:f.file,line:f.line,expiresOn:l.expiresOn,daysLeft:l.daysLeft,error:null})}return{contacted:e.hosts.map(l=>l.host),rdapDomains:e.domains,skipped:e.skipped,refused:e.refused,checks:i}}export{Re as GET_A_KEY,M as TABLE_KEY_ENV,Lt as cacheDirFor,$t as guardedLookup,Bt as isBlockedAddress,le as isHostFile,Un as loadFresh,_n as planHosts,jn as runOnline,Nt as tableKeyFrom,Pe as validateHost};
4
+ `,i+1))t.push(i+1)}let a=0,r=t.length-1;for(;a<r;){let i=a+r+1>>1;t[i]<=o?a=i:r=i-1}return{line:a+1,column:o-t[a]+1}}}var Xe=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Qe=/(?:^|[^A-Za-z0-9._-])(?:[a-z]{2,7}\.)?anthropic\.$/;function ee(e){let t=e.flatMap(r=>[...r.ids.map(i=>({id:i,match:"exact",r})),...(r.related??[]).map(i=>({id:i,match:"related",r}))]).filter(r=>r.id.length>0).sort((r,i)=>i.id.length-r.id.length);if(!t.length)return()=>[];let o=new Map(t.map(r=>[r.id,r])),a=new RegExp(`(?<=^|[^A-Za-z0-9._-]|anthropic\\.)(${t.map(r=>Xe(r.id)).join("|")})(?=$|[^A-Za-z0-9_.-]|\\.(?![0-9])|(-v\\d+(?::\\d+)?)(?![A-Za-z0-9_.:-]))`,"g");return r=>{let i=[],s=Je(r);for(let d of r.matchAll(a)){let c=d[1],g=o.get(c),l=d.index??0,h=r[l-1]==="."&&Qe.test(r.slice(Math.max(0,l-20),l));if(r[l-1]==="."&&!h)continue;let C=h||d[2]!==void 0;if(!(C&&g.r.vendor!=="anthropic")){if(c==="o3"||c==="o3-pro"){let P=r[l-1],ue=r[l+c.length];if(!(P&&ue&&/["'`]/.test(P)&&P===ue))continue}i.push({id:c,match:g.match,retirement:g.r,...s(l),...C?{platform:"bedrock"}:{}})}}return i}}var et=ee(Q);var b="2026-11-23",te="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html",we="https://docs.aws.amazon.com/lambda/latest/dg/runtime-support-policy.html",ne="https://github.blog/changelog/2026-09-23-node-20-is-no-longer-available-in-github-actions",$="https://github.blog/changelog/2026-10-01-github-actions-macos-14-runner-image-retirement",oe="https://vercel.com/changelog/node-js-20-is-being-deprecated",nt={nodejs:{name:"Node.js",kind:"runtime",by:"major",replacement:"Node.js 24",source:"https://endoflife.date/nodejs"},python:{name:"Python",kind:"runtime",by:"minor",replacement:"Python 3.14",source:"https://endoflife.date/python"},ruby:{name:"Ruby",kind:"runtime",by:"minor",replacement:"Ruby 4.0",source:"https://endoflife.date/ruby"},php:{name:"PHP",kind:"runtime",by:"minor",replacement:"PHP 8.5",source:"https://endoflife.date/php"},go:{name:"Go",kind:"runtime",by:"minor",replacement:"Go 1.26",source:"https://endoflife.date/go"},postgresql:{name:"PostgreSQL",kind:"database",by:"major",replacement:"PostgreSQL 18",source:"https://endoflife.date/postgresql"},mysql:{name:"MySQL",kind:"database",by:"minor",replacement:"MySQL 9.7",source:"https://endoflife.date/mysql"},redis:{name:"Redis",kind:"database",by:"minor",replacement:"Redis 8.2",source:"https://endoflife.date/redis"},mongodb:{name:"MongoDB",kind:"database",by:"minor",replacement:"MongoDB 8.0",source:"https://endoflife.date/mongodb"},nextjs:{name:"Next.js",kind:"framework",by:"major",replacement:"Next.js 16",source:"https://endoflife.date/nextjs"},angular:{name:"Angular",kind:"framework",by:"major",replacement:"Angular 21",source:"https://endoflife.date/angular"},django:{name:"Django",kind:"framework",by:"minor",replacement:"Django 5.2",source:"https://endoflife.date/django"},rails:{name:"Rails",kind:"framework",by:"minor",replacement:"Rails 8.1",source:"https://endoflife.date/rails"},laravel:{name:"Laravel",kind:"framework",by:"major",replacement:"Laravel 13",source:"https://endoflife.date/laravel"},"spring-boot":{name:"Spring Boot",kind:"framework",by:"minor",replacement:"Spring Boot 4.2",source:"https://endoflife.date/spring-boot"},"aws-lambda":{name:"AWS Lambda runtime",kind:"serverless",by:"id",replacement:"a supported Lambda runtime (nodejs24.x, python3.14, ruby3.4 or java25), see the AWS page",source:te},dotnet:{name:".NET",kind:"runtime",by:"id",replacement:".NET 10 (LTS)",source:"https://endoflife.date/dotnet"},"eclipse-temurin":{name:"Eclipse Temurin (Java)",kind:"runtime",by:"major",replacement:"Eclipse Temurin 25 (LTS)",source:"https://endoflife.date/eclipse-temurin"},"gha-runner":{name:"GitHub-hosted runner",kind:"action",by:"id",replacement:"a current runner label (for example macos-15 or macos-26), see the GitHub changelog",source:$},"vercel-node":{name:"Node.js on Vercel",kind:"runtime",by:"id",replacement:"Node.js 24.x (or 26.x)",source:oe},"gha-node":{name:"GitHub Action on",kind:"action",by:"id",replacement:"a newer major of the action (one that runs on Node 24)",source:ne}},n=(e,t,o)=>({product:e,cycle:t,date:o,source:nt[e].source,checked:b}),m=(e,t,o)=>({product:"aws-lambda",cycle:e,date:t,source:o?we:te,checked:b}),H=[n("nodejs","26","2029-04-30"),n("nodejs","25","2026-06-01"),n("nodejs","24","2028-04-30"),n("nodejs","23","2025-06-01"),n("nodejs","22","2027-04-30"),n("nodejs","21","2024-06-01"),n("nodejs","20","2026-04-30"),n("nodejs","19","2023-06-01"),n("nodejs","18","2025-04-30"),n("nodejs","17","2022-06-01"),n("nodejs","16","2023-09-11"),n("nodejs","14","2023-04-30"),n("nodejs","12","2022-04-30"),n("python","3.15","2031-10-31"),n("python","3.14","2030-10-31"),n("python","3.13","2029-10-31"),n("python","3.12","2028-10-31"),n("python","3.11","2027-10-31"),n("python","3.10","2026-10-01"),n("python","3.9","2025-10-31"),n("python","3.8","2024-10-07"),n("python","3.7","2023-06-27"),n("ruby","4.0","2029-03-31"),n("ruby","3.4","2028-03-31"),n("ruby","3.3","2027-03-31"),n("ruby","3.2","2026-03-31"),n("ruby","3.1","2025-03-26"),n("ruby","3.0","2024-04-23"),n("ruby","2.7","2023-03-31"),n("ruby","2.6","2022-03-31"),n("php","8.6","2030-12-31"),n("php","8.5","2029-12-31"),n("php","8.4","2028-12-31"),n("php","8.3","2027-12-31"),n("php","8.2","2026-12-31"),n("php","8.1","2025-12-31"),n("php","8.0","2023-11-26"),n("php","7.4","2022-11-28"),n("go","1.25","2026-08-19"),n("go","1.24","2026-02-10"),n("go","1.23","2025-08-12"),n("go","1.22","2025-02-11"),n("go","1.21","2024-08-13"),n("go","1.20","2024-02-06"),n("go","1.19","2023-09-06"),n("go","1.18","2023-02-01"),n("go","1.17","2022-08-02"),n("go","1.16","2022-03-15"),n("postgresql","19","2031-11-19"),n("postgresql","18","2030-11-14"),n("postgresql","17","2029-11-08"),n("postgresql","16","2028-11-09"),n("postgresql","15","2027-11-11"),n("postgresql","14","2026-11-12"),n("postgresql","13","2025-11-13"),n("postgresql","12","2024-11-21"),n("postgresql","11","2023-11-09"),n("postgresql","10","2022-11-10"),n("mysql","26.7","2026-10-20"),n("mysql","9.7","2034-04-30"),n("mysql","9.6","2026-04-21"),n("mysql","9.5","2026-01-20"),n("mysql","9.4","2025-10-21"),n("mysql","9.3","2025-07-22"),n("mysql","9.2","2025-04-15"),n("mysql","9.1","2025-01-21"),n("mysql","9.0","2024-10-15"),n("mysql","8.4","2032-04-30"),n("mysql","8.3","2024-04-30"),n("mysql","8.2","2024-01-16"),n("mysql","8.1","2023-10-25"),n("mysql","8.0","2026-04-30"),n("mysql","5.7","2023-10-31"),n("redis","8.8","2027-01-29"),n("redis","8.6","2026-11-25"),n("redis","8.4","2026-08-10"),n("redis","8.2","2030-09-01"),n("redis","8.0","2026-12-01"),n("redis","7.4","2029-12-01"),n("redis","7.2","2029-12-01"),n("redis","7.0","2024-07-29"),n("redis","6.2","2027-04-01"),n("redis","6.0","2022-05-31"),n("redis","5.0","2022-04-27"),n("mongodb","9.0","2031-10-31"),n("mongodb","8.3","2029-10-31"),n("mongodb","8.2","2026-07-31"),n("mongodb","8.1","2025-09-30"),n("mongodb","8.0","2029-10-31"),n("mongodb","7.3","2024-10-02"),n("mongodb","7.2","2024-03-27"),n("mongodb","7.1","2024-01-23"),n("mongodb","7.0","2027-08-31"),n("mongodb","6.3","2023-08-31"),n("mongodb","6.2","2023-04-24"),n("mongodb","6.1","2023-02-09"),n("mongodb","6.0","2025-07-31"),n("mongodb","5.3","2022-07-19"),n("mongodb","5.2","2022-03-23"),n("mongodb","5.1","2022-01-19"),n("mongodb","5.0","2024-10-31"),n("mongodb","4.4","2024-02-29"),n("mongodb","4.2","2023-04-30"),n("mongodb","4.0","2022-04-30"),n("nextjs","16","2027-10-22"),n("nextjs","15","2027-01-31"),n("nextjs","14","2025-10-26"),n("nextjs","13","2024-12-21"),n("nextjs","12","2022-11-21"),n("nextjs","11","2022-01-27"),n("angular","22","2028-06-30"),n("angular","21","2027-06-30"),n("angular","20","2026-11-28"),n("angular","19","2026-05-19"),n("angular","18","2025-11-21"),n("angular","17","2025-05-15"),n("angular","16","2024-11-08"),n("angular","15","2024-05-18"),n("angular","14","2023-11-18"),n("angular","13","2023-05-04"),n("angular","12","2022-11-12"),n("angular","11","2022-05-11"),n("django","6.1","2027-12-31"),n("django","6.0","2027-04-30"),n("django","5.2","2028-04-30"),n("django","5.1","2025-12-03"),n("django","5.0","2025-04-02"),n("django","4.2","2026-04-07"),n("django","4.1","2023-12-01"),n("django","4.0","2023-04-01"),n("django","3.2","2024-04-01"),n("django","2.2","2022-04-11"),n("rails","8.1","2027-10-10"),n("rails","8.0","2026-11-07"),n("rails","7.2","2026-08-09"),n("rails","7.1","2025-10-01"),n("rails","7.0","2025-04-01"),n("rails","6.1","2024-10-01"),n("rails","6.0","2023-06-01"),n("rails","5.2","2022-06-01"),n("laravel","13","2028-03-17"),n("laravel","12","2027-02-24"),n("laravel","11","2026-03-12"),n("laravel","10","2025-02-04"),n("laravel","9","2024-02-06"),n("laravel","8","2023-01-24"),n("laravel","6","2022-09-06"),n("spring-boot","4.2","2027-12-31"),n("spring-boot","4.1","2027-07-31"),n("spring-boot","4.0","2026-12-31"),n("spring-boot","3.5","2026-06-30"),n("spring-boot","3.4","2025-12-31"),n("spring-boot","3.3","2025-06-30"),n("spring-boot","3.2","2024-12-31"),n("spring-boot","3.1","2024-06-30"),n("spring-boot","3.0","2023-12-31"),n("spring-boot","2.7","2023-06-30"),n("spring-boot","2.6","2022-11-24"),n("spring-boot","2.5","2022-05-19"),m("nodejs26.x","2029-04-30",!1),m("nodejs24.x","2028-04-30",!1),m("nodejs22.x","2027-05-30",!1),m("nodejs20.x","2026-04-30",!0),m("nodejs18.x","2025-09-01",!0),m("nodejs16.x","2024-06-12",!0),m("nodejs14.x","2023-12-04",!0),m("nodejs12.x","2023-03-31",!0),m("python3.15","2029-06-30",!1),m("python3.14","2029-06-30",!1),m("python3.13","2029-06-30",!1),m("python3.12","2028-10-31",!1),m("python3.11","2027-06-30",!1),m("python3.10","2026-10-31",!0),m("python3.9","2025-12-15",!0),m("python3.8","2024-10-14",!0),m("python3.7","2023-12-04",!0),m("python3.6","2022-07-18",!0),m("ruby4.0","2029-03-31",!1),m("ruby3.4","2028-03-31",!1),m("ruby3.3","2027-03-31",!1),m("ruby3.2","2026-03-31",!0),m("ruby2.7","2023-12-07",!0),m("java25","2029-06-30",!1),m("java21","2029-06-30",!1),m("java17.al2023","2029-06-30",!1),m("java11.al2023","2029-06-30",!1),m("java8.al2023","2029-06-30",!1),m("java17","2027-06-30",!1),m("java11","2027-06-30",!1),m("java8.al2","2027-06-30",!1),m("java8","2024-01-08",!0),m("dotnet10","2028-11-14",!1),m("dotnet8","2026-11-10",!0),m("dotnet6","2024-12-20",!0),m("dotnetcore3.1","2023-04-03",!0),m("provided.al2023","2029-06-30",!1),m("provided.al2","2026-07-31",!0),m("go1.x","2024-01-08",!0),n("dotnet","11","2028-11-14"),n("dotnet","10","2028-11-14"),n("dotnet","9","2026-11-10"),n("dotnet","8","2026-11-10"),n("dotnet","7","2024-05-14"),n("dotnet","6","2024-11-12"),n("dotnet","5","2022-05-10"),n("dotnet","3.1","2022-12-13"),n("eclipse-temurin","27","2027-03-23"),n("eclipse-temurin","26","2026-09-22"),n("eclipse-temurin","25","2031-09-30"),n("eclipse-temurin","24","2025-09-22"),n("eclipse-temurin","23","2025-03-18"),n("eclipse-temurin","22","2024-09-17"),n("eclipse-temurin","21","2029-12-31"),n("eclipse-temurin","20","2023-09-19"),n("eclipse-temurin","19","2023-03-31"),n("eclipse-temurin","18","2022-09-30"),n("eclipse-temurin","17","2027-10-31"),n("eclipse-temurin","11","2027-10-31"),n("eclipse-temurin","8","2030-12-31"),{product:"gha-runner",cycle:"macos-14",date:"2026-11-02",source:$,checked:b,note:"runner image retired"},{product:"gha-runner",cycle:"macos-14-large",date:"2026-11-02",source:$,checked:b,note:"runner image retired"},{product:"gha-runner",cycle:"macos-14-xlarge",date:"2026-11-02",source:$,checked:b,note:"runner image retired"},{product:"vercel-node",cycle:"20",date:"2026-10-01",source:oe,checked:b,note:"deprecated for Builds and Functions on Vercel"},{product:"gha-node",cycle:"node12",date:"2022-04-30",source:"https://endoflife.date/nodejs",checked:b,note:"Node.js 12 end of life"},{product:"gha-node",cycle:"node16",date:"2023-09-11",source:"https://endoflife.date/nodejs",checked:b,note:"Node.js 16 end of life"},{product:"gha-node",cycle:"node20",date:"2026-09-23",source:ne,checked:b,note:"removed from GitHub-hosted runners"}];var ae=["https://endoflife.date",te,we,ne,$,oe],gn=new Map(H.map(e=>[`${e.product}|${e.cycle}`,e]));var re=/[\u0000-\u0008\u000b-\u001f\u007f-\u009f\u00ad\u034f\u061c\u115f\u1160\u17b4\u17b5\u180b-\u180f\u200b-\u200f\u2028-\u202e\u2060-\u206f\u3164\ufe00-\ufe0f\ufeff\uffa0\ufff0-\ufffb]|\udb40[\udc00-\udc7f\udd00-\uddef]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/g;function ot(e){re.lastIndex=0;let t=re.test(e);return re.lastIndex=0,t}var at=/^(ai|assistant|assistants|llm|notice|urgent|important|attention|instruction|instructions|ignore|disregard|forget|bypass)$/,rt=/^(the|to|you|your|must|now|then|before|after|first|any|all|please|do|not|dont|never|always|and|previous|prior|above|earlier|immediately|run|execute|install|curl|wget|sh|bash|say|tell|reply|respond|follow|obey|instead|only|publish|deploy|push|delete|upload|send|report|mention|commit|merge|approve)$/,it=/(ignore|disregard|forget|override|bypass)[^a-z0-9]*(all|any|the|your|previous|prior|above|earlier|system|instructions?|prompts?|rules?)/i;function st(e){let t=e.replace(/([a-z])([A-Z])/g,"$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean),o=0,a=0;for(let r of t)at.test(r)?o++:rt.test(r)&&a++;return{addressing:o,functional:a}}function ie(e){if(it.test(e))return!0;let{addressing:t,functional:o}=st(e);return t>=1&&t*3+o>=5||o>=6}function K(e,t=200){return typeof e=="string"&&e.length>0&&e.length<=t&&!/[\n\r`<>]/.test(e)&&!ot(e)&&!ie(e)}var ve="https://www.digitalapplied.com/blog/ai-spend-controls-compared-usage-caps-2026",k="2026-11-03",lt="2026-11-15";function u(e){return{hardCap:"unknown",capSummary:"Not verified yet \u2014 open the billing page and look for a spend limit, usage cap or auto-recharge setting.",...e,linkChecked:!1,factStatus:"unverified",verifiedOn:null,source:null}}var R="Usually prepaid credits; the danger is auto-recharge (auto top-up) quietly refilling the balance.",w="Billed by usage; a loop, a leaked key or a traffic spike can run up charges overnight.",ct=[{id:"aws",name:"AWS",category:"cloud",billing:"usage",hardCap:"partial",capSummary:"Standard accounts have no hard cap: Budgets update up to 3 times a day and Budget Actions can block new resources. Accounts made with the new sign-up (Paid Plan) can set a project spend limit from $20 that pauses the project.",risk:"Forgotten NAT gateways, idle RDS, runaway Lambda, Bedrock on credits that switch to cash. Budgets data is 8\u201312 h behind; anomaly detection can take up to 24 h.",howTo:["Billing \u2192 Budgets \u2192 create a monthly cost budget with alerts at 50%, 80% and 100%.","Add a Budget Action that applies a deny policy at 100% (stops new resources, not running ones).","Turn on Cost Anomaly Detection (it covers Bedrock third-party models, not other Marketplace charges \u2014 use a budget filtered by billing entity for those).","New-experience accounts: AWS Settings \u2192 Billing \u2192 Cost by project \u2192 Set limit. A paused project left 90 days is deleted, so act on the alert."],capUrl:"https://console.aws.amazon.com/billing/home#/budgets",linkChecked:!0,factStatus:"verified",verifiedOn:k,source:"https://docs.aws.amazon.com/accounts/latest/reference/create-spend-limit.html",popular:!0},{id:"gcp",name:"Google Cloud",category:"cloud",billing:"usage",hardCap:"partial",capSummary:"Spend caps can pause one service in one project at 100% of a budget \u2014 so far only Gemini API, Agent Platform (Vertex AI), Cloud Run and Cloud Run functions. Everything else: budgets alert only.",risk:"Public or unrestricted API keys (Maps keys can reach Gemini), auto-scaling Cloud Run, BigQuery scans. Caps use estimated cost, so some overage still gets billed.",howTo:["Billing \u2192 Budgets & alerts \u2192 create a budget for each project.","On the budget, turn on a spend cap for each eligible service you use (Gemini API, Agent Platform, Cloud Run).","APIs & Services \u2192 Credentials \u2192 restrict every API key to specific APIs and referrers."],capUrl:"https://console.cloud.google.com/billing",linkChecked:!0,factStatus:"verified",verifiedOn:k,source:"https://docs.cloud.google.com/billing/docs/how-to/budgets-spend-caps",popular:!0},{id:"azure",name:"Microsoft Azure",category:"cloud",billing:"usage",hardCap:"no",capSummary:"Pay-as-you-go has no spending limit and no custom limit can be set; budgets alert only. Free and credit subscriptions stop at the credit amount.",risk:"Once the free credit limit is removed there is no ceiling; Marketplace services bill outside the limit.",howTo:["Cost Management \u2192 Budgets \u2192 create a monthly budget with alert thresholds.","Attach an action group so alerts reach email, SMS or a webhook."],capUrl:"https://portal.azure.com/",linkChecked:!0,factStatus:"verified",verifiedOn:k,source:"https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/spending-limit",popular:!0},u({id:"oracle",name:"Oracle Cloud",category:"cloud",billing:"usage",risk:w,howTo:["Billing \u2192 Budgets \u2192 create a budget with alert rules."],capUrl:"https://cloud.oracle.com/"}),u({id:"digitalocean",name:"DigitalOcean",category:"cloud",billing:"usage",risk:"Droplets and bandwidth bill by the hour; forgotten resources keep billing.",howTo:["Settings \u2192 Billing \u2192 set a billing alert."],capUrl:"https://cloud.digitalocean.com/account/billing"}),u({id:"hetzner",name:"Hetzner",category:"cloud",billing:"fixed",risk:"Mostly fixed monthly prices; traffic overage and forgotten servers are the usual surprise.",howTo:["Check server and traffic limits in the Cloud Console."],capUrl:"https://console.hetzner.com/"}),u({id:"linode",name:"Akamai (Linode)",category:"cloud",billing:"usage",risk:w,howTo:["Account \u2192 Billing \u2192 review usage and set alerts."],capUrl:"https://cloud.linode.com/account/billing"}),{id:"openai",name:"OpenAI API",category:"ai_api",billing:"usage",hardCap:"yes",capSummary:"Hard monthly spend limits for the organization and each project; over-limit requests get a 429. Alerts alone do not stop traffic, and enforcement is not instant.",risk:"Agent loops, leaked keys, batch jobs. Recorded spend can slightly exceed the limit.",howTo:["Settings \u2192 Organization \u2192 Limits \u2192 set an organization hard limit.","Set a lower hard limit on each project, especially test projects.","Add alert thresholds below the limit so you hear before it stops."],capUrl:"https://platform.openai.com/settings/organization/limits",linkChecked:!0,factStatus:"verified",verifiedOn:k,source:"https://developers.openai.com/api/docs/guides/spend-limits.md",popular:!0},{id:"anthropic",name:"Claude API (Anthropic)",category:"ai_api",billing:"usage",hardCap:"yes",capSummary:"Every tier has a monthly cap ($500 / $1,000 / $200,000) that stops requests until the 1st; you can set your own lower limit, and lower limits per workspace.",risk:"Agent loops and leaked keys; a cap stopping every app on the organization at once. The default workspace cannot have its own limit.",howTo:["Claude Console \u2192 Billing \u2192 Spend limits \u2192 Set limit (below your tier cap).","Move each project out of the default workspace into its own workspace and give it a lower spend limit.","Add email notifications at chosen spend amounts on each workspace."],capUrl:"https://platform.claude.com/settings/billing",linkChecked:!0,factStatus:"verified",verifiedOn:k,source:"https://platform.claude.com/docs/en/api/rate-limits",popular:!0},{id:"gemini",name:"Google Gemini API",category:"ai_api",billing:"usage",hardCap:"yes",capSummary:"Billing-account tier caps ($250 / $2,000 / $20K+) pause every linked project; per-project caps are experimental. Billing data lags about 10 minutes and batch jobs can run past a cap.",risk:"Stolen or public keys \u2014 including old Maps keys that can now call Gemini. $6K in 40 minutes from a key in a Vite bundle.",howTo:["Google AI Studio \u2192 Spend \u2192 set a project spend cap (needs editor, owner or admin).","Restrict API keys to the Gemini API only and rotate any key that has been in client code. The Gemini API now rejects unrestricted standard keys.","Check old Maps and Firebase keys in the same project \u2014 several 2026 bills came from keys created years before Gemini was turned on.","Google Cloud console \u2192 APIs & Services \u2192 Generative Language API \u2192 Quotas: lower requests per minute so a stolen key can\u2019t burn thousands per hour."],capUrl:"https://aistudio.google.com/",linkChecked:!0,factStatus:"verified",verifiedOn:k,source:"https://aistudio.google.com/docs/billing",popular:!0},{id:"bedrock",name:"AWS Bedrock",category:"ai_api",billing:"usage",hardCap:"partial",capSummary:"No Bedrock-specific cap; covered by AWS Budgets and Cost Anomaly Detection (which does include third-party Bedrock models). New-experience spend limits can pause top cost drivers, Bedrock included.",risk:"Testing large models on credits; when credits run out billing switches to cash with no notice ($30\u201338K case, May 2026).",howTo:["Create an AWS budget filtered to Bedrock (and to the AWS Marketplace billing entity for third-party models).","Turn on Cost Anomaly Detection \u2014 expect up to 24 h before it fires.","Watch Bedrock invocation metrics in CloudWatch for faster warning."],capUrl:"https://console.aws.amazon.com/billing/home#/budgets",linkChecked:!0,factStatus:"verified",verifiedOn:k,source:"https://docs.aws.amazon.com/cost-management/latest/userguide/manage-ad.html",popular:!0},u({id:"azure-openai",name:"Azure OpenAI",category:"ai_api",billing:"usage",hardCap:"no",capSummary:"Covered by Azure budgets, which alert only (Azure has no hard cap).",risk:w,howTo:["Create an Azure budget scoped to the resource group of your OpenAI resource."],capUrl:"https://portal.azure.com/"}),{id:"vertex",name:"Vertex AI (Agent Platform)",category:"ai_api",billing:"usage",hardCap:"yes",capSummary:"Eligible for Google Cloud spend caps: new usage in the project pauses at 100% of the budget. In-flight requests and fixed commitments still bill.",risk:w,howTo:["Billing \u2192 Budgets & alerts \u2192 create a project budget and turn on its spend cap for Agent Platform."],capUrl:"https://console.cloud.google.com/billing",linkChecked:!0,factStatus:"verified",verifiedOn:k,source:"https://docs.cloud.google.com/billing/docs/how-to/budgets-spend-caps"},{id:"openrouter",name:"OpenRouter",category:"ai_api",billing:"prepaid",hardCap:"yes",capSummary:"Hard limits on the account balance and per API key; small balances refuse requests once in-flight spend fills the budget.",risk:R,howTo:["Keys \u2192 set a credit limit on every key.","Credits \u2192 turn off auto top-up or set a low ceiling."],capUrl:"https://openrouter.ai/settings/keys",linkChecked:!1,factStatus:"third_party",verifiedOn:k,source:ve,popular:!0},u({id:"xai",name:"xAI Grok API",category:"ai_api",billing:"prepaid",risk:R,howTo:["Billing \u2192 check auto-recharge and any spending limit."],capUrl:"https://console.x.ai/",popular:!0}),u({id:"mistral",name:"Mistral AI",category:"ai_api",billing:"usage",risk:w,howTo:["Billing \u2192 look for usage limits or alerts."],capUrl:"https://console.mistral.ai/"}),u({id:"deepseek",name:"DeepSeek API",category:"ai_api",billing:"prepaid",risk:R,howTo:["Top up only what you need; check for auto top-up."],capUrl:"https://platform.deepseek.com/",popular:!0}),u({id:"groq",name:"Groq",category:"ai_api",billing:"usage",risk:w,howTo:["Settings \u2192 Billing \u2192 set a spend limit if offered."],capUrl:"https://console.groq.com/settings/billing"}),u({id:"together",name:"Together AI",category:"ai_api",billing:"usage",risk:w,howTo:["Billing \u2192 check credits, auto-recharge and limits."],capUrl:"https://api.together.ai/"}),u({id:"fireworks",name:"Fireworks AI",category:"ai_api",billing:"usage",risk:w,howTo:["Billing \u2192 check spend limits and alerts."],capUrl:"https://fireworks.ai/"}),u({id:"perplexity",name:"Perplexity API",category:"ai_api",billing:"prepaid",risk:R,howTo:["API settings \u2192 check auto top-up."],capUrl:"https://www.perplexity.ai/settings/api"}),u({id:"cohere",name:"Cohere",category:"ai_api",billing:"usage",risk:w,howTo:["Dashboard \u2192 Billing \u2192 check limits."],capUrl:"https://dashboard.cohere.com/"}),u({id:"replicate",name:"Replicate",category:"ai_api",billing:"usage",risk:"Per-second GPU billing; a long-running or looping prediction keeps charging.",howTo:["Account \u2192 Billing \u2192 look for a spend limit."],capUrl:"https://replicate.com/account/billing"}),u({id:"huggingface",name:"Hugging Face",category:"ai_api",billing:"usage",risk:"Inference endpoints bill while running, even with no traffic.",howTo:["Settings \u2192 Billing \u2192 review endpoints and set limits."],capUrl:"https://huggingface.co/settings/billing"}),{id:"cursor",name:"Cursor",category:"ai_coding",billing:"subscription_overage",hardCap:"yes",capSummary:"Spend limit on on-demand usage \u2014 but enforcement is not instant, so usage can run past it; raising the limit in the same cycle can bill that overage. Per-member limits only on Enterprise.",risk:"An agent stuck in a loop during a meeting: a team reported about $1,400 in one hour with only a high monthly limit set.",howTo:["Dashboard \u2192 Settings \u2192 set an on-demand spend limit (or turn on-demand off).","Set it below what you can afford \u2014 enforcement lags.","Don\u2019t raise the limit right after hitting it in the same cycle unless you accept the overage being billed."],capUrl:"https://cursor.com/dashboard",linkChecked:!1,factStatus:"verified",verifiedOn:k,source:"https://cursor.com/help/account-and-billing/spend-limits",popular:!0},{id:"copilot",name:"GitHub Copilot",category:"ai_coding",billing:"seat_usage",hardCap:"yes",capSummary:"Budgets can hard-stop metered AI credits (down to per user); seat-licence budgets only warn.",risk:"Premium requests and metered credits beyond the plan allowance.",howTo:["Settings \u2192 Billing and licensing \u2192 Budgets \u2192 create a budget for Copilot premium requests with 'stop usage' on."],capUrl:"https://github.com/settings/billing",linkChecked:!1,factStatus:"third_party",verifiedOn:k,source:ve,popular:!0},{id:"claude-code",name:"Claude Code",category:"ai_coding",billing:"subscription_overage",hardCap:"partial",capSummary:"On a Pro/Max/Ultra plan, usage windows are the ceiling and usage credits can have a monthly spend limit. But an ANTHROPIC_API_KEY in your shell outranks your plan: once approved (always, with -p) every request bills the API.",risk:"A forgotten ANTHROPIC_API_KEY in .zshrc or .bashrc quietly moves agent sessions from your plan to pay-per-token.",howTo:["Run /status in Claude Code \u2014 it shows which credential is in use.","If you meant to use your plan: unset ANTHROPIC_API_KEY and remove it from your shell profile.","If you use an API key on purpose: give Claude Code its own Console workspace with a low spend limit.","Using usage credits on a plan? Set a monthly spend limit in Settings \u2192 Usage."],capUrl:"https://claude.ai/settings/usage",linkChecked:!1,factStatus:"verified",verifiedOn:k,source:"https://code.claude.com/docs/en/authentication",popular:!0},u({id:"codex",name:"OpenAI Codex",category:"ai_coding",billing:"subscription_overage",capSummary:"Not verified yet \u2014 on a ChatGPT plan usage is bounded by plan limits; on an API key, OpenAI project hard limits apply.",risk:"Codex on an API key bills per token; a long autonomous task can burn far more than expected.",howTo:["Run Codex on its own OpenAI project with a low hard limit."],capUrl:"https://platform.openai.com/settings/organization/limits",popular:!0}),u({id:"windsurf",name:"Devin Desktop (was Windsurf)",category:"ai_coding",billing:"subscription_overage",risk:"Add-on credits beyond the plan allowance.",howTo:["Account \u2192 usage \u2192 check add-on credit settings."],capUrl:"https://devin.ai/"}),u({id:"replit",name:"Replit",category:"ai_coding",billing:"subscription_overage",risk:"Agent usage and deployments billed by usage beyond plan credits.",howTo:["Account \u2192 Usage \u2192 set usage alerts or limits."],capUrl:"https://replit.com/",popular:!0}),u({id:"lovable",name:"Lovable",category:"ai_coding",billing:"subscription_overage",risk:"Credit top-ups and plan overages.",howTo:["Settings \u2192 Plans & credits \u2192 check auto top-up."],capUrl:"https://lovable.dev/"}),u({id:"bolt",name:"Bolt.new",category:"ai_coding",billing:"subscription_overage",risk:"Token reloads beyond the plan.",howTo:["Settings \u2192 Subscription \u2192 check token reloads."],capUrl:"https://bolt.new/"}),u({id:"v0",name:"v0 by Vercel",category:"ai_coding",billing:"subscription_overage",risk:"Credit usage beyond the plan.",howTo:["Settings \u2192 Billing \u2192 check additional credit settings."],capUrl:"https://v0.app/"}),{id:"vercel",name:"Vercel",category:"hosting",billing:"subscription_overage",hardCap:"yes",capSummary:"Spend Management (Pro) can pause every project's production deployment when your amount is reached \u2014 only if Pause Production Deployments is on. Checked every few minutes; AI Gateway, v0 and storage keep billing.",risk:"Bot traffic on uncached routes, serverless execution and bandwidth spikes.",howTo:["Team Settings \u2192 Billing \u2192 Spend Management \u2192 set an amount.","Confirm 'Pause production deployment' is on, and add a webhook for alerts.","Know how to resume: each project is resumed by hand (dashboard or API); raising the amount does not unpause them."],capUrl:"https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fsettings%2Fbilling",linkChecked:!0,factStatus:"verified",verifiedOn:k,source:"https://vercel.com/docs/spend-management",popular:!0},u({id:"netlify",name:"Netlify",category:"hosting",billing:"subscription_overage",risk:"Bandwidth and function usage beyond plan credits.",howTo:["Team settings \u2192 Billing \u2192 check usage limits and auto-upgrade."],capUrl:"https://app.netlify.com/",popular:!0}),u({id:"cloudflare",name:"Cloudflare",category:"hosting",billing:"usage",risk:"Workers requests, Durable Objects wall time, R2 operations; a feedback loop can multiply requests.",howTo:["Billing \u2192 set usage notifications for Workers and R2."],capUrl:"https://dash.cloudflare.com/",popular:!0}),u({id:"supabase",name:"Supabase",category:"hosting",billing:"subscription_overage",risk:"Compute add-ons, egress and storage beyond plan quotas when the spend cap is off.",howTo:["Organization \u2192 Billing \u2192 check the Spend Cap toggle."],capUrl:"https://supabase.com/dashboard",popular:!0}),u({id:"firebase",name:"Firebase",category:"hosting",billing:"usage",risk:"Blaze plan reads/writes and functions; recursive function triggers are a classic runaway.",howTo:["Uses Google Cloud billing: create a budget for the Firebase project.","Restrict API keys and set App Check."],capUrl:"https://console.firebase.google.com/",popular:!0}),u({id:"render",name:"Render",category:"hosting",billing:"usage",risk:w,howTo:["Workspace \u2192 Billing \u2192 check spend limits and autoscaling caps."],capUrl:"https://dashboard.render.com/"}),u({id:"railway",name:"Railway",category:"hosting",billing:"usage",risk:w,howTo:["Workspace \u2192 Usage \u2192 set a usage limit."],capUrl:"https://railway.com/",popular:!0}),u({id:"fly",name:"Fly.io",category:"hosting",billing:"usage",risk:"Machines left running and bandwidth.",howTo:["Organization \u2192 Billing \u2192 review usage."],capUrl:"https://fly.io/dashboard"}),u({id:"neon",name:"Neon",category:"hosting",billing:"usage",risk:"Compute hours when autosuspend is off.",howTo:["Project settings \u2192 check autosuspend and compute limits."],capUrl:"https://console.neon.tech/"}),u({id:"mongodb",name:"MongoDB Atlas",category:"hosting",billing:"usage",risk:"Auto-scaling clusters and data transfer.",howTo:["Billing \u2192 set billing alerts; cap cluster auto-scaling tier."],capUrl:"https://cloud.mongodb.com/"}),u({id:"upstash",name:"Upstash",category:"hosting",billing:"usage",risk:"Pay-as-you-go commands with no ceiling unless a budget is set.",howTo:["Database \u2192 Usage \u2192 set a monthly budget."],capUrl:"https://console.upstash.com/"}),u({id:"pinecone",name:"Pinecone",category:"hosting",billing:"usage",risk:"Read/write units and storage on serverless indexes.",howTo:["Settings \u2192 Usage \u2192 check limits."],capUrl:"https://app.pinecone.io/"}),u({id:"elevenlabs",name:"ElevenLabs",category:"voice_media",billing:"subscription_overage",risk:"Usage-based billing beyond plan characters when enabled.",howTo:["Subscription \u2192 check usage-based billing and set a limit."],capUrl:"https://elevenlabs.io/app/subscription",popular:!0}),u({id:"twilio",name:"Twilio",category:"voice_media",billing:"prepaid",risk:"Auto-recharge plus SMS pumping fraud or a calling loop.",howTo:["Billing \u2192 check auto-recharge.","Usage \u2192 Triggers \u2192 create usage triggers."],capUrl:"https://console.twilio.com/",popular:!0}),u({id:"deepgram",name:"Deepgram",category:"voice_media",billing:"usage",risk:w,howTo:["Billing \u2192 check usage limits."],capUrl:"https://console.deepgram.com/"}),u({id:"assemblyai",name:"AssemblyAI",category:"voice_media",billing:"usage",risk:w,howTo:["Billing \u2192 check auto-recharge."],capUrl:"https://www.assemblyai.com/dashboard"}),u({id:"sarvam",name:"Sarvam AI",category:"voice_media",billing:"prepaid",risk:R,howTo:["Dashboard \u2192 Billing \u2192 check credits."],capUrl:"https://dashboard.sarvam.ai/"}),u({id:"vapi",name:"Vapi",category:"voice_media",billing:"prepaid",risk:"Per-minute voice agent calls stacked with model and telephony costs.",howTo:["Billing \u2192 check auto-reload and limits."],capUrl:"https://dashboard.vapi.ai/"}),u({id:"retell",name:"Retell AI",category:"voice_media",billing:"usage",risk:"Per-minute call costs; a dialing loop multiplies them.",howTo:["Billing \u2192 check limits."],capUrl:"https://www.retellai.com/"}),u({id:"livekit",name:"LiveKit Cloud",category:"voice_media",billing:"usage",risk:"Connection minutes and agent sessions beyond the plan.",howTo:["Project \u2192 Billing \u2192 check usage limits."],capUrl:"https://cloud.livekit.io/"}),u({id:"fal",name:"fal.ai",category:"voice_media",billing:"prepaid",risk:R,howTo:["Billing \u2192 check auto top-up."],capUrl:"https://fal.ai/dashboard"}),u({id:"runway",name:"Runway",category:"voice_media",billing:"subscription_overage",risk:"Credit purchases for video generation.",howTo:["Settings \u2192 Plans \u2192 check credit top-ups."],capUrl:"https://app.runwayml.com/"}),u({id:"runpod",name:"RunPod",category:"gpu",billing:"prepaid",risk:"Pods left running; auto-pay refilling credits.",howTo:["Billing \u2192 check auto-pay; stop idle pods."],capUrl:"https://www.runpod.io/console/user/billing",popular:!0}),u({id:"modal",name:"Modal",category:"gpu",billing:"usage",risk:"GPU functions scaling out under load.",howTo:["Settings \u2192 Usage \u2192 set a workspace budget."],capUrl:"https://modal.com/settings"}),u({id:"lambda",name:"Lambda Cloud",category:"gpu",billing:"usage",risk:"GPU instances billed by the hour until terminated.",howTo:["Terminate idle instances; check billing alerts."],capUrl:"https://cloud.lambda.ai/"}),u({id:"vast",name:"Vast.ai",category:"gpu",billing:"prepaid",risk:R,howTo:["Billing \u2192 check auto-recharge."],capUrl:"https://cloud.vast.ai/billing/"})];function p(e){return{factStatus:"verified",verifiedOn:lt,linkChecked:!1,...e}}var Ae={openai:p({hardCap:"yes",capSummary:"Hard monthly spend limits for the organization and each project; over-limit requests get a 429. Alerts alone do not stop traffic, and enforcement is not instant.",howTo:["Settings \u2192 Organization \u2192 Limits \u2192 set an organization hard limit.","Set a lower hard limit on each project, especially test projects.","Add alert thresholds below the limit so you hear before it stops."],capUrl:"https://platform.openai.com/settings/organization/limits",source:"https://developers.openai.com/api/docs/guides/spend-limits.md",evidence:'"When tracked spend reaches an applicable hard limit, affected API requests return a 429 error"; "Enforcement is not instantaneous, so recorded spend can slightly exceed the configured amount."',linkChecked:!0}),anthropic:p({hardCap:"yes",capSummary:"Every tier has a monthly cap ($500 / $1,000 / $200,000) that pauses requests until the 1st; you can set your own lower limit, and lower limits per workspace (not on the default workspace).",howTo:["Claude Console \u2192 Settings \u2192 Spend limits \u2192 Adjust limit / Set limit (below your tier cap).","Move each project out of the default workspace into its own workspace and give it a lower spend limit.","Add email notifications at chosen spend amounts on each workspace."],capUrl:"https://platform.claude.com/settings/spend-limits",source:"https://platform.claude.com/docs/en/api/rate-limits",evidence:`"Once you reach your tier's spend cap, API usage pauses until 00:00 UTC on the first day of the next month"; "You can't set spend limits on the default workspace."`}),gemini:p({hardCap:"yes",capSummary:"Billing-account tier caps ($250 / $2,000 / $20K+) pause every linked project; per-project caps are experimental. Billing data lags about 10 minutes and batch jobs can run past a cap.",howTo:["Google AI Studio \u2192 Spend \u2192 set a project spend cap (needs editor, owner or admin).","Restrict API keys to the Gemini API only and rotate any key that has been in client code.","Check old Maps and Firebase keys in the same project."],capUrl:"https://aistudio.google.com/",source:"https://aistudio.google.com/docs/billing",evidence:'"Monthly usage caps are enforced for the Gemini API at the billing account level."; "You can set your own project-level spend caps in AI Studio."; "Long-running tasks like batch mode completions and agent sessions may incur overages beyond your project spend cap."',linkChecked:!0}),vertex:p({hardCap:"yes",capSummary:"Eligible for Google Cloud spend caps: new usage in the project pauses at 100% of the budget. In-flight requests and persistent resources still bill.",howTo:["Billing \u2192 Budgets & alerts \u2192 create a project budget and turn on its spend cap for Agent Platform."],capUrl:"https://console.cloud.google.com/billing",source:"https://docs.cloud.google.com/billing/docs/how-to/budgets-spend-caps",evidence:'Spend caps are available for Gemini API, Gemini Enterprise Agent Platform (formerly Vertex AI), Cloud Run and Cloud Run functions; "The spend cap is enforced when your gross, estimated usage costs exceed 100% of your budget amount."',linkChecked:!0}),gcp:p({hardCap:"partial",capSummary:"Spend caps can pause one service in one project at 100% of a budget \u2014 only Gemini API, Agent Platform (Vertex AI), Cloud Run and Cloud Run functions. Everything else: budgets alert only.",howTo:["Billing \u2192 Budgets & alerts \u2192 create a budget for each project.","On the budget, turn on a spend cap for each eligible service you use.","APIs & Services \u2192 Credentials \u2192 restrict every API key to specific APIs and referrers."],capUrl:"https://console.cloud.google.com/billing",source:"https://docs.cloud.google.com/billing/docs/how-to/budgets-spend-caps",evidence:'"The spend cap is enforced when your gross, estimated usage costs exceed 100% of your budget amount." (four services only)',linkChecked:!0}),aws:p({hardCap:"partial",capSummary:"Standard accounts have no hard cap: Budgets update up to 3 times a day and Budget Actions can block new resources. Accounts on the new sign-up (Paid Plan) can set a project spend limit from $20 that pauses the project.",howTo:["Billing \u2192 Budgets \u2192 create a monthly cost budget with alerts at 50%, 80% and 100%.","Add a Budget Action that applies a deny policy at 100% (stops new resources, not running ones).","Turn on Cost Anomaly Detection.","New-experience accounts: AWS Settings \u2192 Billing \u2192 Cost by project \u2192 Set limit. A paused project left 90 days is deleted, so act on the alert."],capUrl:"https://console.aws.amazon.com/billing/home#/budgets",source:"https://docs.aws.amazon.com/accounts/latest/reference/create-spend-limit.html",evidence:'"If your usage in a project reaches its limit, AWS pauses that project which stops its resources"; "If you take no action within 90 days of your project being paused, AWS permanently deletes your project data."',linkChecked:!0}),bedrock:p({hardCap:"partial",capSummary:"No Bedrock-specific cap. Cost Anomaly Detection covers third-party Bedrock models but can take up to 24 hours; AWS Budgets handle other Marketplace charges. New-experience (Paid Plan) project spend limits can pause top cost drivers, Bedrock included, and pause the whole project at the limit.",howTo:["Create an AWS budget filtered to Bedrock (and to the AWS Marketplace billing entity for third-party models).","Turn on Cost Anomaly Detection \u2014 expect up to 24 h before it fires.","New-experience accounts: set a project spend limit and turn on Pause top cost drivers.","Watch Bedrock invocation metrics in CloudWatch for faster warning."],capUrl:"https://console.aws.amazon.com/billing/home#/budgets",source:"https://docs.aws.amazon.com/accounts/latest/reference/create-spend-limit.html",evidence:'"At this time, we select the resources from these five services: EC2, RDS, Lambda, Bedrock, and SageMaker."; Cost Anomaly Detection: "it can take up to 24 hours to detect an anomaly after a usage occurs" and covers "third-party foundation models on Amazon Bedrock".'}),azure:p({hardCap:"no",capSummary:"Pay-as-you-go has no spending limit and no custom limit can be set; budgets alert only. Free and credit subscriptions stop at the credit amount.",howTo:["Cost Management \u2192 Budgets \u2192 create a monthly budget with alert thresholds.","Attach an action group so alerts reach email, SMS or a webhook."],capUrl:"https://portal.azure.com/",source:"https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/tutorial-acm-create-budgets",evidence:`"Notifications are triggered when the budget thresholds are exceeded. Resources aren't affected, and your consumption isn't stopped."`,linkChecked:!0}),"azure-openai":p({hardCap:"no",capSummary:"Covered by Azure budgets, which alert only: Microsoft says resources aren't affected and consumption isn't stopped. Budgets can be scoped to the resource group of your OpenAI resource.",howTo:["Create an Azure budget scoped to the resource group of your OpenAI resource.","Attach an action group so the alert reaches you (and any automation you build)."],capUrl:"https://portal.azure.com/",source:"https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/tutorial-acm-create-budgets",evidence:`"Notifications are triggered when the budget thresholds are exceeded. Resources aren't affected, and your consumption isn't stopped." (Azure OpenAI has no spend-limit page of its own; this is the budgets page it falls under.)`}),openrouter:p({hardCap:"yes",capSummary:"An optional credit limit on each API key blocks requests once spent; org admins can also set guardrail and workspace budgets. An account balance that goes negative makes requests fail.",howTo:["Keys \u2192 set a credit limit on every key.","Check the remaining limit with GET /api/v1/key (limit, limit_reset, limit_remaining).","Keep the account balance low and add credits on demand."],capUrl:"https://openrouter.ai/settings/keys",source:"https://openrouter.ai/docs/api-reference/limits",evidence:'"Per-key credit limits, an optional spending cap configured on an individual API key." (auto top-up is not mentioned on this page)'}),xai:p({hardCap:"yes",capSummary:"Prepaid credits: with the default $0 invoiced billing limit, requests are rejected once credits run out. Auto top-up can have a monthly cap.",howTo:["Billing \u2192 keep the invoiced billing limit at $0 (the default).","If you use auto top-up, set the monthly cap on top-up spending."],capUrl:"https://console.x.ai/",source:"https://docs.x.ai/docs/key-information/billing",evidence:'"Your API requests will be automatically rejected once your prepaid credits are depleted."'}),mistral:p({hardCap:"yes",capSummary:"Organization and workspace monthly spending limits; at the limit API access is suspended until next month or an admin raises it. Workspaces have no cap by default.",howTo:["Admin Panel \u2192 Administration \u2192 Workspaces \u2192 pick a workspace \u2192 Settings \u2192 Monthly spending limit.","Set an organization limit too (a workspace limit cannot exceed it)."],capUrl:"https://console.mistral.ai/",source:"https://docs.mistral.ai/admin/workspaces/usage-limits",evidence:'"API access for that Workspace is suspended until the next month begins or an admin increases the limit."'}),groq:p({hardCap:"yes",capSummary:"Organization-wide monthly spend limit (paid plan, owner only); at the cap every key returns 400 blocked_api_access. Spend tracking lags 10-15 minutes.",howTo:["Settings \u2192 Billing \u2192 Limits \u2192 add a monthly dollar limit.","Expect slight overshoot because of the tracking delay."],capUrl:"https://console.groq.com/settings/billing",source:"https://console.groq.com/docs/spend-limits",evidence:'"API calls from any key in your organization will return a 400 with code `blocked_api_access`."; "There\'s a 10-15 minute delay in spend tracking."'}),together:p({hardCap:"partial",capSummary:"Prepaid only: API access stops when the balance reaches zero, but there are no per-key or per-project caps and auto-recharge keeps buying credits. Budgets are planned, not available.",howTo:["Keep auto-recharge off, or set a low target balance.","A card default enables auto-recharge; an ACH default turns it off."],capUrl:"https://api.together.ai/",source:"https://docs.together.ai/docs/billing-spend-controls",evidence:`"API access stops when your organization's balance reaches zero and resumes after you add credits."; "The cut-off does not guarantee an exact spending cap."; "API keys do not currently support independent spending limits."`}),fireworks:p({hardCap:"yes",capSummary:"Monthly spend limit: at 100% all API requests pause across serverless, deployments and training. Does not apply to Enterprise accounts.",howTo:["firectl quota update monthly-spend-usd --value <AMOUNT>","Raise the limit to resume; adding credits does not change it."],capUrl:"https://fireworks.ai/",source:"https://docs.fireworks.ai/guides/quotas_usage/account-quotas",evidence:'"When usage reaches 100% of the limit, all API requests pause automatically across serverless inference, deployments, and training."; "The suspension behavior described here does not apply to Enterprise accounts."'}),perplexity:p({hardCap:"partial",capSummary:"Prepaid credits: keys are blocked when credits run out, but auto reload is available and no spend-limit setting is documented.",howTo:["Billing \u2192 leave Auto reload off (or set a small threshold)."],capUrl:"https://www.perplexity.ai/settings/api",source:"https://docs.perplexity.ai/docs/getting-started/projects",evidence:'"If you run out of credits, your API keys will be blocked until you add to your credit balance."'}),replicate:p({hardCap:"partial",capSummary:"Prepaid credit: at zero Replicate stops new work and shuts down infrastructure, but a running prediction can overrun and is billed at month end. The monthly spend limit was deprecated.",howTo:["Keep auto reload off or at a low preset.","Cap deployment instances to bound spend."],capUrl:"https://replicate.com/account/billing",source:"https://replicate.com/docs/topics/billing/prepaid-credit",evidence:'"As soon as your balance hits zero, we will prevent any new work from starting"; changelog: "The ability to set a monthly spend limit on your account has been deprecated."'}),huggingface:p({hardCap:"partial",capSummary:"Team and Enterprise organization admins can set a spending limit for Inference Providers; no limit is documented for personal accounts, and the Inference Endpoints pricing page mentions no spend cap.",howTo:["Organization settings \u2192 set a spending limit (Team or Enterprise).","Pause Inference Endpoints you are not using."],capUrl:"https://huggingface.co/settings/billing",source:"https://huggingface.co/docs/inference-providers/pricing",evidence:`"Team & Enterprise organization administrators can also set a spending limit and disable a set of Inference Providers from the organization's settings."`}),cursor:p({hardCap:"yes",capSummary:"Spend limit on on-demand usage: additional usage stops at the limit, but enforcement is not instant; raising the limit in the same cycle can bill the overage on legacy plans.",howTo:["Dashboard \u2192 Settings \u2192 set an on-demand spend limit (or turn on-demand off).","Set it below what you can afford \u2014 enforcement lags.","Don't raise the limit right after hitting it in the same cycle unless you accept the overage being billed."],capUrl:"https://cursor.com/dashboard",source:"https://cursor.com/help/account-and-billing/spend-limits",evidence:'"When a limit is reached, additional usage stops for that user until the limit is increased or the next period starts."; "Enforcement is not instant, so usage can briefly exceed your spend limit."'}),copilot:p({hardCap:"partial",capSummary:"Budgets can stop usage for metered products such as Copilot AI credits; budgets on licence-based Copilot only alert.",howTo:["Settings \u2192 Billing and licensing \u2192 Budgets \u2192 create a budget for Copilot AI credits with 'stop usage when the limit is reached' on."],capUrl:"https://github.com/settings/billing",source:"https://docs.github.com/en/billing/concepts/budgets-and-alerts",evidence:'Budgets on metered products (including Copilot AI credits) can "prevent usage once the budget threshold is reached"; for license-based products a budget "does not prevent usage over the budget amount but does provide alerts."'}),"claude-code":p({hardCap:"partial",verifiedOn:k,capSummary:"On a Pro/Max/Ultra plan, usage windows are the ceiling and usage credits can have a monthly spend limit. But an ANTHROPIC_API_KEY in your shell outranks your plan: once approved (always, with -p) every request bills the API.",howTo:["Run /status in Claude Code \u2014 it shows which credential is in use.","If you meant to use your plan: unset ANTHROPIC_API_KEY and remove it from your shell profile.","If you use an API key on purpose: give Claude Code its own Console workspace with a low spend limit.","Using usage credits on a plan? Set a monthly spend limit in Settings \u2192 Usage."],capUrl:"https://claude.ai/settings/usage",source:"https://code.claude.com/docs/en/authentication",evidence:"Read 2026-11-03, not re-read in this refresh: credential precedence puts ANTHROPIC_API_KEY above the subscription login."}),replit:p({hardCap:"yes",capSummary:"Usage limits cap spend beyond monthly credits; at the limit usage-based services are blocked. A separate service-shutdown limit suspends services.",howTo:["Settings \u2192 Usage \u2192 Manage limits (Account usage).","Organizations: Usage page \u2192 Manage limits (admin or owner)."],capUrl:"https://replit.com/usage",source:"https://docs.replit.com/billing/managing-spend",evidence:'"When you reach your limit, usage-based services are blocked until the next billing cycle or until you increase the limit."'}),vercel:p({hardCap:"yes",capSummary:"Spend Management (Pro) can pause production deployments for the team or one project when the budget is reached, only if Pause production deployments is on. Checked every few minutes; AI Gateway and v0 usage keeps billing and storage charges continue.",howTo:["Team Settings \u2192 Billing \u2192 Spend Management \u2192 Add Budget (Team or Project).","Turn on Pause production deployments and add a webhook for alerts. CLI: vercel billing budgets set --amount 200 --pause","Know how to resume: each project is resumed by hand (dashboard or API); raising the amount does not unpause them."],capUrl:"https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fsettings%2Fbilling",source:"https://vercel.com/docs/spend-management",evidence:'"Setting a budget does not stop usage on its own. To stop incurring costs above the budget amount, turn on Pause production deployments"; "Pausing only affects production deployments. It does not stop AI Gateway API key usage or v0 usage billed to your team."',linkChecked:!0}),netlify:p({hardCap:"partial",capSummary:"Credit-based plans: when monthly credits are used up all web projects are paused (auto recharge is off by default). The FAQ describes no general hard spending limit, only an AI-feature usage limit.",howTo:["Usage & billing \u2192 Configure auto recharge \u2192 Disabled (Team Owner).","Set the AI feature usage limit for the team."],capUrl:"https://app.netlify.com/",source:"https://docs.netlify.com/manage/accounts-and-billing/billing/billing-for-credit-based-plans/billing-faq-for-credit-based-plans/",evidence:'"Once your monthly credit allotment is used up for all web projects on your team, all of your web projects (sites/apps) are paused"; the FAQ answer on a hard spending limit lists workarounds only.'}),cloudflare:p({hardCap:"partial",capSummary:"Spend Management limits block Workers and Durable Objects once the monthly limit is reached; other products are not covered yet. Blocking is not instant and a limit does not guarantee a maximum invoice.",howTo:["Dashboard \u2192 Billing \u2192 Spend Management.","Workers or Durable Objects row \u2192 Edit the spending limit \u2192 Monthly limit (USD) \u2192 Save limit \u2192 confirm it is On.","Add a notification email through the cf CLI; dashboard limits have none by default."],capUrl:"https://dash.cloudflare.com/",source:"https://developers.cloudflare.com/billing/manage/spend-management/",evidence:'"Cloudflare blocks supported operations until the next billing period or until you change the limit."; "A limit does not guarantee a maximum invoice amount."; "Support for more products is coming soon."'}),supabase:p({hardCap:"partial",capSummary:"Spend Cap (Pro plan) stops usage past quota for covered items such as egress, storage and monthly active users; compute, IPv4, custom domain and point-in-time recovery are not covered.",howTo:["Organization \u2192 Billing \u2192 Cost Control \u2192 turn on Spend Cap.","Remember compute add-ons still bill with the cap on."],capUrl:"https://supabase.com/dashboard/org/_/billing",source:"https://supabase.com/docs/guides/platform/cost-control",evidence:"Once a covered usage item exceeds its quota, further use of that item stops until the next billing cycle; not covered: compute, branching compute, read replica compute, custom domain, IPv4, point-in-time recovery."}),firebase:p({hardCap:"partial",capSummary:"Service-level spend caps pause Firebase AI Logic, App Hosting, Cloud Functions and Extensions at 100% of a budget; other services (Firestore, Storage...) have none, and the page says caps are not hard caps.",howTo:["Project \u2192 Settings \u2192 Usage and billing \u2192 Details & settings \u2192 Service-level spend caps \u2192 pick a service \u2192 enter a monthly amount \u2192 Configure.","Set the budget below your real limit; enforcement lags several minutes.","Restrict API keys and set App Check."],capUrl:"https://console.firebase.google.com/",source:"https://firebase.google.com/docs/projects/billing/spend-caps",evidence:'"Cloud Billing pauses that service for the rest of the month."; "Spend caps are not "hard caps"."'}),railway:p({hardCap:"yes",capSummary:"Usage hard limit: when billing-cycle usage hits it, all workloads are taken offline. A separate agent hard limit exists. Reminders at 75/90/100%.",howTo:["Workspace Usage page \u2192 set the hard limit (workspace admin).","CLI: railway usage limit set."],capUrl:"https://railway.com/",source:"https://docs.railway.com/pricing/cost-control",evidence:'"Once your resource usage hits the specified hard limit, all your workloads will be taken offline"'}),runpod:p({hardCap:"partial",capSummary:"Prepaid balance: at $0 all running Pods stop (Pods without a network volume are terminated). Auto-pay can refill it; a default $80/hour spend limit exists but is not user-set.",howTo:["Billing \u2192 keep auto-pay off or set a low reload amount.","Use network volumes so data survives a stop."],capUrl:"https://www.runpod.io/console/user/billing",source:"https://docs.runpod.io/accounts-billing/billing",evidence:'"When your balance reaches $0, Runpod automatically stops all of your running Pods."; "Runpod accounts have a default spend limit of $80 per hour across all resources."'}),digitalocean:p({hardCap:"partial",capSummary:"Spend alerts notify only, except Serverless Inference model access keys (public preview): an alert can pause a key at 100% of its budget. Droplets and other resources have no cap.",howTo:["Billing \u2192 Spend alerts \u2192 create alerts.","For Serverless Inference keys, turn on pause at 100% of the budget."],capUrl:"https://cloud.digitalocean.com/account/billing",source:"https://docs.digitalocean.com/products/billing/",evidence:'"have the alert pause the key when its spend reaches 100% of its budget" (Serverless Inference only, public preview)'}),modal:p({hardCap:"yes",capSummary:"Workspace spend limit: when it is reached Modal stops workloads that would incur out-of-pocket charges; workspace and environment budgets are separate caps on total usage. Only Owners and Managers can set them.",howTo:["Settings \u2192 Usage & Billing \u2192 set the spend limit.","Add an environment budget for each non-production environment (Team and Enterprise)."],capUrl:"https://modal.com/settings",source:"https://modal.com/docs/guide/budgets",evidence:'"When the spend limit is reached, Modal stops workloads that would incur additional out-of-pocket charges."'}),lovable:p({hardCap:"yes",capSummary:"Owners and admins (paid plan) can set blocking usage limits per workspace, project, user, group or access token; at the limit the affected usage stops. Usage is recorded before limits are checked, so it can slightly overshoot. Adding credits does not lift a block.",howTo:["Workspace settings \u2192 Usage limits & alerts \u2192 create a limit with Block all usage.","Scope Run-credit caps to a project or the workspace (user limits only count Build credits).","Set the auto top-up monthly credit limit instead of leaving it at No limit."],capUrl:"https://lovable.dev/",source:"https://docs.lovable.dev/features/usage-limits-and-alerts",evidence:'"When a blocking limit is reached, the affected usage stops."; "Usage is recorded before limits are evaluated, so usage can slightly exceed a hard limit before the block takes effect."'}),retell:p({hardCap:"yes",capSummary:"Optional monthly spending limit: at 100% calls and API requests pause until you raise it or the next UTC month. Leaving it off means no cap. Auto recharge can refill credits; at zero credits usage stops.",howTo:["Billing \u2192 set a monthly spending limit.","Keep Auto recharge off or set the trigger low."],capUrl:"https://www.retellai.com/",source:"https://docs.retellai.com/accounts/billing",evidence:'"At 100%, calls and API requests pause."; "Leave it off for no cap and no spending emails."; "When your credit balance reaches zero, calls, chat, and other usage stop"'}),codex:p({hardCap:"partial",capSummary:"On a ChatGPT plan, Codex usage is bounded by plan usage limits and extra use needs credits you buy yourself (the page mentions no automatic purchase and no credit spend cap). Codex on an API key is billed separately at API rates, so the OpenAI project hard limit applies there.",howTo:["Use Codex on a ChatGPT plan rather than an API key for a bounded bill.","If you run it on an API key, give it its own OpenAI project with a low hard limit."],capUrl:"https://platform.openai.com/settings/organization/limits",source:"https://learn.chatgpt.com/docs/pricing",evidence:'"Plus and Pro users who reach their usage limit can purchase additional credits to continue working"; the page mentions no automatic credit purchase and no credit spend cap. (developers.openai.com/codex/pricing redirects here)'}),render:p({hardCap:"partial",capSummary:"Only build pipeline minutes have a spend limit: when it is reached Render stops pipeline tasks, including service builds, for the rest of the month. The page describes no cap on compute, storage or bandwidth.",howTo:["Workspace Settings \u2192 Build Pipeline \u2192 set a monthly spend limit for pipeline minutes.","Cap instance counts and plan sizes yourself; no spend cap exists for compute."],capUrl:"https://dashboard.render.com/",source:"https://render.com/docs/build-pipeline",evidence:'"You can set a maximum amount to spend on pipeline minutes each month."; "Render stops running pipeline tasks (including service builds!) for the remainder of the current month."'}),neon:p({hardCap:"partial",capSummary:"Per-project consumption limits, set through the API, suspend all computes in the project when a compute, storage or data-transfer quota is met, until the next billing period or a raise. Spend notifications are email alerts only. Plan availability is not stated.",howTo:["Update the project via the API with a quota object (an update replaces the whole object).","Set a max autoscaling limit on computes.","Add spend notifications as a warning, not a stop."],capUrl:"https://console.neon.tech/",source:"https://neon.com/docs/guides/consumption-limits",evidence:`"all active computes for that project are automatically suspended."; spend notifications are "email alerts when your organization's total monthly charges approach a dollar amount, without stopping usage."`}),upstash:p({hardCap:"partial",capSummary:"Pay-as-you-go databases can have a monthly budget: at the budget the database is rate-limited rather than continuing to bill. Budgets are per database, there is no account-wide budget, and the per-database surplus charge is not covered.",howTo:["Database \u2192 Usage tab \u2192 Change Budget (per database).","Set it on every pay-as-you-go database."],capUrl:"https://console.upstash.com/",source:"https://upstash.com/docs/redis/overall/billing",evidence:'"When the budget is reached the database is rate-limited rather than continuing to bill."; "there is no account-wide budget."'}),pinecone:p({hardCap:"partial",capSummary:"No spend limit or budget setting. Builder plan usage beyond its limits is blocked, and Starter and Builder reads are blocked once the egress allowance is reached; Standard and Enterprise bill overage and reads continue.",howTo:["Stay on a plan whose limits block rather than bill if you need a ceiling.","On Standard, track usage yourself; nothing stops overage."],capUrl:"https://app.pinecone.io/",source:"https://docs.pinecone.io/guides/manage-cost/understanding-cost",evidence:'"additional usage beyond Builder limits is blocked rather than billed."'}),vast:p({hardCap:"partial",capSummary:"Prepaid balance: at zero or below your instances are stopped (storage keeps billing). With a saved card the balance is charged to cover the negative amount; without a card instances and data are destroyed. Autobilling tops up from a card.",howTo:["Billing \u2192 keep autobilling off or set the threshold near your daily spend.","Set a low-balance email alert."],capUrl:"https://cloud.vast.ai/billing/",source:"https://docs.vast.ai/guides/reference/billing",evidence:'"Your instances are stopped automatically."; "Your credit card will be periodically and automatically charged to cover any negative balance."'}),assemblyai:p({hardCap:"partial",capSummary:"Prepaid balance: without auto-pay, API access is restricted when the balance hits $0 or goes negative. Auto-pay refills from your card; no spend cap is described, only low-balance alerts.",howTo:["Workspace \u2192 Settings \u2192 Billing \u2192 turn auto-pay off, or set a low target balance.","Workspace \u2192 Settings \u2192 Alerts \u2192 set a low-balance alert."],capUrl:"https://www.assemblyai.com/dashboard",source:"https://www.assemblyai.com/docs/billing-and-pricing",evidence:'"When your balance hits $0 or goes negative without auto-pay, your API access is restricted until you add funds."'}),sarvam:p({hardCap:"partial",capSummary:"Credits are one prepaid balance per organisation; when it is empty requests fail with 402 until you top up. The page documents no spend limit or budget and does not mention auto-recharge.",howTo:["Settings \u2192 Billing \u2192 top up only what you need.","Use a separate organisation to cap a project's spend (no per-workspace budgets)."],capUrl:"https://dashboard.sarvam.ai/",source:"https://docs.sarvam.ai/api/getting-started/ratelimits",evidence:`"API requests fail with 402 (insufficient_quota_error)" when "the organisation's credit balance is empty".`}),windsurf:p({hardCap:"partial",capSummary:"Add-on credits are used after monthly prompt credits; automatic refills (below 15 credits) are subject to a maximum monthly budget cap, $160 by default. The page does not say what happens when no add-on credits are left.",howTo:["Plan settings \u2192 set the maximum monthly refill budget (default $160) and lower it.","Turn auto-refill off if you want usage to stop at the plan allowance."],capUrl:"https://devin.ai/",source:"https://docs.devin.ai/desktop/accounts/usage",evidence:'"Refills are subject to maximum monthly budget caps ($160 by default)."'}),livekit:p({hardCap:"partial",capSummary:"On the free Build plan the included allowances are hard caps: new requests fail with no overage charge. On paid plans usage past the allowance is billed at the published rate, and the page mentions no spend cap.",howTo:["Stay on Build for a hard ceiling.","On paid plans, watch usage in the dashboard (Settings \u2192 Project); nothing stops overage."],capUrl:"https://cloud.livekit.io/",source:"https://docs.livekit.io/deploy/admin/quotas-and-limits/",evidence:`Free Build allowances are "a hard cap"; paid: "usage beyond the included allowance is billed incrementally at the plan's published rate."`}),runway:p({hardCap:"partial",capSummary:"Each API usage tier has a maximum monthly spend: the most credits that can be purchased in any 30-day window ($100 at Tier 1 up to $100,000 at Tier 5). The page does not say what happens when credits reach zero.",howTo:["Billing \u2192 autobilling: set a high 'recharge below' only if you want refills.","Stay on a low tier to keep the monthly purchase ceiling low."],capUrl:"https://app.runwayml.com/",source:"https://docs.dev.runwayml.com/usage/autobilling/",evidence:'"Each usage tier specifies a maximum monthly spend amount."; "This is the maximum number of credits that can be purchased in any 30 day window."'}),deepseek:{capSummary:"Checked 2026-11-15: the pricing page says fees come out of the topped-up balance but not what happens at zero, and mentions no auto top-up or spend limit. Unknown."},cohere:{capSummary:"Checked 2026-11-15: the rate-limits page says nothing about a spend limit or billing cap. Unknown."},oracle:{capSummary:"Checked 2026-11-15: Oracle calls budgets soft limits that email alerts; no page found that stops spend. Unknown."},hetzner:{capSummary:"Checked 2026-11-15: each server's bill never exceeds its monthly price cap, but the billing FAQ describes no account-wide spending limit and says alerts do not stop usage. Unknown."},linode:{capSummary:"Checked 2026-11-15: the billing FAQ describes a credit limit that triggers an invoice, not a spend limit or budget. Unknown."},fly:{capSummary:"Checked 2026-11-15: Fly's cost-management page describes no spending limit, says free allowances do not cap your bill and that billing alerts are not supported (yet). Not stated as a hard 'no', so unknown."},mongodb:{capSummary:"Checked 2026-11-15: the Atlas billing page describes billing alerts only; no spend cap and no stop is described. The Flex cost page was not opened. Unknown."},vapi:{capSummary:"Checked 2026-11-15: the pay-as-you-go page does not say what happens at $0 or mention a spend cap (a related page was only seen as a link). Unknown."},fal:{capSummary:"Checked 2026-11-15: fal's pricing page says credits are prepaid but not what happens at zero, and mentions no auto top-up or spending limit. Unknown."},lambda:{capSummary:"Checked 2026-11-15: Lambda's billing page mentions no spending limit, alert or zero-balance behaviour. Unknown."},bolt:{capSummary:"Checked 2026-11-15: Bolt's tokens page says reloads are manual and mentions no spend cap; what happens at zero on paid plans is not stated. Unknown."},elevenlabs:{capSummary:"Checked 2026-11-15: Pay As You Go has an optional monthly spend cap (off by default) but the page does not say what happens when it is reached. Unknown."}},dt=ct.map(e=>Ae[e.id]?{...e,...Ae[e.id]}:e);var ut=/^(?:claude|gpt|gemini)-[a-z2-7]{13}$/;function se(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;let t=e;return t.watermark?!0:Array.isArray(t.ids)&&t.ids.length===1&&typeof t.ids[0]=="string"&&ut.test(t.ids[0])&&typeof t.date=="string"&&t.date<S}var pt="https://ouchbill.com/api/table";function Se(e,t,o,a){let r=ee(e.filter(s=>!se(s))),i=new Map(t.map(s=>[`${s.product}|${s.cycle}`,s]));return{retirementsChecked:o,eolChecked:a,findRetiring:s=>r(s),findEolRow:(s,d)=>i.get(`${s}|${d}`),sourceFor:s=>Object.prototype.hasOwnProperty.call(U,s)?U[s]:pt}}var kt="https://ouchbill.com/api/table",ce="https://registry.npmjs.org/ouchbill-data/latest",wt="ouchbillTable",vt=1,Pe="table.json",B=1440*60*1e3,At=7*B,St=B,Re=2*1024*1024,xt={"table-2026-12-06":["-----BEGIN PUBLIC KEY-----","MCowBQYDK2VwAyEAHXWAxtUNqNu5dgfBZW0OMZRkJrPu/acLlKfWEBEk4oY=","-----END PUBLIC KEY-----"].join(`
5
+ `)},de=/^obt_[A-Za-z0-9_-]{43}$/,W=class extends Error{constructor(o){super(`HTTP ${o}`);this.status=o}status},y=e=>({ok:!1,reason:e}),j=e=>typeof e=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(e)&&!Number.isNaN(Date.parse(`${e}T00:00:00Z`)),A=e=>typeof e=="string";var D=e=>e&&typeof e=="object"&&!Array.isArray(e)?e:null,Ie=/^[A-Za-z0-9][A-Za-z0-9._:@/-]{0,99}$/,Ct=/^[a-z][a-z0-9-]{1,30}$/,Tt=/^[a-z0-9][a-z0-9.-]{0,39}$/,Pt=/^[A-Za-z0-9][A-Za-z0-9._-]{0,39}$/,Rt=200,xe=5e3,It=new Set([...ae,...H.map(e=>e.source),...Object.values(U)].map(e=>new URL(e).hostname)),Et=30*B,Ce=e=>Array.isArray(e)&&e.length>0&&e.length<=Rt&&e.every(t=>A(t)&&Ie.test(t));function _t(e){if(!K(e,300)||!/^https:\/\/\S+$/.test(e))return!1;try{let t=new URL(e);return t.protocol==="https:"&&t.username===""&&t.password===""&&t.port===""&&It.has(t.hostname)}catch{return!1}}function Ut(e){return K(e,120)&&/^[ -~]+$/.test(e)&&!/\]\(|!\[|:\/\/|www\./i.test(e)}function jt(e){let t=D(e);return!!t&&A(t.vendor)&&Ct.test(t.vendor)&&Ce(t.ids)&&j(t.date)&&Ut(t.replacement)&&j(t.announced)&&(t.related===void 0||Array.isArray(t.related)&&(t.related.length===0||Ce(t.related)))&&(t.routesTo===void 0||A(t.routesTo)&&Ie.test(t.routesTo))}function Ot(e){let t=D(e);return!!t&&A(t.product)&&Tt.test(t.product)&&A(t.cycle)&&Pt.test(t.cycle)&&j(t.date)&&_t(t.source)&&j(t.checked)&&(t.note===void 0||K(t.note,300))}function Ee(e,t,o){let a=D(e);if(!a||!A(a.payload)||!A(a.signature)||!A(a.keyId))return y("not a signed table");if(a.payload.length>Re)return y("table too large");if(!Object.prototype.hasOwnProperty.call(t,a.keyId))return y(`unknown signing key "${a.keyId.slice(0,40)}"`);let r=Buffer.from(a.signature,"base64"),i=!1;try{i=r.length===64&&mt(null,Buffer.from(a.payload,"utf8"),gt(t[a.keyId]),r)}catch{i=!1}if(!i)return y("signature does not verify");let s;try{s=D(JSON.parse(a.payload))}catch{return y("payload is not JSON")}if(!s)return y("payload is not an object");if(s.version!==vt)return y(`unknown table version ${String(s.version)}`);let d=A(s.issuedAt)?Date.parse(s.issuedAt):NaN,c=A(s.expiresAt)?Date.parse(s.expiresAt):NaN;if(Number.isNaN(d)||Number.isNaN(c))return y("table has no valid dates");if(c<=o.getTime())return y(`table expired on ${String(s.expiresAt).slice(0,10)}`);if(d>o.getTime()+St)return y("table is dated in the future");if(c-d>Et)return y("table claims a validity longer than 30 days");if(!j(s.retirementsChecked)||!j(s.eolChecked))return y("table has no checked dates");if(!Array.isArray(s.retirements)||s.retirements.length>xe||!s.retirements.every(jt))return y("retirement rows are malformed");if(!Array.isArray(s.eol)||s.eol.length>xe||!s.eol.every(Ot))return y("end-of-life rows are malformed");if(s.retirementsChecked<S||s.eolChecked<b)return y("table is older than the bundled snapshot");let g=s.retirements.filter(l=>!$t(l));return{ok:!0,value:{doc:{payload:a.payload,signature:a.signature,keyId:a.keyId},issuedAt:new Date(d).toISOString(),retirementsChecked:s.retirementsChecked,eolChecked:s.eolChecked,retirements:g,eol:s.eol}}}var $t=e=>se(e),_e=(e,t,o)=>{let a=e<t?e:t;return Math.max(0,Math.floor((o.getTime()-Date.parse(`${a}T00:00:00Z`))/B))};function le(e,t,o,a){return{source:e,issuedAt:t.issuedAt,ageDays:_e(t.retirementsChecked,t.eolChecked,o),retirementsChecked:t.retirementsChecked,eolChecked:t.eolChecked,retirements:t.retirements,eol:t.eol,...a?{warning:a}:{}}}function Ue(e,t){let o=_e(S,b,e),a=S<b?S:b;return{source:"bundled",issuedAt:null,ageDays:o,retirementsChecked:S,eolChecked:b,retirements:Q,eol:H,warning:`Using the tables bundled with this version, last checked ${a} (${o} day${o===1?"":"s"} ago)`+(t?`; live tables unavailable: ${t}.`:".")}}async function Dt(e,t,o){let a;try{a=await ft(Te.join(e,Pe),"utf8")}catch{return y("no cache")}try{return Ee(JSON.parse(a),t,o)}catch{return y("cache is not JSON")}}async function Bt(e,t){await ht(e,{recursive:!0});let o=Te.join(e,Pe),a=`${o}.${process.pid}.${Date.now()}.tmp`;await bt(a,JSON.stringify(t),"utf8"),await yt(a,o)}async function zt(e,t){let o=e.url??kt,a={accept:"application/json","user-agent":`ouchbill/${e.clientVersion??"dev"}`};if(e.tableKey!==void 0){if(new URL(o).protocol!=="https:")throw new Error("table URL is not https; the key was not sent");if(!de.test(e.tableKey))throw new Error("the data feed key is not in the obt_ format; it was not sent");a.authorization=`Bearer ${e.tableKey}`}let r=await t(o,{method:"GET",headers:a,redirect:"error",signal:AbortSignal.timeout(e.timeoutMs??5e3)});if(r.status===401||r.status===403)throw new W(r.status);if(!r.ok)throw new Error(`HTTP ${r.status}`);let i=await r.text();if(i.length>Re*2)throw new Error("response too large");let s=JSON.parse(i);return o===ce?D(s)?.[wt]:s}async function Lt(e,t){let o=e.publicKeys??xt,a=await Dt(e.cacheDir,o,t),r=a.ok&&t.getTime()-Date.parse(a.value.issuedAt)<(e.freshMs??At);if(a.ok&&r)return le("cache",a.value,t);let i=null;if(e.allowNetwork&&e.fetch)try{let s=Ee(await zt(e,e.fetch),o,t);if(!s.ok)i=s.reason;else if(a.ok&&s.value.issuedAt<a.value.issuedAt)i="server sent an older table than the cached one (refused)";else{let d;try{await Bt(e.cacheDir,s.value.doc)}catch{d="Live tables loaded, but the cache could not be written; the next run will fetch again."}return le("live",s.value,t,d)}}catch(s){i=s instanceof W?`the server refused the data feed key (HTTP ${s.status})`:`could not reach the server (${s instanceof Error?s.message.slice(0,80):"error"})`}else i="network refresh is off";if(a.ok){let s=Math.floor((t.getTime()-Date.parse(a.value.issuedAt))/B);return le("cache",a.value,t,`Using cached tables from ${s} days ago; refresh failed: ${i}.`)}return Ue(t,i)}async function je(e){let t=e.now??new Date;try{return await Lt(e,t)}catch(o){return Ue(t,`unexpected error (${o instanceof Error?o.message.slice(0,80):"error"})`)}}var G={openai:"https://platform.openai.com/settings/organization/billing",anthropic:"https://console.anthropic.com/settings/billing",groq:"https://console.groq.com/settings/billing",mistral:"https://admin.mistral.ai/organization/billing",gemini:"https://aistudio.google.com/usage",xai:"https://console.x.ai",together:"https://api.together.ai/settings/billing",deepgram:"https://console.deepgram.com"},x=e=>{let t=typeof e=="string"?Number(e):e;return typeof t=="number"&&Number.isFinite(t)?t:null},Oe=e=>typeof e=="string"&&/^[A-Z]{3}$/.test(e)?e:"",T=(e,t="USD")=>t==="USD"?`$${e.toFixed(2)}`:`${e.toFixed(2)} ${t}`,I=e=>e&&typeof e=="object"&&!Array.isArray(e)?e:null;function Nt(e){let t=new URL(e);if(t.protocol!=="https:"||!Ht.includes(t.hostname)||t.port!==""||t.username!==""||t.password!=="")throw new Error("refused: not a provider host")}async function $e(e,t){Nt(t.url);let o=await e(t.url,{method:"GET",headers:{...t.headers,accept:"application/json","user-agent":"ouchbill-keys"},redirect:"error",signal:AbortSignal.timeout(8e3)}),a=null;if(o.ok){let r=await o.text();if(r.length<2e6)try{a=JSON.parse(r)}catch{a=null}}return{status:o.status,body:a}}var E=e=>({authorization:`Bearer ${e}`});function Mt(e){let t=e.secret;switch(e.provider){case"openai":return{url:"https://api.openai.com/v1/models",headers:E(t)};case"anthropic":return{url:"https://api.anthropic.com/v1/models",headers:{"x-api-key":t,"anthropic-version":"2023-06-01"}};case"openrouter":return{url:"https://openrouter.ai/api/v1/key",headers:E(t)};case"deepseek":return{url:"https://api.deepseek.com/user/balance",headers:E(t)};case"elevenlabs":return{url:"https://api.elevenlabs.io/v1/user/subscription",headers:{"xi-api-key":t}};case"groq":return{url:"https://api.groq.com/openai/v1/models",headers:E(t)};case"mistral":return{url:"https://api.mistral.ai/v1/models",headers:E(t)};case"gemini":return{url:"https://generativelanguage.googleapis.com/v1beta/models",headers:{"x-goog-api-key":t}};case"deepgram":return{url:"https://api.deepgram.com/v1/projects",headers:{authorization:`Token ${t}`}};case"xai":return{url:"https://api.x.ai/v1/api-key",headers:E(t)};case"together":return{url:"https://api.together.xyz/v1/models",headers:E(t)};case"twilio":return!e.account||!/^AC[a-f0-9]{32}$/.test(e.account)?null:{url:`https://api.twilio.com/2010-04-01/Accounts/${e.account}/Balance.json`,headers:{authorization:`Basic ${Buffer.from(`${e.account}:${t}`).toString("base64")}`}};default:return null}}function De(e){return{provider:e.provider,name:e.name,where:e.where,masked:e.masked}}function z(e,t,o){return e<=0?"empty":t!==null&&t>0&&e/t<.2||t===null&&o&&e<5?"low":"ok"}async function Ft(e,t){let o=De(e),a=e.provider?G[e.provider]:void 0;if(!e.provider)return{...o,status:"skipped",detail:e.unclear??"provider unclear: not sent anywhere"};let r=Mt(e);if(!r)return{...o,status:"skipped",detail:"missing its account id: not checked"};let i;try{i=await $e(t,r)}catch(d){let c=d?.name==="TimeoutError"||d?.name==="AbortError";return{...o,status:"error",detail:c?"the provider did not answer in time":"could not reach the provider"}}if(i.status===401||i.status===403)return e.provider==="deepgram"&&i.status===403?{...o,status:"ok",detail:"works; this key cannot read the balance (needs owner or admin scope)",...a?{billingUrl:a}:{}}:{...o,status:"invalid",detail:"rejected: revoked, expired or mistyped"};if(i.status===402)return{...o,status:"empty",detail:"out of credit: the provider refuses requests until you top up",...a?{billingUrl:a}:{}};if(i.status===429)return{...o,status:"limited",detail:"rate-limited or over quota right now",...a?{billingUrl:a}:{}};if(i.status<200||i.status>=300)return{...o,status:"error",detail:`the provider answered HTTP ${i.status}`};let s=I(i.body);switch(e.provider){case"openrouter":{let d=I(s?.data),c=x(d?.limit),g=x(d?.limit_remaining),l=x(d?.usage);if(c!==null&&g!==null){let h=typeof d?.limit_reset=="string"&&/^[a-z]+$/.test(d.limit_reset)?` (resets ${d.limit_reset})`:"";return{...o,status:z(g,c,!0),detail:`${T(g)} left of a ${T(c)} key limit${h}${l!==null?`; ${T(l)} used`:""}`,remaining:{amount:g,unit:"USD",of:c}}}return{...o,status:"ok",detail:`works; no spending limit on this key${l!==null?`; ${T(l)} used so far`:""}`,billingUrl:"https://openrouter.ai/settings/credits"}}case"deepseek":{let c=(Array.isArray(s?.balance_infos)?s.balance_infos.map(I).filter(Boolean):[])[0],g=x(c?.total_balance),l=Oe(c?.currency)||"USD";if(g===null)return{...o,status:"ok",detail:"works; balance not reported"};let h=s?.is_available===!1?"empty":z(g,null,!0);return{...o,status:h,detail:h==="empty"?`balance ${T(g,l)}: not enough to make calls`:`${T(g,l)} balance`,remaining:{amount:g,unit:l}}}case"elevenlabs":{let d=x(s?.character_count),c=x(s?.character_limit),g=x(s?.next_character_count_reset_unix);if(d===null||c===null)return{...o,status:"ok",detail:"works; quota not reported"};let l=Math.max(0,c-d),h=g?new Date(g*1e3).toISOString().slice(0,10):void 0;return{...o,status:z(l,c,!1),detail:`${l.toLocaleString("en-US")} of ${c.toLocaleString("en-US")} characters left${h?`; resets ${h}`:""}`,remaining:{amount:l,unit:"characters",of:c,...h?{resetsOn:h}:{}}}}case"twilio":{let d=x(s?.balance),c=Oe(s?.currency)||"USD";return d===null?{...o,status:"ok",detail:"works; balance not reported"}:{...o,status:z(d,null,!0),detail:`${T(d,c)} balance`,remaining:{amount:d,unit:c}}}case"deepgram":{let c=(Array.isArray(s?.projects)?s.projects.map(I):[])[0]?.project_id;if(typeof c!="string"||!/^[a-f0-9-]{8,64}$/i.test(c))return{...o,status:"ok",detail:"works; no project found to read a balance from"};try{let g=await $e(t,{url:`https://api.deepgram.com/v1/projects/${c}/balances`,headers:r.headers}),l=Array.isArray(I(g.body)?.balances)?I(g.body).balances.map(I):[],h=x(l[0]?.amount),C=typeof l[0]?.units=="string"&&/^[a-z]{1,12}$/i.test(l[0].units)?l[0].units:"usd";if(g.status>=200&&g.status<300&&h!==null){let P=C.toLowerCase()==="usd";return{...o,status:z(h,null,P),detail:P?`${T(h)} credit left`:`${h} ${C} left`,remaining:{amount:h,unit:P?"USD":C}}}}catch{}return{...o,status:"ok",detail:"works; this key cannot read the balance (needs owner or admin scope)",billingUrl:G.deepgram}}case"xai":return s?.api_key_blocked===!0||s?.team_blocked===!0||s?.api_key_disabled===!0?{...o,status:"invalid",detail:"the key or its team is blocked or disabled",billingUrl:G.xai}:{...o,status:"ok",detail:"works; balance is shown only in the xAI console",billingUrl:G.xai};default:return{...o,status:"ok",detail:"works; this provider shows the balance only in its console",...a?{billingUrl:a}:{}}}}async function qt(e,t=globalThis.fetch){let o=new Array(e.length),a=0,r=async()=>{for(;a<e.length;){let i=a++;try{o[i]=await Ft(e[i],t)}catch{o[i]={...De(e[i]),status:"error",detail:"could not check this key"}}}};return await Promise.all(Array.from({length:Math.min(4,e.length)},r)),o}var Ht=["api.openai.com","api.anthropic.com","openrouter.ai","api.deepseek.com","api.elevenlabs.io","api.groq.com","api.mistral.ai","generativelanguage.googleapis.com","api.deepgram.com","api.x.ai","api.together.xyz","api.twilio.com"];var Zt=new Set(["localhost","localdomain","local","internal","intranet","private","lan","home","corp","test","example","invalid","onion","arpa","alt","docker","kubernetes","cluster","svc"]),Vt=["nip.io","sslip.io","xip.io","localtest.me","lvh.me","vcap.me","lacolhost.com","traefik.me"],Yt=/(ignore|disregard|forget|override|bypass)[^a-z0-9]*(all|any|the|your|previous|prior|above|earlier|system|instructions?|prompts?|rules?)/;function Be(e){if(typeof e!="string"||e.length===0||e.length>253)return null;let t=e.toLowerCase().replace(/\.$/,"");if(!/^[a-z0-9.-]+$/.test(t)||V.isIP(t)!==0)return null;let o=t.split(".");if(o.length<2||o.some(r=>r.length===0||r.length>63||r.startsWith("-")||r.endsWith("-")))return null;let a=o[o.length-1];return Zt.has(a)||!(/^[a-z]{2,63}$/.test(a)||/^xn--[a-z0-9-]+$/.test(a))||Vt.some(r=>t===r||t.endsWith(`.${r}`))||Yt.test(t)||ie(t)||o.some(r=>r.split("-").length>5)?null:J(t)?t:null}var L=new V.BlockList;for(let[e,t]of[["0.0.0.0",8],["10.0.0.0",8],["100.64.0.0",10],["127.0.0.0",8],["169.254.0.0",16],["172.16.0.0",12],["192.0.0.0",24],["192.0.2.0",24],["192.168.0.0",16],["198.18.0.0",15],["198.51.100.0",24],["203.0.113.0",24],["224.0.0.0",4],["240.0.0.0",4]])L.addSubnet(e,t,"ipv4");for(let[e,t]of[["::",128],["::1",128],["64:ff9b::",96],["100::",64],["2001::",32],["2001:db8::",32],["2002::",16],["fc00::",7],["fe80::",10],["fec0::",10],["ff00::",8]])L.addSubnet(e,t,"ipv6");function Jt(e){let t=e.toLowerCase(),o=/^(.*:)(\d+\.\d+\.\d+\.\d+)$/.exec(t);if(o){if(V.isIPv4(o[2])===!1)return null;let[c,g,l,h]=o[2].split(".").map(Number);t=`${o[1]}${(c<<8|g).toString(16)}:${(l<<8|h).toString(16)}`}let a=t.split("::");if(a.length>2)return null;let r=a[0]?a[0].split(":"):[],i=a.length===2&&a[1]?a[1].split(":"):[],s=a.length===2?8-r.length-i.length:0;if(s<0||a.length===1&&r.length!==8)return null;let d=[...r,...Array(s).fill("0"),...i].map(c=>/^[0-9a-f]{1,4}$/.test(c)?parseInt(c,16):NaN);return d.length===8&&d.every(c=>!Number.isNaN(c))?d:null}function Xt(e){let t=V.isIP(e);if(t===0)return!0;if(t===4)return L.check(e,"ipv4");let o=Jt(e);if(!o)return!0;let a=r=>o.slice(0,r).every(i=>i===0);return a(5)&&o[5]===65535?L.check(`${o[6]>>8}.${o[6]&255}.${o[7]>>8}.${o[7]&255}`,"ipv4"):a(6)?!0:L.check(e,"ipv6")}function Qt(e,t,o,a=Kt.lookup){a(e,{...t,all:!0},(r,i)=>{if(r)return o(r);let s=i;if(s.length===0||s.some(d=>Xt(d.address)))return o(Object.assign(new Error("refused: resolves to a private address"),{code:"EOUCHBILLPRIVATE"}));if(t.all)return o(null,s);o(null,s[0].address,s[0].family)})}var en=e=>Gt.connect({...e,lookup:Qt});function tn(e,t){let o=e.HOME||e.USERPROFILE||Wt.homedir();if(t==="win32")return O.join(e.LOCALAPPDATA||O.join(o,"AppData","Local"),"ouchbill");if(t==="darwin")return O.join(o,"Library","Caches","ouchbill");let a=e.XDG_CACHE_HOME;return O.join(a&&O.isAbsolute(a)?a:O.join(o,".cache"),"ouchbill")}var Z="OUCHBILL_TABLE_KEY",ze=`Fresh tables need a free data feed key: sign in at https://ouchbill.com, open Settings, create a data feed key and set it in the ${Z} environment variable.`;function nn(e){let t=e[Z];if(t===void 0||t.trim()==="")return{state:"missing"};let o=t.trim();return de.test(o)?{state:"ok",key:o}:{state:"malformed"}}var on=1440*60*1e3;function an(e){if(!e.warning||e.source==="live")return null;let t=e.retirementsChecked<e.eolChecked?e.retirementsChecked:e.eolChecked,o=e.warning.split(/unavailable: |refresh failed: /)[1]??"",a=/network refresh is off/.test(o)?"offline mode is on":/^(signature|unknown signing key)/.test(o)?"the downloaded data did not pass its signature check":/expired/.test(o)?"the published data has expired":/older/.test(o)?"the published data was older than this version's":"the data source could not be reached";return e.ageDays<=(a==="offline mode is on"?14:7)?null:`Dates last checked ${t} (${e.ageDays} day${e.ageDays===1?"":"s"} ago): ${a}.`}function rn(e,t){if(!e.warning)return null;if(e.source==="live")return"Live tables loaded, but the cache could not be written; the next run will fetch again.";let o=e.warning.split(/unavailable: |refresh failed: /)[1]??"",a="",r;t.state==="missing"?(r="no data feed key is set",a=` ${ze}`):t.state==="malformed"?(r=`${Z} does not hold a data feed key (keys start with obt_), so nothing was sent`,a=` ${ze}`):/^the server refused the data feed key/.test(o)?(r=`the server did not accept the data feed key in ${Z} (it may be revoked or mistyped)`,a=" Create a new key in Settings at https://ouchbill.com."):/^could not reach the server \(HTTP 429\)/.test(o)?r="the server is limiting requests for this key; try again later (use one key per person or CI system)":r=o===""||/^(could not reach|unexpected error)/.test(o)?"the server could not be reached":/^(signature|unknown signing key)/.test(o)?"its signature did not verify":/older/.test(o)?"the server sent an older table (refused)":"the server's table was not valid";let i=e.retirementsChecked<e.eolChecked?e.retirementsChecked:e.eolChecked;return e.source==="cache"?`Using cached tables last checked ${i}; the refresh did not run or failed because ${r}.${a}`:`Using the tables bundled with this version, last checked ${i} (${e.ageDays} day${e.ageDays===1?"":"s"} ago); live tables unavailable because ${r}.${a}`}async function Yn(e){let t=e.deps??{},o=nn(e.env),a=e.source==="npm"||e.source===void 0&&o.state!=="ok",r=await je({fetch:t.fetch??globalThis.fetch,cacheDir:t.cacheDir??tn(e.env,e.platform),now:e.now,allowNetwork:!e.offline&&(a||o.state==="ok"),clientVersion:e.version,...a?{url:ce,freshMs:on,timeoutMs:t.timeoutMs??3e3}:{},...!a&&o.state==="ok"?{tableKey:o.key}:{},...t.publicKeys?{publicKeys:t.publicKeys}:{},...t.timeoutMs&&!a?{timeoutMs:t.timeoutMs}:{}}),i={source:r.source,issuedAt:r.issuedAt,ageDays:r.ageDays,retirementsChecked:r.retirementsChecked,eolChecked:r.eolChecked,warning:a?an(r):rn(r,o)};return r.source==="bundled"?{report:i}:{tables:Se(r.retirements,r.eol,r.retirementsChecked,r.eolChecked),report:i}}function Jn(e){let t=[],o=0;for(let i of fe(e)){let s=Be(i.host);s?t.push({host:s,file:i.file,line:i.line}):o++}let a=t.slice(0,M),r=[...new Set(a.map(i=>F(i.host)))].filter(i=>Be(i)!==null);return{hosts:a,domains:r,skipped:t.slice(M).map(i=>i.host),refused:o}}var sn=e=>/timed out/.test(e)?"timed out":/private address/.test(e)?"refused: it resolves to a private address":/certificate expiry/.test(e)?"no readable certificate":"could not connect",ln=e=>{let t=/HTTP (\d{3})/.exec(e)?.[1];return e===q?q:t?`the registry lookup answered HTTP ${t}`:/timed out/.test(e)?"timed out":/no expiration/.test(e)?"the registry reply has no expiry date":"the registry lookup failed"};async function Xn(e,t){let o=t.deps??{},a=()=>t.now,r=o.timeoutMs?{timeoutMs:o.timeoutMs}:{},i=[],s=new Map(e.hosts.map(l=>[l.host,l])),d=await X(e.hosts.map(l=>l.host),l=>be(l,{connect:o.tlsConnect??en,now:a,...r}));for(let l of d.results){let h=s.get(l.host);i.push("error"in l?{kind:"certificate",name:l.host,file:h.file,line:h.line,expiresOn:null,daysLeft:null,error:sn(l.error)}:{kind:"certificate",name:l.host,file:h.file,line:h.line,expiresOn:l.expiresOn,daysLeft:l.daysLeft,error:null})}let c=o.fetch??globalThis.fetch,g=await X(e.domains,l=>ke(l,{fetch:c,now:a,...r,...t.version?{version:t.version}:{}}));for(let l of g.results){let h=e.hosts.find(C=>F(C.host)===l.domain);i.push("error"in l?{kind:"domain",name:l.domain,file:h.file,line:h.line,expiresOn:null,daysLeft:null,error:ln(l.error)}:{kind:"domain",name:l.domain,file:h.file,line:h.line,expiresOn:l.expiresOn,daysLeft:l.daysLeft,error:null})}return{contacted:e.hosts.map(l=>l.host),rdapDomains:e.domains,skipped:e.skipped,refused:e.refused,checks:i}}export{ze as GET_A_KEY,on as NPM_FRESH_MS,Z as TABLE_KEY_ENV,tn as cacheDirFor,qt as checkKeys,Qt as guardedLookup,Xt as isBlockedAddress,he as isHostFile,Yn as loadFresh,Jn as planHosts,Xn as runOnline,nn as tableKeyFrom,Be as validateHost};