Commit f345198
chore(diag): expose hasDatabaseUrl + instanceId in _proxy_debug (#318)
The Phase 3 rate limit is partially working in production —
12 streaming requests resulted in 7 DB inserts but no 429s.
Theory: some Vercel function instances cold-start without
DATABASE_URL populated and silently fail-open for their lifetime.
This commit adds three fields to the /api/_proxy_debug response so
we can confirm:
- hasDatabaseUrl: whether the env var is visible at runtime
- rateLimitConfigured: whether the proxy was wired with the hook
- instanceId: a per-instance random id, so multiple curls can show
whether they hit the same instance or different ones
Once verified, this commit can stay (cheap) or be reverted as
preferred — the cost is 4 lines in the debug response.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent e5bc0f2 commit f345198
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
108 | 115 | | |
109 | 116 | | |
110 | 117 | | |
| |||
0 commit comments