Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1090b85bbf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| applyProxyEnv(config); // `ocx ensure`/`ocx sync` fetch provider models outside the server process | ||
| // Bootstrap the optional ladder snapshot before gathering the catalog. Keeping this in the | ||
| // sync plane prevents an unrelated models.dev fetch from interleaving with a routed turn. | ||
| await refreshReasoningMetadataForSync(config, deps); |
There was a problem hiding this comment.
Refresh metadata before launching catalog prewarm
On ordinary ocx start, src/cli/index.ts launches scheduleCatalogPrewarm() before this await, and that prewarm is explicitly designed to share the same in-flight gatherRoutedModels call with refreshCodexModelCatalog. With Zen plus a slower second provider, Zen can apply configuredReasoningEfforts() before the metadata download completes while the second provider keeps the shared flight alive; after this await, the sync joins that already-partially-derived flight and writes a catalog without the newly bootstrapped ladder. Order the bootstrap before prewarm, or invalidate/restart any in-flight gather after refreshing.
Useful? React with 👍 / 👎.
| if (Object.values(config.providers).some(providerUsesReasoningMetadata)) { | ||
| await deps.refreshReasoningMetadata?.(); |
There was a problem hiding this comment.
Exclude disabled providers from metadata bootstrap
When a configuration retains a disabled OpenCode Zen/Go provider but routes only through unrelated providers, this predicate still initiates the models.dev fetch even though catalog gathering explicitly excludes disabled providers. With a missing or stale snapshot and an unavailable models.dev endpoint, an otherwise unrelated startup or explicit sync can therefore wait for the 15-second refresh timeout before proceeding. Filter out provider.disabled === true before testing whether metadata is needed.
Useful? React with 👍 / 👎.
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Its title has been prefixed with |
Motivation
Description
providerUsesReasoningMetadata()tosrc/providers/reasoning-metadata.tsto detect destinations that can use the models.dev snapshot.configuredReasoningEfforts()insrc/reasoning-effort.tsso the lookup no longer conditions the refresh.refreshReasoningMetadataForSync()and invoke it fromsrc/codex/sync.tsbefore catalog gathering so supported routed destinations are bootstrapped during catalog sync.tests/codex-integration/codex-sync-api.test.tsthat asserts the reasoning metadata refresh runs prior to catalog refresh, and update structure docs to record the new ownership of the snapshot bootstrap.Testing
./node_modules/bun/bin/bun.exe test tests/codex-integration/reasoning-metadata.test.ts tests/codex-integration/codex-sync-api.test.ts, and both suites passed (33 tests total passed)../node_modules/bun/bin/bun.exe run typecheckand./node_modules/bun/bin/bun.exe run structure:check, both of which completed successfully.git diff --check(no whitespace / check failures) and a repository-wide./node_modules/bun/bin/bun.exe run testwas attempted but produced unrelated failures in other suites (examples:tests/responses/ws-upstream.test.ts,tests/routing/combo-management-api.test.ts,tests/lab/lab-evidence-sanitization.test.ts), while the focused changed-subsystem tests remained green.Codex Task