Skip to content

chore: tolerate empty providers at startup and log env seeds#25605

Merged
dannykopping merged 1 commit into
mainfrom
dk/aibridge-startup-ordering
May 22, 2026
Merged

chore: tolerate empty providers at startup and log env seeds#25605
dannykopping merged 1 commit into
mainfrom
dk/aibridge-startup-ordering

Conversation

@dannykopping

@dannykopping dannykopping commented May 22, 2026

Copy link
Copy Markdown
Contributor

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.

@dannykopping dannykopping changed the title feat(aibridge): tolerate empty providers at startup and log env seeds chore: tolerate empty providers at startup and log env seeds May 22, 2026
@dannykopping dannykopping marked this pull request as ready for review May 22, 2026 10:28
@dannykopping dannykopping changed the base branch from dk/aibridge-inmemory-pipe to graphite-base/25605 May 22, 2026 10:33
@dannykopping dannykopping force-pushed the dk/aibridge-startup-ordering branch from 6aba890 to ab0d49f Compare May 22, 2026 10:33
@dannykopping dannykopping force-pushed the graphite-base/25605 branch from ee9ba43 to 5d40bac Compare May 22, 2026 10:33
@graphite-app graphite-app Bot changed the base branch from graphite-base/25605 to main May 22, 2026 10:34
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>
@dannykopping dannykopping force-pushed the dk/aibridge-startup-ordering branch from ab0d49f to 0e7f01a Compare May 22, 2026 10:34
@dannykopping dannykopping merged commit ef6ee2a into main May 22, 2026
23 checks passed

Copy link
Copy Markdown
Contributor Author

Merge activity

@dannykopping dannykopping deleted the dk/aibridge-startup-ordering branch May 22, 2026 10:45
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.

2 participants