Skip to content

fix(server): await providers before catalog reads - #46066

Merged
kitlangton merged 1 commit into
v2from
provider-readiness
Aug 31, 2026
Merged

kitlangton merged 1 commit into
v2from
provider-readiness

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

Why

An initial provider list or lookup could read the empty Catalog before configured plugins finished registering providers. The same request would then succeed after a model endpoint happened to flush plugin initialization.

What Changes

provider.list and provider.get now use the existing lazy plugin-readiness policy before reading the Catalog:

Startup state Before After
Plugins settle in time Empty list or transient 404 Complete provider result
Readiness times out Incomplete catalog result Declared 503 error

Scope

Only the two provider catalog endpoints change. Their Protocol already declares the readiness error, so no client regeneration is required.

Verification

cd packages/server
bun run test test/provider.test.ts test/handler-policy.test.ts
bun typecheck
git diff --check origin/v2...HEAD
  • 5 focused tests passed.
  • Server and workspace typechecks passed.
  • Independent final review found no issues.

@kitlangton
kitlangton merged commit 30721b8 into v2 Aug 31, 2026
10 checks passed
@kitlangton
kitlangton deleted the provider-readiness branch August 31, 2026 15:24
jinhuang712 pushed a commit to jinhuang712/opencode that referenced this pull request Sep 26, 2026
devagrawal09 pushed a commit to devagrawal09/ocpp that referenced this pull request Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant