Skip to content

feat(nebius): switch to tokenfactory and sync model list - #2087

Merged
steebchen merged 4 commits into
mainfrom
nebius-tokenfactory
Apr 26, 2026
Merged

steebchen merged 4 commits into
mainfrom
nebius-tokenfactory

Conversation

@steebchen

@steebchen steebchen commented Apr 26, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Switch Nebius base URL from api.studio.nebius.com to api.tokenfactory.nebius.com
  • Add Nebius provider entry for kimi-k2.5 ($0.50 / $2.50 per 1M, $0.02 / 1M cached input)
  • Sync the Nebius provider list against Nebius's current active catalog:
    • Deactivate (with deactivatedAt: 2026-04-25) Nebius entries no longer in the active list: deepseek-r1-0528, qwen25-coder-7b, qwen3-coder-30b-a3b-instruct, qwen3-30b-a3b-thinking-2507, kimi-k2-instruct
    • Add Nebius provider to existing models that are in the active list: minimax-m2.5, qwen35-397b-a17b, qwen3-next-80b-a3b-thinking, glm-5, deepseek-v3.2, gpt-oss-120b

Not included

  • Brand-new model definitions on the active list that don't yet exist in this repo: NVIDIA Nemotron-3-Super-120b / Nano-30B, NousResearch Hermes-4-405B / 70B, Prime Intellect INTELLECT-3, Gemma-2-2b-it, Qwen3-Embedding-8B (no embedding model support in repo).

Test plan

  • TEST_MODELS=nebius/kimi-k2.5 pnpm test:e2e — 67 passed, 0 failed
  • pnpm build:core
  • e2e for newly-added Nebius providers on existing models (skipped to keep this PR focused — capability flags are best-guess and may need follow-up tuning)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Updates

    • Switched the Nebius API base endpoint used by the app.
    • Marked select Nebius provider entries as deactivated effective April 25, 2026.
  • New Features

    • Added Nebius-backed provider options for multiple models (Alibaba Qwen, DeepSeek, MiniMax, Moonshot, gpt-oss-120b, GLM-5), expanding available models and capabilities (streaming, reasoning, tools, JSON output where applicable).

steebchen and others added 2 commits April 26, 2026 19:23
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Deactivate nebius providers for models retired from Nebius (DeepSeek-R1-0528,
Qwen2.5-Coder-7B-fast, Qwen3-Coder-30B-A3B-Instruct, Qwen3-30B-A3B-Thinking-2507,
Kimi-K2-Instruct) and add nebius providers for active list models
(MiniMax-M2.5, Qwen3.5-397B-A17B, Qwen3-Next-80B-A3B-Thinking, GLM-5,
DeepSeek-V3.2, gpt-oss-120b).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 26, 2026 12:36
@coderabbitai

coderabbitai Bot commented Apr 26, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 80fa53ba-1f64-46e4-8a59-fe6d304b13ab

📥 Commits

Reviewing files that changed from the base of the PR and between 9e1c71e and 993098e.

📒 Files selected for processing (1)
  • packages/models/src/models/minimax.ts

Walkthrough

Change Nebius provider base URL from https://api.studio.nebius.com to https://api.tokenfactory.nebius.com. Add or update multiple nebius provider entries across model definition files, including several entries marked deactivated as of 2026-04-25.

Changes

Cohort / File(s) Summary
Provider Endpoint Configuration
packages/actions/src/get-provider-endpoint.ts
Replace hardcoded Nebius base host from https://api.studio.nebius.com to https://api.tokenfactory.nebius.com.
Model provider additions / deactivations
packages/models/src/models/alibaba.ts, packages/models/src/models/deepseek.ts, packages/models/src/models/minimax.ts, packages/models/src/models/moonshot.ts, packages/models/src/models/openai.ts, packages/models/src/models/zai.ts
Add new nebius provider entries for multiple models (pricing, context/max-output, capability flags). Mark several existing nebius provider entries as deactivatedAt: new Date("2026-04-25").

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main changes: switching Nebius provider endpoint to tokenfactory and synchronizing the model list with Nebius's active catalog.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch nebius-tokenfactory

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI 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.

