chore: tolerate empty providers at startup and log env seeds#25605
Merged
Conversation
This was referenced May 22, 2026
Contributor
Author
This was referenced May 22, 2026
6aba890 to
ab0d49f
Compare
ee9ba43 to
5d40bac
Compare
Three coupled fixes so server startup succeeds with zero ai_providers rows configured: 1. Move SeedAIProvidersFromEnv before newAPI in cli/server.go so the aibridgeproxyd inside the enterprise closure observes env-configured providers at init. 2. Drop the auditor argument from SeedAIProvidersFromEnv and log each inserted provider/key via slog instead. The seed used to emit audit entries via options.Auditor, but the real auditor is only constructed inside newAPI; env config itself is the source of truth for these rows. 3. Relax aibridgeproxyd.New to accept an empty domain allowlist so a freshly provisioned deployment can boot before any provider is configured. Intercepts continue to reject until providers exist; the allowlist will be refreshed dynamically in a follow-up. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ab0d49f to
0e7f01a
Compare
johnstcn
approved these changes
May 22, 2026
Contributor
Author
Merge activity
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Since AI Gateway is now enabled by default, and if the AI Gateway Proxy is enabled too it's possible the server can start without any configured providers. This would previously block startup, which is unacceptable.
In an upstack PR we will handle reloading the providers at runtime, so the server needs to be able to start up even if it can't handle any proxy requests to AI Gateway.
This change was necessitated because if there are providers configured in the environment they need to be seeded before the proxy starts.