Skip to content
41 linesCodeBlameRaw

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

Integrations: your own model provider, alerts that open issues, tickets agents read1{
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,
Merge the AI Gateway: Anthropic's Messages API on a workspace's tokens8 // 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
AI Gateway: OpenAI's format, open models, and your own providers10 // access tokens, at /anthropic or /openai/v1.
Integrations: your own model provider, alerts that open issues, tickets agents read11 "routes": [{ "pattern": "models.g1t.sh", "custom_domain": true }],
Mission control shows model usage, yours and the workspace's: tokens, cost, active days, cache share, each day, and the mix12 "services": [
13 { "binding": "INTEGRATIONS", "service": "g1t-integrations" },
14 // Where each run's tokens are counted, for usage views.
Merge the AI Gateway: Anthropic's Messages API on a workspace's tokens15 { "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" }
Mission control shows model usage, yours and the workspace's: tokens, cost, active days, cache share, each day, and the mix18 ],
Merge platform pause and the hourly usage watcher: staff can pause compute, schedules, indexing or renders for everyone, the watcher emails on a breach and is never blind quietly, and the models proxy holds each run to its cap (billing 0051, integrations 0006)19 // Each run's model spend, one object per model session, so its cost cap
20 // holds across every isolate its requests reach (src/run-spend.ts).
21 "durable_objects": {
22 "bindings": [{ "name": "RUN_SPEND", "class_name": "RunSpend" }]
23 },
24 "migrations": [{ "tag": "v1", "new_sqlite_classes": ["RunSpend"] }],
Integrations: your own model provider, alerts that open issues, tickets agents read25 "vars": {
26 // g1t's own route, for runs g1t pays for: a Cloudflare AI Gateway,
27 // which holds g1t's key.
28 "AI_GATEWAY_ID": "g1t",
29 "CLOUDFLARE_ACCOUNT_ID": "1e6f2cffa3f445920836e8ebe446bb58"
30 },
Merge branch 'main' into actions-toolkit-oidc-artifacts31 // Once a day, after billing's daily run: every provider's model list,
32 // recorded with billing's catalogue (src/discover.ts). sudo's "Check
33 // for new models" does the same through the `Discovery` entrypoint.
34 "triggers": { "crons": ["29 5 * * *"] },
Integrations: your own model provider, alerts that open issues, tickets agents read35 // Secrets: AI_GATEWAY_TOKEN; ANTHROPIC_API_KEY only if the gateway does
AI Gateway: OpenAI's format, open models, and your own providers36 // not hold g1t's key; WORKERS_AI_TOKEN, a Cloudflare API token with
37 // Workers AI Read on this account, for the AI Gateway's open models
38 // (without it AI_GATEWAY_TOKEN is tried, and needs that permission too).
Merge branch 'worktree-agent-a8752162fea25f63f' into spend-guardrails39 // Logs of a tenth of requests: every model call is one.
40 "observability": { "enabled": true, "head_sampling_rate": 0.1 }
Integrations: your own model provider, alerts that open issues, tickets agents read41}

This file's history is long; its oldest lines are credited to the oldest commit read.