feat(nebius): sync Token Factory models with automated catalog#3190
feat(nebius): sync Token Factory models with automated catalog#3190amrrs wants to merge 6 commits into
Conversation
Action items
|
Adds a sync provider for Nebius Token Factory (verbose /v1/models endpoint) so model list, pricing, context length, and capability flags stay in sync automatically, resolving base_model references against canonical models/ metadata where available. Also switches the model sync automation from an hourly to a daily schedule. Co-authored-by: Cursor <cursoragent@cursor.com>
The previous commit inadvertently changed the global sync cadence from hourly to daily. That change affects every provider, not just Nebius, and is out of scope for the Nebius Token Factory sync PR. Reverting to the original hourly schedule; a cadence change should be evaluated on its own merits in a separate PR. Co-authored-by: Cursor <cursoragent@cursor.com>
Addresses review feedback on PR anomalyco#2971: - Only trust the API's context_length when it's >= the existing/canonical context and the input limit, since the verbose=true endpoint has been observed returning a throttled 8_000 default; repair the 8 already affected model files accordingly. - Revert the two sync.md "daily" mentions back to "hourly" so the docs match the (already-hourly) workflow cron. - Share canonical base-model resolution with openrouter.ts via a new createCanonicalBaseModelResolver factory instead of reimplementing resolveCanonicalBaseModel/modelMetadataExists/the file-scan cache. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
dev's "feat: model descriptions" made `description` a required schema field for full (non-factored) models. Nebius's factored entries already inherit it from canonical metadata (same as name), but the two orphan full entries (Cosmos3-Super-Reasoner, MiniCPM-V-4_5) had no source to inherit from, so give buildNebiusModel the same describeModel-based fallback OpenRouter uses, and backfill the two already-committed files. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ng options Addresses the automated review on PR anomalyco#3190: - tool_call/structured_output only ever gain from an API sample, never lose a capability an existing entry already had confirmed; modalities are unioned with the existing entry rather than replaced. The same verbose=true endpoint that throttles context_length has been observed under-reporting these too (MiniMax-M2.5, Llama-3.1-Nemotron-Ultra-253B, Nemotron-3-Nano-30B-A3B, Llama-3.3-70B-Instruct, gemma-3-27b-it, Qwen2.5-VL-72B-Instruct all lost a real capability/modality/context value this way); restored the affected files to their correct values. - Brand-new models with no canonical/existing reference and a context_length of exactly 8_000 (the confirmed throttled default) are now skipped rather than shipped with an unverifiable context; removed Cosmos3-Super-Reasoner and MiniCPM-V-4_5, which only existed because of this gap, and report the skip via skippedNotice for a future re-sync. - Hand-curated reasoning_options for the new reasoning-capable models (GLM-5.1, Kimi-K2.6, Kimi-K2.7-Code, Nemotron-3-Ultra-550b-a55b) to match sibling entries, since provider.toml documents the underlying chat completions endpoint accepting reasoning_effort even though the models-discovery API doesn't expose per-model evidence for it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
ee85a51 to
679f1d6
Compare
|
Thanks for the review — addressed all three action items, plus rebased onto 1. 2. 3. |
Action items
|
…idence Addresses the second automated review round on PR anomalyco#3190: - Extended openrouter.ts's canonicalCandidates with an alibaba-specific dot-to-dash candidate (2.5 -> 2-5), matching the legacy qwen2-5-vl-72b-instruct.toml naming that predates the qwen3.5-/qwen3.6- dotted convention; this also fixes OpenRouter's own un-factored copy of the same model on future syncs. Factored the Nebius entry to base_model = "alibaba/qwen2-5-vl-72b-instruct", keeping only the Nebius-specific overrides (attachment, structured_output, cost, limit). - Reasoning models already catalogued on this provider diverge by family (GLM/gpt-oss/DeepSeek use `effort`, Qwen3.5 uses `toggle`, the Nemotron siblings use neither) — provider.toml's generic reasoning_effort acceptance doesn't mean every model's backend honors it. Reverted the `effort` curation on Kimi-K2.6/Kimi-K2.7-Code/Nemotron-3-Ultra-550b-a55b (no same-family sibling evidence on this provider) back to `[]`, kept it only for GLM-5.1 (direct GLM-5.2 sibling), and tightened the sync-code/docs rationale to require same-family sibling evidence rather than provider-wide capability. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Thanks — both fixed. 1. 2. |
Replaces #2971, which was auto-closed as stale and couldn't be reopened (GitHub's reopen API kept failing with a generic error even with correct permissions — likely tied to how the stale-bot closure interacted with this repo). This branch is rebased onto current
devwith the same fixes already posted at #2971 (comment), plus the rebase conflict resolution below.What this does
Adds an automated sync provider for Nebius Token Factory (
packages/core/src/sync/providers/nebius.ts), following the same review feedback already given on #2971 by @rekram1-node:dev.context_lengthregression —resolveContext()now only accepts the API'scontext_lengthwhen it's>=the larger of the existing/canonical context and the input limit, so a throttled/default value from theverbose=trueendpoint can no longer clobber a correct context or producecontext < input. The models affected by the original regression (MiniMax-M2.5, Qwen3.5-397B-A17B, Qwen3-Next-80B-A3B-Thinking, Qwen3-32B, Llama-3.1-Nemotron-Ultra-253B, Nemotron-3-Nano-Omni, Kimi-K2.6, Nemotron-3-Ultra-550b-a55b) are corrected to inherit context from canonical metadata again.MiniCPM-V-4_5andCosmos3-Super-Reasonerare new models with nobase_modelmatch and no prior entry, so there's no in-repo ground truth to guard theircontext = 8_000against — fixing those needs a real re-sync with a working API key/tier.openrouter.tsnow exportscreateCanonicalBaseModelResolver(prefixes);nebius.tscalls into it with its own org→namespace map instead of reimplementingresolveCanonicalBaseModel,modelMetadataExists, and the file-scan cache.Rebase notes
devmoved forward substantially since this branch was opened (most notably a repo-wide "model descriptions" commit and anopenaisync provider added at the same points insync/index.tsandsync.md). Conflict resolution:-fastvariants,GLM-5,DeepSeek-V3.2,Kimi-K2.5, etc.) only conflicted becausedevadded adescriptionline to them after they were deleted here — kept the deletions.dev's newdescriptionline.descriptionis now a required schema field for full (non-factored) entries; Nebius's factored entries already inherit it from canonical metadata, sonebius.tsnow falls back to the samedescribeModel()helper OpenRouter uses for its two orphan full entries (Cosmos3-Super-Reasoner,MiniCPM-V-4_5).openrouter.tsgained aCANONICAL_BASE_MODEL_OVERRIDESlookup ondevindependently of this PR'screateCanonicalBaseModelResolverrefactor — merged both: the override check wraps OpenRouter's own resolver instance and isn't part of the generic factory Nebius uses.