Add Nebius Token Factory provider#193
Open
amrrs wants to merge 1 commit into
Open
Conversation
Nebius Token Factory serves many labs' models behind one key over an OpenAI-compatible API, so it joins Together/Fireworks as a reseller descriptor plus curated matrix rows in their own namespaces. Verified against the live API on 2026-07-26: /v1/models, a tool-call round-trip and streaming on all four curated ids, and verify_provider_key for both a good and a bad key. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Nebius Token Factory as a first-class provider. Like Together and Fireworks, it serves many labs' models behind one key over an OpenAI-compatible API, so it slots into the existing reseller shape — no new client code, just a
_compatdescriptor plus curated matrix rows in Nebius' own model namespaces.providers/registry.py: one_compatdescriptor (https://api.tokenfactory.nebius.com/v1,NEBIUS_API_KEY).providers/matrix.py: four curatednebius:rows (GLM-5.2, DeepSeek V4 Pro, Kimi K2.6, Qwen3.5 397B).PROVIDER_ORDER, and the "where do I get a key" deep link.tests/test_providers.py:nebiusfolded into the two existing reseller assertions (matrix capabilities, descriptor ⇄ matrix lockstep).25 insertions across 6 files. The endpoint help notes that the former AI Studio host (
api.studio.nebius.com/v1) still resolves, for anyone with an older key.Verification against the live API (2026-07-26)
Run through the real code path (
build_provider_client("nebius", …)) with a live key:verify_provider_key→{'ok': True}; a bad key →{'ok': False, 'error': 'Invalid API key.'}ToolCall(id='call_0eaf…', name='get_weather', arguments={'city': 'Paris'})reasoning_contentdeltas surface as reasoning (the existing DeepSeek-style path), so thinking text is captured rather than mixed into the answer.tools=True parallel_tool_calls=True streaming=True pdf=False— PDFs correctly fall back throughpdf_support.py, like every other compat vendor.Test suites
pytest— 889 passed, 1 skippednpm run build(tsc + vite) — cleannpm test(vitest) — 68 passednpm run e2e(Playwright) — 154 passedScreenshots
Before, the provider gallery had no way to reach Nebius — a user had to know the "point the OpenAI slot at a different endpoint" trick. Now it is a card like any other:
Its setup form gets the prefilled endpoint, the key deep link, and the four curated models:
And Test → save flips the card to ✓ Connected:
Made with Cursor