@vibedev-si/dsh-vibedev 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/THIRD-PARTY-NOTICES.txt +1 -1
- package/lib/index.js +18 -1
- package/lib/llm/adapter.d.ts +10 -1
- package/lib/llm/catalog.d.ts +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
本插件由 `dsh-media` 改名而来,见下面的「从 dsh-media 升级」。
|
|
12
12
|
|
|
13
|
+
## 0.10.0 用户可见更新
|
|
14
|
+
|
|
15
|
+
支持家族分组的 VibeDev 宿主现在会按网关目录将普通和中转模型分组。配置中的 `preferredModels` 提供常用模型的初始顺序。模型目录缺少家族信息时,模型仍可正常选择。
|
|
16
|
+
|
|
13
17
|
## 0.9.0 用户可见更新
|
|
14
18
|
|
|
15
19
|
模型限时特惠接进来了:
|
|
@@ -379,6 +383,10 @@ npm run build
|
|
|
379
383
|
|
|
380
384
|
## English
|
|
381
385
|
|
|
386
|
+
### What changes in 0.10.0
|
|
387
|
+
|
|
388
|
+
VibeDev hosts with family grouping show regular and relay models under the families advertised by the gateway catalog. The `preferredModels` setting supplies the initial order of favorites. Models without family metadata remain available in the picker.
|
|
389
|
+
|
|
382
390
|
### What changes in 0.9.0
|
|
383
391
|
|
|
384
392
|
Model promotions are now visible:
|
package/THIRD-PARTY-NOTICES.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
THIRD-PARTY NOTICES · @vibedev-si/dsh-vibedev 0.
|
|
1
|
+
THIRD-PARTY NOTICES · @vibedev-si/dsh-vibedev 0.10.0
|
|
2
2
|
|
|
3
3
|
This package bundles code from the projects below. Each is used under the licence that
|
|
4
4
|
follows its name; the licence texts are reproduced as the projects ship them.
|
package/lib/index.js
CHANGED
|
@@ -5245,10 +5245,17 @@ function parseCatalog(body) {
|
|
|
5245
5245
|
const defaultReasoning = typeof capabilities.default_reasoning === "string" && levels?.includes(capabilities.default_reasoning) ? capabilities.default_reasoning : void 0;
|
|
5246
5246
|
const inputs = strings$1(capabilities.input_modalities) ?? [];
|
|
5247
5247
|
const maxInputTokens = positive$2(capabilities.max_input_tokens);
|
|
5248
|
+
const rawFamily = record$8(entry.model_family);
|
|
5249
|
+
const familyId = typeof rawFamily?.id === "string" ? rawFamily.id.trim() : "";
|
|
5250
|
+
const familyLabel = typeof rawFamily?.label === "string" ? rawFamily.label.trim() : "";
|
|
5248
5251
|
seen.add(id);
|
|
5249
5252
|
models.push({
|
|
5250
5253
|
id,
|
|
5251
5254
|
name: modelDisplayName(id, typeof entry.display_name === "string" && entry.display_name.trim() !== "" ? entry.display_name.trim() : void 0),
|
|
5255
|
+
...familyId !== "" && familyLabel !== "" ? { family: {
|
|
5256
|
+
id: familyId,
|
|
5257
|
+
label: familyLabel
|
|
5258
|
+
} } : {},
|
|
5252
5259
|
api,
|
|
5253
5260
|
contextWindow: positive$2(capabilities.context_window) ?? 2e5,
|
|
5254
5261
|
...maxInputTokens === void 0 ? {} : { maxInputTokens },
|
|
@@ -6815,16 +6822,25 @@ var GatewayAdapter = class extends LlmAdapter {
|
|
|
6815
6822
|
async listModels(provider) {
|
|
6816
6823
|
this.assertOwned(provider);
|
|
6817
6824
|
if (this.current().catalog.length === 0) await this.config.refreshCatalog?.();
|
|
6818
|
-
const
|
|
6825
|
+
const snapshot = this.current();
|
|
6826
|
+
const listed = snapshot.models.getModels(provider);
|
|
6819
6827
|
const hideRelay = provider === this.config.provider && this.config.relayProvider !== void 0;
|
|
6828
|
+
const preferred = new Map(this.config.preferredModels?.().map((id, index) => [id, index]));
|
|
6820
6829
|
const promotions = await this.promotions();
|
|
6821
6830
|
return listed.filter((model) => !hideRelay || !relayIdentity(model.id).relay).map((model) => {
|
|
6822
6831
|
const promotion = promotions.get(model.id);
|
|
6832
|
+
const family = snapshot.byId.get(model.id)?.family;
|
|
6833
|
+
const pinOrder = preferred.get(model.id);
|
|
6834
|
+
const picker = family === void 0 && pinOrder === void 0 ? void 0 : {
|
|
6835
|
+
...family === void 0 ? {} : { family },
|
|
6836
|
+
...pinOrder === void 0 ? {} : { pinOrder }
|
|
6837
|
+
};
|
|
6823
6838
|
return {
|
|
6824
6839
|
provider,
|
|
6825
6840
|
id: model.id,
|
|
6826
6841
|
name: model.name,
|
|
6827
6842
|
inputModalities: [...model.input],
|
|
6843
|
+
...picker === void 0 ? {} : { picker },
|
|
6828
6844
|
...promotion === void 0 ? {} : {
|
|
6829
6845
|
badge: promotionBadge(promotion),
|
|
6830
6846
|
description: promotion.description
|
|
@@ -7179,6 +7195,7 @@ function installGatewayModels(ctx, options) {
|
|
|
7179
7195
|
},
|
|
7180
7196
|
origin: () => origin,
|
|
7181
7197
|
catalog: () => catalog,
|
|
7198
|
+
preferredModels: options.preferredModels,
|
|
7182
7199
|
refreshCatalog: () => refreshIfEmpty(),
|
|
7183
7200
|
resolveCredential: options.resolveCredential,
|
|
7184
7201
|
rejectCredential: options.rejectCredential,
|
package/lib/llm/adapter.d.ts
CHANGED
|
@@ -73,6 +73,8 @@ export interface GatewayAdapterOptions {
|
|
|
73
73
|
readonly origin: () => string;
|
|
74
74
|
/** The current catalog; a new array identity means a new catalog. */
|
|
75
75
|
readonly catalog: () => readonly GatewayModel[];
|
|
76
|
+
/** Model ids pinned by configuration, in their preferred order. */
|
|
77
|
+
readonly preferredModels?: () => readonly string[];
|
|
76
78
|
/**
|
|
77
79
|
* Read the catalog again because it is empty when models are listed, so a catalog read that missed a
|
|
78
80
|
* fresh sign-in, or failed on a flaky network, recovers on the next list instead of the next timer.
|
|
@@ -105,6 +107,12 @@ export interface GatewayAdapterOptions {
|
|
|
105
107
|
*/
|
|
106
108
|
readonly promotions?: () => Promise<readonly ActivePromotion[]>;
|
|
107
109
|
}
|
|
110
|
+
interface GatewayListedModel extends LlmModelInfo {
|
|
111
|
+
readonly picker?: {
|
|
112
|
+
readonly family?: NonNullable<GatewayModel['family']>;
|
|
113
|
+
readonly pinOrder?: number;
|
|
114
|
+
};
|
|
115
|
+
}
|
|
108
116
|
/**
|
|
109
117
|
* The gateway as an LLM adapter. Each operation reads the current catalog, so a refresh reaches
|
|
110
118
|
* the next request without a restart, while a request in flight finishes on the catalog it began with.
|
|
@@ -119,7 +127,7 @@ export declare class GatewayAdapter extends LlmAdapter {
|
|
|
119
127
|
private modelOf;
|
|
120
128
|
providerInfo(provider: string): LlmProviderInfo;
|
|
121
129
|
providerRetryPolicy(provider: string): ResolvedRetryPolicy | undefined;
|
|
122
|
-
listModels(provider: string): Promise<readonly
|
|
130
|
+
listModels(provider: string): Promise<readonly GatewayListedModel[]>;
|
|
123
131
|
/** The promotions keyed by model id, or none when they cannot be read. */
|
|
124
132
|
private promotions;
|
|
125
133
|
resolveModel(provider: string, model: string, _signal?: AbortSignal): Promise<LlmResolvedModelInfo>;
|
|
@@ -148,3 +156,4 @@ export declare class GatewayAdapter extends LlmAdapter {
|
|
|
148
156
|
*/
|
|
149
157
|
private accountFailure;
|
|
150
158
|
}
|
|
159
|
+
export {};
|
package/lib/llm/catalog.d.ts
CHANGED
|
@@ -20,6 +20,11 @@ export type GatewayReasoningLevel = 'none' | 'minimal' | 'low' | 'medium' | 'hig
|
|
|
20
20
|
export interface GatewayModel {
|
|
21
21
|
readonly id: string;
|
|
22
22
|
readonly name: string;
|
|
23
|
+
/** Optional title for this model's section in the picker. */
|
|
24
|
+
readonly family?: {
|
|
25
|
+
readonly id: string;
|
|
26
|
+
readonly label: string;
|
|
27
|
+
};
|
|
23
28
|
/** The protocol requests for this model use. */
|
|
24
29
|
readonly api: GatewayApi;
|
|
25
30
|
readonly contextWindow: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibedev-si/dsh-vibedev",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "VibeDev 账号与模型:在 DeepSeek Harness 里登录 VibeDev,与 DeepSeek 账号并存,使用 VibeDev 网关的模型(Claude、GPT 等),并生成图片、视频、音乐和播客 · VibeDev account and models for DeepSeek Harness: sign in to VibeDev next to the DeepSeek account and use the VibeDev gateway's models (Claude, GPT and more), plus image, video, music and podcast generation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|