Skip to content

Add Nebius Token Factory provider#193

Open
amrrs wants to merge 1 commit into
andrewyng:mainfrom
amrrs:nebius-token-factory
Open

Add Nebius Token Factory provider#193
amrrs wants to merge 1 commit into
andrewyng:mainfrom
amrrs:nebius-token-factory

Conversation

@amrrs

@amrrs amrrs commented Jul 26, 2026

Copy link
Copy Markdown

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 _compat descriptor plus curated matrix rows in Nebius' own model namespaces.

  • providers/registry.py: one _compat descriptor (https://api.tokenfactory.nebius.com/v1, NEBIUS_API_KEY).
  • providers/matrix.py: four curated nebius: rows (GLM-5.2, DeepSeek V4 Pro, Kimi K2.6, Qwen3.5 397B).
  • GUI: the brand mark (vendored from the same MIT lobe-icons set the other logos come from), its slot in PROVIDER_ORDER, and the "where do I get a key" deep link.
  • tests/test_providers.py: nebius folded 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.'}
  • Tool calling on all four curated ids, e.g. ToolCall(id='call_0eaf…', name='get_weather', arguments={'city': 'Paris'})
  • Plain completions and streaming both fine; reasoning_content deltas surface as reasoning (the existing DeepSeek-style path), so thinking text is captured rather than mixed into the answer.
  • Capabilities resolve exactly from the matrix: tools=True parallel_tool_calls=True streaming=True pdf=False — PDFs correctly fall back through pdf_support.py, like every other compat vendor.

Test suites

  • pytest — 889 passed, 1 skipped
  • npm run build (tsc + vite) — clean
  • npm test (vitest) — 68 passed
  • npm run e2e (Playwright) — 154 passed

Screenshots

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:

Provider gallery with Nebius Token Factory

Its setup form gets the prefilled endpoint, the key deep link, and the four curated models:

Nebius setup form

And Test → save flips the card to ✓ Connected:

Nebius connected

Made with Cursor

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

1 participant