Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

feat: add a Nebius Token Factory example provider profile

未关闭 适合新手
#4,856 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
82/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
rust, yaml
领域
devtools, security

调研方向

阅读 providers/ 下现有的示例配置文件,以及 list_provider_profiles_returns_built_in_profile_categories 中预期 ID 的列表。按照相同格式添加 providers/nebius-token-factory.yaml,允许列出的推理路由,同时排除 issue 中提到的管理路由。配置文件通过 lint 检查并成功导入,且配置文件类别测试包含其 ID 后,即为完成。

由索引模型根据 Issue 内容生成。

描述

state:triage-needed

User Story

I use OpenShell to run coding and research agents in sandboxes, and my models are served by Nebius Token Factory through its OpenAI-compatible API at https://api.tokenfactory.nebius.com/v1. Today I have to hand-write a provider profile for it, and the obvious copy of the openai profile with the host swapped would hand my agents a key that can also create dedicated endpoints and fine-tuning jobs on my account.

Problem Statement

providers/ has no example profile for Nebius Token Factory. Operators who use it have to write one from scratch and decide on their own which parts of the Token Factory API a sandboxed agent should reach.

Impact / Why This Matters

A Token Factory API key works on more than inference. On the same host it can list, upload, and delete files and datasets, start fine-tuning jobs and batch operations, and create, update, or delete dedicated endpoints, which are billable GPU deployments. A profile that grants the whole host, like the existing openai, nvidia, and deepinfra examples, lets a sandboxed agent use the injected key for all of that. Operators who don't read the API reference closely will not notice.

Proposed Design

Add providers/nebius-token-factory.yaml, following the format of the other example profiles:

id: nebius-token-factory
display_name: Nebius Token Factory
category: inference
inference_capable: true
credentials:
  - name: api_key
    env_vars: [NEBIUS_API_KEY]
    auth_style: bearer
    header_name: authorization
endpoints:
  - host: api.tokenfactory.nebius.com
    port: 443
    protocol: rest
    enforcement: enforce
    rules:
      - allow: { method: POST, path: "/v1/chat/completions" }
      - allow: { method: POST, path: "/v1/completions" }
      - allow: { method: POST, path: "/v1/embeddings" }
      - allow: { method: POST, path: "/v1/rerank" }
      - allow: { method: POST, path: "/v1/responses" }
      - allow: { method: GET, path: "/v1/models" }
binaries: [/usr/bin/curl, /usr/local/bin/curl]

Workflow:

openshell provider profile import -f providers/nebius-token-factory.yaml --global
openshell provider create --name nebius --type nebius-token-factory --credential NEBIUS_API_KEY
openshell sandbox create --provider nebius -- curl -sS https://api.tokenfactory.nebius.com/v1/models

NEBIUS_API_KEY matches the variable name in the Token Factory documentation.

Acceptance Criteria

  • providers/nebius-token-factory.yaml lints and imports, and has the same header block as the other examples (client binaries, reference layout, credential scope, endpoint access, smoke test).
  • A sandbox with the provider attached can call chat completions (streaming included), completions, embeddings, rerank, the Responses API, and the model list.
  • In that sandbox, requests to the files, datasets, fine-tuning, operations, and dedicated-endpoint APIs are denied by the proxy.
  • No telemetry or provider-table changes are needed, in line with #3906.

Alternatives Considered

  • Leave it to operators to copy the openai profile and change the host. That gives agents the whole Token Factory API, as described above.
  • Grant /v1/** read-write. This is simpler, but it still allows file, dataset, fine-tuning, and operation calls, and it would allow new management routes added under /v1 later.
  • An endpointless profile bound per sandbox from policy. That suits per-deployment hosts, but Token Factory has a single public host, so a fixed endpoint is simpler for operators.

Agent Investigation

  • Profiles are import-only examples under providers/. Adding one changes only the YAML and the expected-ID list in list_provider_profiles_returns_built_in_profile_categories, as in #3904.
  • I listed the routes from Token Factory's published OpenAPI spec (https://api.tokenfactory.nebius.com/openapi.json). Inference routes are the ones above. Management routes are under /v1/files, /v1/datasets, /v1/fine_tuning, /v1/operations, and /v0/dedicated_endpoints.
主要语言
Rust
星标
17.1k
派生
1.8k
平均合并
2 天 8 小时
30 天内合并 PR
370

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NVIDIA/OpenShell 的其他 Issue

查看 NVIDIA/OpenShell 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。