Skip to content

bug: update Nebius provider for Token Factory - #1765

Draft
demianarc wants to merge 1 commit into
Portkey-AI:mainfrom
demianarc:codex/update-nebius-token-factory
Draft

bug: update Nebius provider for Token Factory#1765
demianarc wants to merge 1 commit into
Portkey-AI:mainfrom
demianarc:codex/update-nebius-token-factory

Conversation

@demianarc

@demianarc demianarc commented Aug 13, 2026

Copy link
Copy Markdown

Description:

  • Update the existing Nebius provider from the former AI Studio API host to the canonical Nebius Token Factory base URL, https://api.tokenfactory.nebius.com/v1.
  • Remove retired chat, completion, and embedding model defaults. All three existing operations now require the caller's model, so catalog changes cannot silently route requests to an unavailable model.
  • Add focused provider tests for the canonical base URL, bearer authentication, Chat Completions/Embeddings/Completions request routes, configurable model contract, successful provider attribution, and normalized error attribution.
  • Preserve the existing OpenAI-compatible provider architecture. This does not add a duplicate provider or a Nebius-only Responses implementation; Responses should be enabled through the gateway-wide abstraction when its full contract is supported.
  • Narrow the shared chatCompleteParams model-default assignment after its existing array guard so the new provider tests can be typechecked under the repository's strict Jest configuration.

The previous Nebius provider hard-coded the retired AI Studio host and two model IDs absent from Token Factory's public catalog. The replacement keeps model selection configurable; openai/gpt-oss-120b and Qwen/Qwen3-Embedding-8B were also checked as current examples in the public models_info feed on 2026-08-13.

Tests Run/Test cases added:

  • npx jest src/providers/nebius/api.test.ts src/providers/nebius/index.test.ts --runInBand — 11 passed
  • npm run format:check — passed
  • npm run build — passed; existing Bytez TypeScript and Rollup external/circular-dependency warnings remain
  • repository pre-push hook — build and local gateway startup smoke test passed
  • git diff --check — passed
  • live public catalog lookup confirmed current example IDs and the absence of removed defaults
  • Full npm run test:gateway -- --runInBand is not green on upstream main: unrelated existing test paths are broken, .creds.json is absent, several service tests have stale signatures, and Bytez has an existing strict TypeScript diagnostic. The two new Nebius suites pass within the full run.

Type of Change:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)

AI assistance was used to prepare the mechanical endpoint/config changes and focused tests. The diff was reviewed and validated with the checks above.

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