Skip to content

fix(sync): handle FireRouter auto and missing DigitalOcean lifecycle - #8768

Merged
rekram1-node merged 3 commits into
devfrom
fix/sync-provider-shapes-20261004
Oct 4, 2026
Merged

rekram1-node merged 3 commits into
devfrom
fix/sync-provider-shapes-20261004

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Ignore kind: router entries from Fireworks' serverless model feed; firerouter/auto has dynamic routing and no fixed model pricing or modalities. Keep normal model rows strictly validated and leave a TODO to support routers explicitly.
  • DigitalOcean's models API still lists four retired Claude models without lifecycle_status, although they are absent from its public catalog. Parse those legacy rows so sync can continue; the four existing local TOMLs are already marked deprecated and retained. If a model selected for sync lacks lifecycle status, set its status to deprecated rather than guessing it is active or failing the whole feed.

Verification

  • bun test packages/core/test/fireworks-ai-sync.test.ts — 22 passed.
  • bun test packages/core/test/sync.test.ts -t DigitalOcean — 23 passed.
  • bun validate — passed.
  • Read-only checks against both live provider feeds: 25 Fireworks priced-model rows parsed after excluding one router, and 110 DigitalOcean API rows parsed (four legacy rows omit lifecycle and are excluded from the 66 managed text models).

Requested by: @rekram1-node (Aiden via Slack)

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Action items

  • [medium] [violation] packages/core/test/fireworks-ai-sync.test.ts:101 - Check: Async rejection assertions must be awaited. Why: expect(fetchFireworksModels(...)).rejects.toThrow() without await never verifies rejection, so the "without accepting incomplete model rows" case passes even if malformed rows are accepted. Action: Change to await expect(fetchFireworksModels("test-key", malformed)).rejects.toThrow();.

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Action items

  • [medium] [violation] packages/core/test/fireworks-ai-sync.test.ts:101 - Check: Async rejection assertions must be awaited. Why: expect(fetchFireworksModels("test-key", malformed)).rejects.toThrow(); without await or return never verifies the rejection, so the "without accepting incomplete model rows" claim passes even if malformed rows are accepted. Action: Await the assertion, e.g. await expect(fetchFireworksModels("test-key", malformed)).rejects.toThrow();.

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Action items

  • [high] [possible mistake] packages/core/src/sync/providers/digitalocean.ts:295 - Check: Preserve hand-authored status when the provider API omits the authoritative lifecycle field. Why: status() returns "deprecated" unconditionally when lifecycle_status === undefined, overriding an existing beta/active status, while blank lifecycle_status on the next line preserves existing. A transient omission on a catalog-listed active model would incorrectly deprecate it. Action: Return existing ?? "deprecated" for missing lifecycle (preserve when present, default to deprecated only for new models) and align blank-string handling.
  • [medium] [violation] packages/core/test/fireworks-ai-sync.test.ts:101 - Check: Async rejection assertion must be awaited. Why: expect(...).rejects.toThrow() without await does not verify the malformed kind: "model" row actually throws, so the strict-validation claim for non-router rows is untested and a regression would pass. Action: Change to await expect(...).rejects.toThrow().

@rekram1-node
rekram1-node merged commit 0696d11 into dev Oct 4, 2026
2 checks passed
@rekram1-node
rekram1-node deleted the fix/sync-provider-shapes-20261004 branch October 4, 2026 19:37
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