Skip to content
dsh.fish
Bundle

dsh-cloud-model-providers

接入 Ant Digital MaaS 与 NVIDIA NIM 流式模型路由 / Installable DSH bundle for Ant Digital MaaS and NVIDIA NIM streaming routes

Source
BitDG
License
MIT
Updated
Updated 4 days ago

Readme

---
description: "Install Ant Digital MaaS and NVIDIA NIM streaming model routes into a DeepSeek Harness profile without adding another HTTP proxy."
kind: "package-bundle"
---

# dsh-cloud-model-providers

> Purpose: add Ant Digital MaaS Responses/Chat and NVIDIA NIM streaming model routes while DSH continues to manage credentials.

English | [中文](README.zh.md)

## Summary

This bundle adds Ant Digital MaaS and NVIDIA NIM model routes to a base-backed [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) profile. It uses the `llm-pi-ai` adapter already shipped by DSH, so Chat Completions, Responses, SSE streaming, tool calls, usage, cancellation, and credential handling stay on the maintained DSH path. The package contains only a declarative profile patch: a GitHub installation runs no package build script and stores no API key.

## Table of Contents

- [Use this package](#use-this-package)
- [Provider routes](#provider-routes)
- [Verify streaming](#verify-streaming)
- [Understand the implementation](#understand-the-implementation)
- [Further Exploration](#further-exploration)
- [Model Experience](#model-experience)
- [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
- [Dev Note](#dev-note)

-----

<a id="use-this-package"></a>
## Use this package

Install the bundle into an existing `web` or `headless` profile, provide credentials through DSH or the launch environment, and select one of the added routes.

### Install into a profile

```sh
dsh plugin --profile web add github:BitDG/dsh-cloud-model-providers
```

The command installs this repository and activates its declared `cordis.patch.yml` layer. Remove the layer and dependency together with:

```sh
dsh plugin --profile web remove dsh-cloud-model-providers
```

The bundle requires a base-backed profile because it replaces the dormant `llm-pi-ai` row supplied by `@deepseek-ai/dsh-base`. Confirm the layer without starting an application:

```sh
dsh --profile web --dump-config
```

The output includes `# == @deepseek-ai/dsh-base, patched by dsh-cloud-model-providers` above the configured `llm-pi-ai` row.

### Provide credentials

Use the Web Models settings page to store credentials, or export the references named by the bundle before starting DSH:

```sh
export MAAS_API_KEY='replace-with-your-key'
export NVIDIA_API_KEY='replace-with-your-key'
```

PowerShell uses `$env:MAAS_API_KEY` and `$env:NVIDIA_API_KEY`. Do not put either secret in `cordis.patch.yml`, Git, logs, screenshots, or issue reports.

### Select a model

The Web Models page exposes the three provider routes after the bundle loads. A headless profile can choose a default through its own later `cordis.patch.yml` layer:

```yaml
- id: agent-default-model
  config:
    provider: ant-maas-responses
    model: lingdt-3.0-flash
```

The same row can select `ant-maas-chat/qwen3.6-plus` or a model from the `nvidia` catalog.

-----

<a id="provider-routes"></a>
## Provider routes

| Route | Protocol | Endpoint | Credential | Initial model source |
|---|---|---|---|---|
| `ant-maas-responses` | OpenAI Responses over SSE | `https://maas-api.antdigital.com/v1/responses` | `MAAS_API_KEY` | `lingdt-3.0-flash` |
| `ant-maas-chat` | OpenAI Chat Completions over SSE | `https://maas-api.antdigital.com/v1/chat/completions` | `MAAS_API_KEY` | `qwen3.6-plus` |
| `nvidia` | Catalog-owned OpenAI Chat Completions over SSE | `https://integrate.api.nvidia.com/v1/chat/completions` | `NVIDIA_API_KEY` | Installed pi-ai NVIDIA catalog |

MaaS assigns protocol support per model. Put a model documented for Responses on `ant-maas-responses`, and put a Chat Completions model on `ant-maas-chat`; one DSH provider route cannot switch wire protocol per request. The Models page can interrogate OpenAI-compatible `/v1/models` endpoints, but discovery does not prove that every returned model supports Responses, tools, images, or reasoning controls.

The NVIDIA route inherits endpoint details, model metadata, compatibility flags, and required headers from the pi-ai catalog bundled with the installed DSH version. The bundle overrides only the display name, credential reference, and explicit SSE transport.

-----

<a id="verify-streaming"></a>
## Verify streaming

The keyless suite starts local data-only SSE endpoints and drives all three routes through the published DSH `LlmRuntime` and `llm-pi-ai` adapter. It verifies the request path, `stream: true`, Bearer authorization, incremental text, usage, and terminal event order.

```sh
pnpm install
pnpm test
pnpm run typecheck
```

The live suite is separate because each request uses provider quota. It skips a platform whose credential is absent and accepts model overrides for a changing online catalog:

```sh
MAAS_API_KEY='...' NVIDIA_API_KEY='...' pnpm run test:e2e
```

Use `DSH_MAAS_MODEL` or `DSH_NVIDIA_NIM_MODEL` to replace the live-test defaults. A passing keyless test proves DSH protocol integration; only a passing live test proves that the selected account, endpoint, and model work at that time.

-----

<a id="understand-the-implementation"></a>
## Understand the implementation

<details>
<summary>Implementation internals — click to expand</summary>

The package declares `dsh.bundle.patch` in [`package.json`](package.json). DSH adds [`cordis.patch.yml`](cordis.patch.yml) after the selected profile's existing bundle layers, and the patch replaces the `llm-pi-ai` row's complete configuration. The adapter resolves `MAAS_API_KEY` or `NVIDIA_API_KEY` for each request and translates provider SSE events into DSH stream chunks; this repository owns no network client and no credential storage.

| Path | Responsibility |
|---|---|
| [`cordis.patch.yml`](cordis.patch.yml) | Provider identities, protocols, endpoints, credential references, and SSE preference |
| [`tests/bundle.spec.ts`](tests/bundle.spec.ts) | Bundle registration and keyless Chat/Responses streaming behavior |
| [`tests/live.e2e.spec.ts`](tests/live.e2e.spec.ts) | Credential-gated calls to the two online platforms |

</details>

-----

<a id="further-exploration"></a>
## Further Exploration

- [Ant Digital MaaS quick access](https://maas.antdigital.com/dt-maas-docs/quick-access) — Chat Completions endpoint and authentication.
- [Ant Digital MaaS Codex guide](https://maas.antdigital.com/dt-maas-docs/agent-guides/codex) — Responses-compatible configuration.
- [Ant Digital MaaS supported models](https://maas.antdigital.com/dt-maas-docs/intro/supported-models) — current model and protocol availability.
- [NVIDIA NIM API reference](https://docs.nvidia.com/nim/large-language-models/latest/api-reference.html) — OpenAI-compatible endpoints and streaming behavior.
- [DeepSeek Harness package tutorial](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/user/develop/basic/publish.md) — bundle installation and layer order.

-----

<a id="model-experience"></a>
## Model Experience

Indirect. This bundle selects model providers but adds no model-visible prompt, tool, command, or transcript content. `@deepseek-ai/dsh-llm-pi-ai` owns provider conversion and streamed model output.

## Known Limitations and Deferred Work

<a id="known-limitations-and-deferred-work"></a>

- MaaS model availability and protocol support can change independently of this repository; verify the selected model against the official catalog.
- The preconfigured MaaS model list is intentionally small. Add other models through DSH settings only after confirming their protocol and capacity.
- Real API tests require user-owned credentials and consume platform quota; CI runs only the keyless protocol suite.
- This bundle configures hosted APIs. It does not deploy a self-hosted NVIDIA NIM container.
- A later profile patch or `llm-pi-ai` settings section can replace the bundle's complete provider configuration.

<a id="dev-note"></a>
### Dev Note

<details>
<summary>Working context for maintainers — click to expand</summary>

None.

</details>

Install

dsh plugin --profile web add github:BitDG/dsh-cloud-model-providers#3b07c61bca13314b5276d65ff42bf97ff7cb6fee

Profile: web

Source