Title: `ai.provider().fetch()` requires the provider key as a Worker secret, so it can't use AI Gateway stored keys or Unified Billing · Issue #845 · voidzero-dev/void · GitHub
Open Graph Title: `ai.provider().fetch()` requires the provider key as a Worker secret, so it can't use AI Gateway stored keys or Unified Billing · Issue #845 · voidzero-dev/void
X Title: `ai.provider().fetch()` requires the provider key as a Worker secret, so it can't use AI Gateway stored keys or Unified Billing · Issue #845 · voidzero-dev/void
Description: providerFetch always calls resolveProviderKey() and sends the key itself. If the secret is missing, for example GOOGLE_API_KEY for google-ai-studio, it answers 400 with ai: Missing GOOGLE_API_KEY secret. apiKeyEnv only changes which secr...
Open Graph Description: providerFetch always calls resolveProviderKey() and sends the key itself. If the secret is missing, for example GOOGLE_API_KEY for google-ai-studio, it answers 400 with ai: Missing GOOGLE_API_KEY s...
X Description: providerFetch always calls resolveProviderKey() and sends the key itself. If the secret is missing, for example GOOGLE_API_KEY for google-ai-studio, it answers 400 with ai: Missing GOOGLE_API_KEY s...
Opengraph URL: https://github.com/voidzero-dev/void/issues/845
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`ai.provider().fetch()` requires the provider key as a Worker secret, so it can't use AI Gateway stored keys or Unified Billing","articleBody":"`providerFetch` always calls `resolveProviderKey()` and sends the key itself. If the secret is missing, for example `GOOGLE_API_KEY` for `google-ai-studio`, it answers 400 with `ai: Missing GOOGLE_API_KEY secret`. `apiKeyEnv` only changes which secret it reads. So an app can't let AI Gateway authenticate with a key stored in the gateway, or pay through Unified Billing.\n\nThe same path also drops `init.signal`: it passes only method, headers and body to `fetch()`, so a request can't be timed out. A Gemini call on Google's Flex tier can take up to 15 minutes, which is a queue consumer's whole time limit.\n\n**Ask:**\n\n- An option for `ai.provider().fetch()` to send no provider key and let AI Gateway authenticate, as the Workers AI binding's `gateway(id).run()` does.\n- Pass `init.signal` through to `fetch()`.\n\n**Workaround today:** the app calls the binding's `env.AI.gateway(id).run()` directly, with `inference.bindings.ai` set in `void.config.ts`, and adds its own `AbortSignal`. That skips `void/ai` entirely.\n\n**Environment:** Void 1.9.1.\n","author":{"url":"https://github.com/karthickeyan-dev","@type":"Person","name":"karthickeyan-dev"},"datePublished":"2026-11-16T04:05:21Z","url":"https://github.com/voidzero-dev/void/issues/845"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:fd121909-3ebc-e780-77c1-07881c9e8412 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 868C:3886C4:144641:1BC4A2:6AFBAAEA |
| html-safe-nonce | 29079f211c3d3767a6b5a48fd807ec56defe73d7c8c0aa1b2cb61cde198560dc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NjhDOjM4ODZDNDoxNDQ2NDE6MUJDNEEyOjZBRkJBQUVBIiwidmlzaXRvcl9pZCI6IjgwMzEyMzIzODg3OTkxMTM5NjIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 20e8615e3ab8736858b2437354c08529e6c3bb551d0a70e852d641ea8373b29f |
| hovercard-subject-tag | issue:6413921075 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/voidzero-dev/void/845/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e35209903d8d0b9564acc3844550c78551393bfcd8a646087216b89979b50769/voidzero-dev/void/issues/845 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e35209903d8d0b9564acc3844550c78551393bfcd8a646087216b89979b50769/voidzero-dev/void/issues/845 |
| og:image:alt | providerFetch always calls resolveProviderKey() and sends the key itself. If the secret is missing, for example GOOGLE_API_KEY for google-ai-studio, it answers 400 with ai: Missing GOOGLE_API_KEY s... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | karthickeyan-dev |
| hostname | github.com |
| expected-hostname | github.com |
| None | e25fbd830d3e6ad0e8935c105cf4fdc70c593dffcd27bb45b790ae4fece5ea55 |
| turbo-cache-control | no-preview |
| go-import | github.com/voidzero-dev/void git https://github.com/voidzero-dev/void.git |
| octolytics-dimension-user_id | 149750581 |
| octolytics-dimension-user_login | voidzero-dev |
| octolytics-dimension-repository_id | 1164437080 |
| octolytics-dimension-repository_nwo | voidzero-dev/void |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1164437080 |
| octolytics-dimension-repository_network_root_nwo | voidzero-dev/void |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 08c8f17f9d27054a108b8b6254e405de0151f660 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width