Pull request overview

Updates Nebius integration to use the TokenFactory host and synchronizes the repo’s Nebius provider mappings with Nebius’s active model catalog so routing/pricing stays current.

Changes:

  • Switched Nebius default base URL from api.studio.nebius.com to api.tokenfactory.nebius.com.
  • Added/extended Nebius provider mappings for several existing model definitions (including new kimi-k2.5 pricing and additional Nebius availability for GLM-5, GPT OSS 120B, etc.).
  • Marked multiple Nebius mappings as deactivated as of 2026-04-25 where those models are no longer in Nebius’s active list.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/models/src/models/zai.ts Adds Nebius provider mapping for glm-5.
packages/models/src/models/openai.ts Adds Nebius provider mapping for gpt-oss-120b.
packages/models/src/models/moonshot.ts Deactivates Nebius kimi-k2-instruct mapping; adds Nebius Kimi-K2.5 mapping with pricing.
packages/models/src/models/minimax.ts Adds Nebius provider mapping for minimax-m2.5.
packages/models/src/models/deepseek.ts Deactivates Nebius deepseek-r1-0528; adds Nebius provider mapping for deepseek-v3.2.
packages/models/src/models/alibaba.ts Deactivates selected Nebius Qwen/DeepSeek mappings; adds Nebius mappings for additional active Qwen models.
packages/actions/src/get-provider-endpoint.ts Updates Nebius base URL used for endpoint construction.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 226 to 228
case "nebius":
url = "https://api.studio.nebius.com";
url = "https://api.tokenfactory.nebius.com";
break;

Copilot AI Apr 26, 2026

Copy link

Choose a reason for hiding this comment

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

getProviderEndpoint() now hardcodes a different Nebius base URL, but there is no unit test asserting the Nebius default endpoint. Please add/update a test in packages/actions/src/get-provider-endpoint.spec.ts to lock in the expected Nebius URL (e.g. https://api.tokenfactory.nebius.com/v1/chat/completions) so future changes don’t silently break Nebius routing.

Copilot uses AI. Check for mistakes.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/models/src/models/moonshot.ts`:
- Around line 278-292: Update the Nebius model entry where providerId is
"nebius" and modelName is "moonshotai/Kimi-K2.5": set the properties tools and
jsonOutput from false to true so the configuration reflects Nebius's support for
tool-calling and JSON response format; keep all other fields unchanged
(inputPrice, cachedInputPrice, outputPrice, requestPrice, contextSize,
maxOutput, streaming, reasoning, vision).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b3ad7c48-9229-4438-a6d0-90ae5e72a420

📥 Commits

Reviewing files that changed from the base of the PR and between 9a7f6c9 and 840210c.

📒 Files selected for processing (7)
  • packages/actions/src/get-provider-endpoint.ts
  • packages/models/src/models/alibaba.ts
  • packages/models/src/models/deepseek.ts
  • packages/models/src/models/minimax.ts
  • packages/models/src/models/moonshot.ts
  • packages/models/src/models/openai.ts
  • packages/models/src/models/zai.ts

Comment thread packages/models/src/models/moonshot.ts
steebchen and others added 2 commits April 26, 2026 20:09
Streaming tool calls intermittently emit reasoning only without the
tool_calls delta; response_format: json_object is not consistently
honored (output is sometimes wrapped in markdown fences).
Underlying capabilities exist, so flag tools/jsonOutput true and mark
the provider unstable.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Match the kimi-k2.5 fix: the model supports tools (Nebius lists it as an
agentic coding model with interleaved-thinking tool calls) but Nebius'
streaming tool calls and json_object enforcement are unreliable.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@steebchen
steebchen added this pull request to the merge queue Apr 26, 2026
@steebchen
steebchen removed this pull request from the merge queue due to a manual request Apr 26, 2026
@steebchen
steebchen merged commit 62bca37 into main Apr 26, 2026
17 of 18 checks passed
@steebchen
steebchen deleted the nebius-tokenfactory branch April 26, 2026 13:34
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.

2 participants