Skip to content

g1t/services/models/wrangler.jsonc

34 lines1,596 bytesCodeBlame
1{
2 "$schema": "../../node_modules/wrangler/config-schema.json",
3 "name": "g1t-models",
4 "account_id": "1e6f2cffa3f445920836e8ebe446bb58",
5 "compatibility_date": "2026-09-26",
6 "main": "./src/index.ts",
7 "workers_dev": false,
8 // Sandboxes reach models only through here, with a token for their run;
9 // a workspace's own code reaches the AI Gateway here with one of its
10 // access tokens, at /anthropic or /openai/v1.
11 "routes": [{ "pattern": "models.g1t.sh", "custom_domain": true }],
12 "services": [
13 { "binding": "INTEGRATIONS", "service": "g1t-integrations" },
14 // Where each run's tokens are counted, for usage views.
15 { "binding": "BILLING", "service": "g1t-billing" },
16 // Who an AI Gateway request's access token belongs to, and its scopes.
17 { "binding": "IDENTITY", "service": "g1t-identity" }
18 ],
19 "vars": {
20 // g1t's own route, for runs g1t pays for: a Cloudflare AI Gateway,
21 // which holds g1t's key.
22 "AI_GATEWAY_ID": "g1t",
23 "CLOUDFLARE_ACCOUNT_ID": "1e6f2cffa3f445920836e8ebe446bb58"
24 },
25 // Once a day, after billing's daily run: every provider's model list,
26 // recorded with billing's catalogue (src/discover.ts). sudo's "Check
27 // for new models" does the same through the `Discovery` entrypoint.
28 "triggers": { "crons": ["29 5 * * *"] },
29 // Secrets: AI_GATEWAY_TOKEN; ANTHROPIC_API_KEY only if the gateway does
30 // not hold g1t's key; WORKERS_AI_TOKEN, a Cloudflare API token with
31 // Workers AI Read on this account, for the AI Gateway's open models
32 // (without it AI_GATEWAY_TOKEN is tried, and needs that permission too).
33 "observability": { "enabled": true }
34}