Skip to content

Conversation

@kathmbeck
Copy link
Contributor

@kathmbeck kathmbeck commented Jan 23, 2026

🎉 Thanks for submitting a pull request! 🎉

Summary

Local dev support for https://linear.app/netlify/issue/RUN-1883/build-an-opt-out-flow-for-account-and-sites

Confirmed against site locally by toggling account settings for ai_gateway_disabled and running netlify dev

When an account has AI Gateway disabled, skips env var injection for AI providers and logs
AI Gateway is disabled for this account


For us to review and ship your PR efficiently, please perform the following steps:

  • Open a bug/issue before writing your code 🧑‍💻. This ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or something that`s on fire 🔥 (e.g. incident related), you can skip this step.
  • Read the contribution guidelines 📖. This ensures your code follows our style guide and
    passes our tests.
  • Update or add tests (if any source code was changed or added) 🧪
  • Update or add documentation (if features were changed or added) 📝
  • Make sure the status checks below are successful ✅

A picture of a cute animal (not mandatory, but encouraged)

@kathmbeck kathmbeck requested a review from a team as a code owner January 23, 2026 21:36
@github-actions
Copy link

github-actions bot commented Jan 23, 2026

📊 Benchmark results

Comparing with c090425

  • Dependency count: 1,055 (no change)
  • Package size: 317 MB (no change)
  • Number of ts-expect-error directives: 366 (no change)

@kathmbeck kathmbeck enabled auto-merge (squash) January 27, 2026 16:26
@kathmbeck kathmbeck merged commit 4a57375 into main Jan 27, 2026
102 of 104 checks passed
@kathmbeck kathmbeck deleted the kb/ai-gateway-disabled-check branch January 27, 2026 16:54
})

if (!options.offline && !options.offlineEnv) {
if (!options.offline && !options.offlineEnv && !capabilities.aiGatewayDisabled) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kathmbeck

🤔 I think this is pointing out to me that AI Gateway is missing entirely from netlify serve and netlify dev:exec? Confusingly there are four commands that spin up local primitives (or some subset of them).

😓 Can't wait to finish deleting all this code and have full beautiful code reuse in CLI via @netlify/dev!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants