Skip to content

feat(provider): only discover/advertise coordinator-catalog models - #395

Closed
Gajesh2007 wants to merge 4 commits into
masterfrom
catalog-only-models
Closed

Gajesh2007 wants to merge 4 commits into
masterfrom
catalog-only-models

Conversation

@Gajesh2007

@Gajesh2007 Gajesh2007 commented Jun 17, 2026 •

Copy link
Copy Markdown
Member

Summary

Make the Darkbloom provider treat the coordinator model catalog as the single source of truth for which local weights can be discovered, advertised, served, or diagnosed. Non-catalog weights are invisible to the network and to the operator-facing CLI.

Before / After

Before: any local MLX weight directory could be advertised

sequenceDiagram
    participant U as Operator
    participant P as darkbloom provider
    participant C as Coordinator
    participant R as Registry/Scheduler

    U->>P: darkbloom start --all
    P->>P: scan ~/.cache/lm-studio/Models
    P->>P: scan ~/.lmstudio/models
    P->>C: register with every discovered model
    C->>R: expose unsupported IDs as available capacity
    R->>C: route consumer requests to unsupported weights
Loading

After: only coordinator-catalog models are discovered or advertised

sequenceDiagram
    participant U as Operator
    participant P as darkbloom provider
    participant C as Coordinator
    participant R as Registry/Scheduler

    U->>P: darkbloom start --all
    P->>C: GET /v1/models/catalog
    C-->>P: supported model IDs
    P->>P: scan local directories
    P->>P: filter discovered models against catalog
    P->>C: register only catalog-matching models
    C->>R: expose only supported IDs as available capacity
    R->>C: route consumer requests to supported weights only
Loading

Changes

Provider (Swift)

  • loadRuntimeSnapshot fetches GET /v1/models/catalog at startup and caches it to ~/.cache/darkbloom/catalog.json. Offline commands fall back to the cache; if none exists, the catalog is treated as empty (fail closed).
  • New catalogFilteredModels() and updated advertisedModels() filter every local model through the coordinator catalog before applying enabled_models or --model.
  • darkbloom start --all now means "all downloaded models that are in the catalog."
  • darkbloom start --model <non-catalog-id> fails with a clear error for explicit user invocations; the launchd --foreground path filters stale plist flags and logs warnings instead of refusing to start.
  • darkbloom doctor diagnoses only catalog models and warns when the catalog cannot be fetched.
  • darkbloom models catalog no longer shows a "Local only" section; off-catalog weights get a one-line "will not be served" note.
  • ProviderLoop.applyVerifiedPrefetch refuses to advertise a prefetched build that is not in the catalog.
  • ProviderLoopConfig carries the startup catalog snapshot.

Coordinator (Go)

  • Provider registration filters msg.Models to catalog-known IDs and logs any dropped non-catalog models as a defense-in-depth backstop.

Tests & docs

  • Added CatalogFilterTests.swift covering catalogFilteredModels and advertisedModels.
  • Added TestProviderRegistrationFiltersNonCatalogModels.
  • Updated docs/provider/cli-reference.md and docs/provider/quickstart.md.

Verification

  • cd coordinator && go test ./... -count=1 ✅
  • cd provider-swift && swift build ✅
  • cd provider-swift && swift test --filter "CLIDispatchTests|CatalogFilterTests|ModelPrefetchCoordinatorTests" ✅
  • Full swift test exits non-zero due to a pre-existing MLX error: Failed to load the default metallib crash in a live-model test, unrelated to these changes.

Closes the feedback where providers "actively try to use" models that the coordinator does not support.

Make the provider treat the coordinator model catalog as the single source
of truth for which local weights can be discovered, advertised, served, or
diagnosed. Non-catalog weights are invisible to the network and to the
operator-facing CLI.

- Fetch and cache the coordinator catalog at startup; fail closed if unavailable.
- Filter all local model paths through the catalog before applying enabled_models/--model/--all.
- Harden runtime prefetch and coordinator registration to drop non-catalog builds.
- Update doctor, models catalog, status, benchmark, and docs.
- Add Swift + Go tests for catalog filtering.
@vercel

vercel Bot commented Jun 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
d-inference Ready Ready Preview Jun 18, 2026 10:13pm
d-inference-console-ui-dev Ready Ready Preview Jun 18, 2026 10:13pm
d-inference-landing Ready Ready Preview Jun 18, 2026 10:13pm

Request Review

@github-actions

github-actions Bot commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

This PR introduces a server-side model catalog gate in provider.go and supporting documentation/comment changes; no mitigations are weakened, but two subtle security-relevant nuances deserve attention before merge.


Trust Boundaries Touched

  • TB-002 — Coordinator ↔ Provider WebSocket (model filtering at registration)
  • TB-003 — Provider operator vs. process (config comment clarification only)

Threat Assessment

T-034 — Provider runs modified code while advertising a trusted identity

ℹ️ Neutral on the core APNs code-identity chain; minor strengthening of the model-registration surface.

coordinator/api/provider.go:155–178 adds filterRegistrationModels, which strips non-catalog model IDs at registration time. This is explicitly documented as a server-side backstop complementing existing client-side filtering.

Security posture notes:

  • The function is called before s.registry.Register() at line 244. That means the registry never sees unsupported model IDs — good, it tightens the attack surface where a malicious provider could inflate routing state with garbage entries.
  • IsAliasLineageBuild pass-through for retired builds (provider.go:162) is intentional and correctly documented. From a security standpoint this is a narrow, catalog-controlled exception; the coordinator's own registry determines what constitutes a valid alias lineage, so the adversary (ADV-001) gains nothing by advertising a retired ID the coordinator doesn't recognise.
  • The filter has no effect on the attestation or trust-level path — those continue unchanged. It does not weaken or bypass any step of the APNs challenge (T-034 mitigations remain intact).

T-009 — Swift provider excluded from private-request routing due to missing Python flags

ℹ️ Neutral — no change to the routing gate logic itself.

The ProviderLoop.swift diff (+1758) adds only an explanatory comment about why the startup catalog snapshot is not re-checked at models_update time. It does not change flag handling or the routing gate. SEC-017 remains open.

T-008 — Provider sends plaintext SSE chunks on encryption failure

ℹ️ Neutral — no change to the encryption/plaintext fallback path in ProviderLoop.swift.

T-010 — In-flight inference cancellation not propagated to inference engine

ℹ️ Neutral — no change to cancellation handling.

T-011 — Provider operator reads X25519 private key from config file

ℹ️ Neutral — ProviderConfig.swift diff is a doc-comment reword only. The enabledModels field description is updated to note catalog gating. No changes to key storage or secret handling. SEC-015/T-011 remain open.


New Attack Surface

⚠️ IsAliasLineageBuild oracle via registration probing (not covered by an existing threat)

filterRegistrationModels returns the dropped model IDs in a log line (provider.go:234, "dropped", dropped). This is a coordinator-internal log — not returned to the caller — so external adversaries (ADV-003) cannot observe it directly. However:

  • A malicious provider (ADV-001) can probe which model IDs are silently dropped vs. kept by registering with arbitrary model ID lists and observing whether downstream routing state changes (e.g. via the provider's own desired_models update or the public provider-list endpoints). This creates a semi-blind oracle for coordinator catalog and alias lineage membership.
  • The practical impact is low: the catalog is not intended to be secret, and a provider already learns its desired models through the normal update flow. This does not cross a trust boundary in a new way, but it is worth noting if catalog contents are ever considered sensitive.

Recommendation: No immediate action required, but if the alias lineage or catalog is ever treated as confidential, the dropped-ID log line should be moved to Debug level or the list should be omitted ("dropped_count" only).


Open Findings Resolved

None — this PR does not close any SEC-* findings.


Minor Nit

provider.go:228–235: the len(dropped) > 0 guard means the regMsg.Models = filtered assignment only runs when something was dropped. If all models are in the catalog, filtered is left as-is — correct. But if all models are dropped (empty filtered), regMsg.Models is set to nil (since filtered is a nil slice from var filtered []protocol.ModelInfo). Verify that registry.Register() and subsequent code handle a nil Models slice the same as an empty slice to avoid a nil-dereference downstream.


🔐 Threat model: docs/threat-model.yaml · Updates on each push to this PR

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0d9bff2629

ℹ️ 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".


// Fetch the coordinator catalog. A cached snapshot is used as a fallback
// so offline commands can still distinguish supported models.
let catalog = try? await fetchCatalogSnapshot(coordinatorURL: config.coordinator.url)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Fetch the catalog from the overridden coordinator

When darkbloom start --coordinator-url ... is used, the snapshot now fetches the catalog from config.coordinator.url before Start computes the override, while the launched daemon still connects to the overridden coordinator. In dev/staging or self-hosted runs with a different catalog, this new catalog gate validates against the wrong coordinator, so override-only models can be dropped or unrelated config/prod models can be advertised. Pass the effective coordinator URL into the catalog fetch for start modes that support an override.

Useful? React with 👍 / 👎.

Comment on lines +249 to +250
if !effectiveOverrides.isEmpty {
selectedModels = advertisedModels(from: snapshot.models, config: config, catalog: snapshot.catalog, modelOverrides: effectiveOverrides)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve explicit model filters after catalog drops

If a launchd plist or explicit --model list contains only models that are no longer in the catalog, effectiveOverrides becomes empty and this condition falls through to the default advertisedModels(...) path. In that scenario the provider can start serving every enabled/downloaded catalog model instead of the operator's pinned selection, broadening the advertised inventory after a retirement or typo. Keep the branch keyed on the original model list and let an empty filtered override set produce no selected models.

Useful? React with 👍 / 👎.

Comment on lines +1770 to +1772
if let catalog = loopConfig.catalog {
let catalogIDs = Set(catalog.models.map(\.id))
guard catalogIDs.contains(modelId) else {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Don't gate verified prefetches on a stale catalog

When an alias is repointed or a new desired build is promoted while a provider is already connected, the coordinator fans out fresh desired_models and CatalogModelPrefetcher resolves that build against the live coordinator catalog, but this guard checks only the startup snapshot. Providers that successfully download and verify a newly-added build will refuse to advertise it until they restart, so live model rollouts cannot converge on the existing fleet.

Useful? React with 👍 / 👎.

// The provider is expected to filter its advertised set client-side,
// but this is the server-side backstop that keeps unsupported weights
// out of provider counts and routing state.
if filtered, dropped := s.filterRegistrationModels(regMsg.Models); len(dropped) > 0 {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep retired alias builds long enough to resync

For a provider that was offline through the end of an alias rollout, its only advertised build can be an alias retired_builds member that is intentionally no longer in the active catalog; DesiredModelsForProvider has explicit retired-lineage handling so that returning provider can be sent the current desired build. Dropping the retired model before registration erases that lineage, so the coordinator sends no desired_models and the provider stays stranded instead of self-updating.

Useful? React with 👍 / 👎.

config: ProviderConfig,
hardware: HardwareInfo
) async throws {
guard snapshot.catalog != nil else {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Allow direct mode to start without a catalog

--local is documented as a coordinator-less local server and even supports trusted/airgapped use, but this new guard makes it fail on a fresh offline machine unless a coordinator catalog was fetched or cached first. A user with already-downloaded local weights can no longer start the direct OpenAI endpoint when the coordinator is unreachable, even though that mode does not connect to the coordinator. Let direct mode fall back to local model selection instead of requiring a live/catalog cache.

Useful? React with 👍 / 👎.

- Fetch catalog from the effective coordinator URL so --coordinator-url
  overrides apply to both the catalog source and the connect target.
- Preserve explicit --model intent when all pinned IDs are filtered out
  (launchd/foreground path no longer falls through to --all/default).
- Remove stale startup-catalog gate from applyVerifiedPrefetch; live alias
  repoints and new build rollouts are validated by the prefetcher and the
  coordinator's models_update gate.
- Keep retired alias builds at coordinator registration so offline-through-
  retirement providers can still receive desired_models updates.
- Allow --local mode to start without a catalog, using local model selection
  for offline/airgapped use.
- Add tests for retired-alias registration and localAdvertisedModels.
@Gajesh2007

Copy link
Copy Markdown
Member Author

Addressed the Codex review feedback in commit 4b8d727a:

  1. Fetch catalog from overridden coordinator — loadRuntimeSnapshot now accepts an optional coordinatorURLOverride and Start passes --coordinator-url through so the catalog source and connect target stay consistent.

  2. Preserve explicit --model filters after catalog drops — the launchd/foreground path now keys on the original --model list; if every pinned ID is filtered out, the provider advertises nothing instead of falling through to --all/default.

  3. Don't gate verified prefetches on a stale catalog — removed the startup-snapshot catalog check from applyVerifiedPrefetch. CatalogModelPrefetcher already resolves against the live coordinator catalog, and models_update is the authoritative backstop.

  4. Keep retired alias builds for resync — filterRegistrationModels now keeps models that are in the active catalog or are previous/retired members of an active alias lineage, so providers offline through a retirement still receive desired_models.

  5. Allow --local mode without a catalog — local/direct mode now falls back to local model selection when no catalog is available, preserving offline/airgapped use. When a catalog is available it still filters normally.

Added tests for retired-alias registration preservation and localAdvertisedModels. Coordinator go test ./... and targeted Swift tests (CatalogFilterTests, ModelPrefetchCoordinatorTests, CLIDispatchTests) pass.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4b8d727a77

ℹ️ 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".

let alternatives = allModels.map {
// Diagnose only models the coordinator currently advertises. Local
// weights that are not in the catalog are never served.
let supportedModels = catalogFilteredModels(snapshot.models, catalog: snapshot.catalog)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Diagnose model fit from the unfiltered local scan

This now feeds the doctor fit check from snapshot.models, but that snapshot is built with ModelScanner.scanModels, which filters out any downloaded model whose estimatedMemoryGb exceeds available memory. When an operator has configured or loaded a catalog-supported model that is too large for the Mac, the target is absent from supportedModels, so doctor falls back to another model or emits no fit warning instead of flagging the exact model that will fail to load. Use the unfiltered local scan and then apply the catalog filter so too-large supported models can still be diagnosed.

Useful? React with 👍 / 👎.

/// unavailable so the caller's existing "no models" guard still fires.
private func catalogFilteredOverrides(_ overrides: [String], catalog: CatalogSnapshot?) -> [String] {
guard let catalog else { return overrides }
let catalogIDs = Set(catalog.models.map(\.id))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve alias lineage in foreground model filters

Fresh evidence: although the server-side registration filter now keeps alias lineage, this new foreground filter still allows only catalog.models IDs and ignores catalog.aliases.previous_build / retired_builds. A provider whose launchd plist contains only the previous or retired build after being offline through an alias rollout will drop that --model, hit the empty-selection guard, and exit before it can register and receive the coordinator's desired_models update. Include alias lineage builds in the allowed set for stale plist filtering.

Useful? React with 👍 / 👎.

Comment on lines 58 to 62
let models = advertisedModels(
from: snapshot.models,
config: snapshot.config,
catalog: snapshot.catalog,
includeDisabled: all

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Honor --all when listing local models

For darkbloom models list --all, this still passes the coordinator catalog into advertisedModels, so --all only bypasses enabled_models and continues to hide any downloaded weights that are off-catalog or when the catalog/cache is unavailable. The command is documented as listing local cached models, and operators need this path to inventory/remove unsupported downloads; use the unfiltered local scan for --all or report unsupported models separately instead of dropping them.

Useful? React with 👍 / 👎.

}

let models = advertisedModels(from: snapshot.models, config: snapshot.config)
let models = advertisedModels(from: snapshot.models, config: snapshot.config, catalog: snapshot.catalog)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Let local benchmarks run without a catalog

When the coordinator catalog cannot be fetched and no cache exists, advertisedModels returns an empty list, so darkbloom benchmark --model <downloaded-id> fails before it ever loads the local model. Benchmarking is a local operation that only needs downloaded weights and hardware info, so tying it to catalog reachability breaks offline performance experiments and benchmarking of local-only weights; fall back to the local model selection path here rather than the network-advertising filter.

Useful? React with 👍 / 👎.

} catch {
// Fall back to the on-disk cache so offline/briefly-unreachable
// commands still see the last known catalog.
return CatalogCache.read()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Scope cached catalogs to the coordinator URL

Fresh evidence: the live fetch now uses the overridden coordinator, but failures fall back to one global ~/.cache/darkbloom/catalog.json written by whichever coordinator was contacted last. When switching between prod, staging, or self-hosted coordinators, a transient catalog fetch failure can validate startup/status against another coordinator's catalog, dropping override-only models or accepting stale IDs; key the cache by coordinator base URL or ignore it when it was populated from a different coordinator.

Useful? React with 👍 / 👎.

@blacksmith-sh

blacksmith-sh Bot commented Jun 18, 2026 •

Copy link
Copy Markdown
Contributor

Found 8 test failures on Blacksmith runners:

Failures

Test View Logs
github.com/eigeninference/d-inference/e2e/TestIntegration_BillingBalanceDeduction View Logs
github.com/eigeninference/d-inference/e2e/TestIntegration_E2EEncryptionCorrectness View Logs
github.com/eigeninference/d-inference/e2e/TestIntegration_InsufficientBalance View Logs
github.com/eigeninference/d-inference/e2e/TestIntegration_InvalidModel View Logs
github.com/eigeninference/d-inference/e2e/TestIntegration_MultipleRequestsAccounting View Logs
github.com/eigeninference/d-inference/e2e/TestIntegration_NonStreamingInference View Logs
github.com/eigeninference/d-inference/e2e/TestIntegration_ProviderPayoutSplit View Logs
github.com/eigeninference/d-inference/e2e/TestIntegration_StreamingInference View Logs

Fix with Codesmith
Need help on this PR? Tag /codesmith with what you need.

- RuntimeSnapshot now carries both memory-filtered (loadable) and unfiltered
  local model scans; doctor diagnoses from the unfiltered set so too-large
  supported models are still flagged.
- Preserve alias previous/retired lineage in foreground --model filters and
  validation by using a new catalogAllowedIDs() helper.
- darkbloom models list --all now inventories every discovered local weight,
  bypassing the coordinator catalog filter.
- darkbloom benchmark falls back to local model selection when no catalog is
  available, so offline/local-only benchmarking works.
- Catalog cache is now scoped by coordinator base URL; switching coordinators
  no longer risks cross-polluting offline fallback state.
- Add tests for catalogAllowedIDs and coordinator-scoped cache paths.
@Gajesh2007

Copy link
Copy Markdown
Member Author

Addressed the second round of Codex feedback in commit 8c04679c:

  1. Doctor diagnoses from unfiltered local scan — RuntimeSnapshot now carries both models (memory-filtered/loadable) and allModels (unfiltered). darkbloom doctor builds fit alternatives from the catalog-filtered set but diagnoses the target from the unfiltered scan, so too-large supported models are still flagged.

  2. Preserve alias lineage in foreground --model filters — catalogAllowedIDs() includes active catalog models plus alias previous_build / retired_builds. Both validateModelSelections and catalogFilteredOverrides now use this set, so stale launchd plists containing retired/previous builds are kept until the coordinator can push a desired_models update.

  3. darkbloom models list --all shows every local weight — --all now bypasses the coordinator catalog and enabled_models filters, using the unfiltered local scan so operators can inventory and remove unsupported downloads.

  4. darkbloom benchmark works offline — when no catalog is available, benchmark falls back to local model selection instead of returning an empty list.

  5. Scope catalog cache to coordinator URL — CatalogCache.path(for:) derives a per-coordinator filename from the normalized base URL. A transient fetch failure on one coordinator no longer falls back to a cache populated by another.

Added tests for catalogAllowedIDs and coordinator-scoped cache paths. Coordinator go test ./... and targeted Swift tests (CLIDispatchTests, CatalogFilterTests, ModelPrefetchCoordinatorTests) pass.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8c04679c9d

ℹ️ 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".

await runUpdateBannerIfEnabled()

let snapshot = try loadRuntimeSnapshot(configOptions: configOptions)
let snapshot = try await loadRuntimeSnapshot(configOptions: configOptions)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use the override when loading the doctor catalog

When running darkbloom doctor --coordinator <staging-or-self-hosted>, this snapshot load now fetches and caches the coordinator model catalog, but it still uses the config coordinator instead of the --coordinator override while the later network checks use the override. That makes doctor diagnose model catalog availability/fit against prod or the cached config coordinator, producing false “catalog unavailable” or wrong supported-model results for the coordinator the operator is actually checking; pass coordinatorURLOverride: coordinator here.

Useful? React with 👍 / 👎.

Comment on lines +270 to +271
if effectiveOverrides.isEmpty {
selectedModels = []

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Validate daemon selections before installing launchd

When a user runs regular darkbloom start --model <non-catalog-id> (or --all on a cache with no catalog-supported models), the parent path still writes the raw IDs into the launchd plist and prints “Provider started”; only the foreground child reaches this new empty-selection branch and exits immediately. Filter/validate the selected IDs in launchDaemon before LaunchAgent.installAndStart so the command fails synchronously or installs only servable catalog IDs.

Useful? React with 👍 / 👎.

- DoctorCommand now passes --coordinator override into loadRuntimeSnapshot so
  the catalog is fetched/cached from the same coordinator used for diagnostics.
- launchDaemon validates selections before installing the launchd plist:
  explicit --model selections are checked against catalogAllowedIDs, and --all
  is resolved to the actual catalog-supported model set (failing early if no
  catalog or no supported models are available).

Build + targeted Swift tests pass; coordinator go test ./... passes.
@Gajesh2007

Copy link
Copy Markdown
Member Author

Addressed the third round of Codex feedback in commit 85e5190b:

  1. Doctor uses --coordinator override for catalog — DoctorCommand now passes the override into loadRuntimeSnapshot, so darkbloom doctor --coordinator <url> fetches and caches the catalog from that coordinator.

  2. Validate daemon selections before installing launchd — launchDaemon now fails early instead of installing a plist that is guaranteed to crash-loop: explicit --model IDs are checked against catalogAllowedIDs(), and --all is resolved to the actual catalog-supported model set before LaunchAgent.installAndStart is called.

Coordinator go test ./... and targeted Swift tests (CLIDispatchTests, CatalogFilterTests, ModelPrefetchCoordinatorTests) pass.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 85e5190b78

ℹ️ 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".


mutating func run() async throws {
let snapshot = try loadRuntimeSnapshot(configOptions: configOptions)
let snapshot = try await loadRuntimeSnapshot(configOptions: configOptions)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use the verify override when loading the catalog

When darkbloom verify --coordinator <staging-or-self-hosted> is used, the coordinator checks below use the override but this snapshot still fetches the model catalog from the configured coordinator. That makes the strict doctor-style local checks validate traffic readiness against the wrong catalog/cache, so a valid staging/self-hosted setup can warn or exit non-zero because prod/config catalog data is missing or different; pass coordinatorURLOverride: coordinator here as doctor now does.

Useful? React with 👍 / 👎.

@Gajesh2007 Gajesh2007 closed this Sep 14, 2026
jonathan308 added a commit that referenced this pull request Nov 10, 2026
The library pull request branch now holds a merge of library main
7f196e02c2, so the pin moves from 6d2c82a0e4 to that merge. The merge adds
library #395 (nullable tool arguments), #302 (the Qwen3.5 MTP prefill
projects only the last prompt position), #364 (the Gemma 4 dispatch change),
#365 (reuse of compiled Gemma 4 feed-forward graphs) and #366 (greedy
batches skip unused sampler metadata). dev does not have them yet. No
provider source changes.

The pin stays provisional until the library pull request merges.

Co-Authored-By: Claude <noreply@anthropic.com>
jonathan308 added a commit that referenced this pull request Nov 10, 2026
libs/mlx-swift-lm moves from fd48d47f to 093563be, the merge commit of mlx-swift-lm #367 on
main. It holds every 0.10.12 SDK PR, each merged with a merge commit: #372, #301, #395 (nullable
tool arguments), #302, #364, #365, #366 and #367. libs/mlx-swift and libs/mlx are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 added a commit that referenced this pull request Nov 10, 2026
libs/mlx-swift-lm moves from 04940f55 to 093563be, the merge commit of mlx-swift-lm #367 on
main. It holds every 0.10.12 SDK PR, each merged with a merge commit: #372, #301, #395 (nullable
tool arguments), #302, #364, #365, #366 and #367. libs/mlx-swift and libs/mlx are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 added a commit that referenced this pull request Nov 10, 2026
libs/mlx-swift-lm moves from 1aace467 to 093563be, the merge commit of mlx-swift-lm #367 on
main. It holds every 0.10.12 SDK PR, each merged with a merge commit: #372, #301, #395 (nullable
tool arguments), #302, #364, #365, #366 and #367. libs/mlx-swift and libs/mlx are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 added a commit that referenced this pull request Nov 10, 2026
libs/mlx-swift-lm moves from f6b9ac22 to 093563be, the merge commit of mlx-swift-lm #367 on
main. It holds every 0.10.12 SDK PR, each merged with a merge commit: #372, #301, #395 (nullable
tool arguments), #302, #364, #365, #366 and #367. libs/mlx-swift and libs/mlx are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 added a commit that referenced this pull request Nov 10, 2026
libs/mlx-swift-lm moves from 51da1368 to 093563be, the merge commit of mlx-swift-lm #367 on
main. It holds every 0.10.12 SDK PR, each merged with a merge commit: #372, #301, #395 (nullable
tool arguments), #302, #364, #365, #366 and #367. libs/mlx-swift and libs/mlx are unchanged.

changelog.d/qwen35-mtp-prefill-last-row.md: mlx-swift-lm #302 (Qwen 3.5 MTP prompts project only their last
position) rides this pin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch had an error being deployed

1 failed and 3 active deployments
Preview – d-inference — 85e5190b Deployed Jun 18, 2026 by vercel[bot]
Preview – d-inference-console-ui-dev — 85e5190b Deployed Jun 18, 2026 by vercel[bot]
Preview – d-inference-landing — 85e5190b Deployed Jun 18, 2026 by vercel[bot]
benchmarks — 85e5190b Deployed Jun 18, 2026 by Gajesh2007 via E2E Benchmarks #1159
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.

1 participant