Bind synced routes on generated and model-grained polls (Lovable, NVIDIA) #737 (GitHub #736)
main fromfix/716-lovable-synced-routes·merged by tombeckenham View on GitHubPart of #716.
Root cause. loadInputWalks (src/server/ingest/poll-models.ts) returned before loading any input schema when the provider skips the fact walk (defaultDerivation: 'generated' or specGrain: 'model') and no listed model carries a rate card. The bindSyncedRoutesOnly strip then found no synced route in the empty properties map and nulled every listed schemaEndpointId, synced or not.
Fix. That early return no longer applies when bindSyncedRoutesOnly is set, so the synced input schemas for the listed routes are loaded. The walk is still skipped (no capability flags are stamped from a generated or model-grained spec), the strip still runs, and a route with no synced input schema still stays unbound. No default route, no model-to-route table.
Providers that change (only bindSyncedRoutesOnly providers on the early-return path):
- lovable (generated, no cards): 21 of 26 chat rows gain a route (20
chat/completions, 1responses, e.g.openai/gpt-5.5: null →chat/completions). Non-chat rows whose listed route is synced (embeddings, images, audio, videos) bind too. - nvidia (model-grained, no cards): all 20 chat rows gain their per-model route (e.g.
z-ai/glm-5.3-flash: null →z-ai/glm-5.3-flash). Every one already hadfactSources.schemaEndpointIdand a synced endpoint inGET /v1/schemas/nvidia; only the value was stripped. Embeddings rows likewise. - cloudflare-ai-gateway (model-grained) changes only on a poll whose listing has no rate card; with cards it already took the full path.
All other bindSyncedRoutesOnly providers use the provider grain and a non-generated derivation, so they already loaded schemas.
Stays unbound. The 5 Lovable Anthropic rows (anthropic/claude-*) list only the messages surface, which Lovable's spec sync does not include, so no route is synced for them. dashscope-cn, google-vertex-anthropic and the Kimi Code plans are a different cause and are not touched here.
Test. poll-models.worker.test.ts: generated and model-grained listings with no rate card bind a synced route, leave an unsynced one null, and walk no capabilities. Both cases failed before the fix.
- 1
Warning
Review limit reached#
You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.
Next included review available in 40 minutes.
View limit details
-
Limit details: You’ve used the included review currently available.
Review configuration:
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
48b986c2-96f8-4c02-b481-51ee617be0f3
Commits-
Reviewing files that changed from the base of the PR and between af32bd8154d134a5b80067a3ef928b4f14576fac and 11312e5dd2e9bf33f1aae8f636186e5200888ca1.
Files selected for processing: 2-
src/server/ingest/poll-models.tssrc/server/ingest/poll-models.worker.test.ts
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
-
tombeckenham merged this921e344
tombeckenham closed this
Sign in to join this conversation.
⚠️ No Changeset found#
Latest commit: 11312e5dd2e9bf33f1aae8f636186e5200888ca1
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR