feat(nebius): switch to tokenfactory and sync model list - #2087
Conversation
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>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughChange Nebius provider base URL from Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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.comtoapi.tokenfactory.nebius.com. - Added/extended Nebius provider mappings for several existing model definitions (including new
kimi-k2.5pricing and additional Nebius availability for GLM-5, GPT OSS 120B, etc.). - Marked multiple Nebius mappings as deactivated as of
2026-04-25where 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.
| case "nebius": | ||
| url = "https://api.studio.nebius.com"; | ||
| url = "https://api.tokenfactory.nebius.com"; | ||
| break; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
📒 Files selected for processing (7)
packages/actions/src/get-provider-endpoint.tspackages/models/src/models/alibaba.tspackages/models/src/models/deepseek.tspackages/models/src/models/minimax.tspackages/models/src/models/moonshot.tspackages/models/src/models/openai.tspackages/models/src/models/zai.ts
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>
Summary
api.studio.nebius.comtoapi.tokenfactory.nebius.comkimi-k2.5($0.50 / $2.50 per 1M, $0.02 / 1M cached input)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-instructminimax-m2.5,qwen35-397b-a17b,qwen3-next-80b-a3b-thinking,glm-5,deepseek-v3.2,gpt-oss-120bNot included
Test plan
TEST_MODELS=nebius/kimi-k2.5 pnpm test:e2e— 67 passed, 0 failedpnpm build:core🤖 Generated with Claude Code
Summary by CodeRabbit
Updates
New Features