dsh-model-extension 0.1.1 → 0.2.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 +2 -0
- package/lib/client.js +46 -2
- package/lib/client.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/lib/client.js
CHANGED
|
@@ -795,6 +795,8 @@ if (typeof document !== 'undefined' && document.querySelector('style[data-plugin
|
|
|
795
795
|
extSection: "Model extensions",
|
|
796
796
|
extSectionHint: "Extra per-model fields that live in settings.yaml.",
|
|
797
797
|
supportsReasoningEffort: "Endpoint accepts reasoning effort",
|
|
798
|
+
supportsDeveloperRole: "System prompt may use the developer role",
|
|
799
|
+
supportsDeveloperRoleHint: "Reasoning-model system prompts go out as \"developer\"; uncheck to keep \"system\" for gateways that reject it.",
|
|
798
800
|
reasoningEfforts: "Reasoning efforts",
|
|
799
801
|
reasoningEffortLevel: "Level",
|
|
800
802
|
reasoningEffortWire: "Wire value",
|
|
@@ -903,6 +905,8 @@ if (typeof document !== 'undefined' && document.querySelector('style[data-plugin
|
|
|
903
905
|
extSection: "模型扩展",
|
|
904
906
|
extSectionHint: "settings.yaml 中按模型生效的扩展字段。",
|
|
905
907
|
supportsReasoningEffort: "端点接受推理挡位参数(reasoning_effort)",
|
|
908
|
+
supportsDeveloperRole: "允许以 developer 角色发送系统提示",
|
|
909
|
+
supportsDeveloperRoleHint: "推理模型的系统提示将以 developer 角色发出;网关拒绝该角色时取消勾选,改用 system。",
|
|
906
910
|
reasoningEfforts: "推理挡位",
|
|
907
911
|
reasoningEffortLevel: "挡位",
|
|
908
912
|
reasoningEffortWire: "线上取值",
|
|
@@ -989,10 +993,11 @@ if (typeof document !== 'undefined' && document.querySelector('style[data-plugin
|
|
|
989
993
|
const modalityLabel = (modality) => isZh ? MODALITY_LABELS[modality]?.zh ?? modality : MODALITY_LABELS[modality]?.en ?? modality;
|
|
990
994
|
const compat = compatOf(model);
|
|
991
995
|
const supportsReasoningEffort = compat["supportsReasoningEffort"] === true;
|
|
996
|
+
const supportsDeveloperRole = compat["supportsDeveloperRole"] !== false;
|
|
992
997
|
/** Write one key into `compat`, merging into the row's existing compat and
|
|
993
998
|
* clearing the whole `compat` node when it would become empty. Used for
|
|
994
|
-
* `supportsReasoningEffort` and `
|
|
995
|
-
* model extension fields that live under `compat`. */
|
|
999
|
+
* `supportsReasoningEffort`, `thinkingFormat` and `supportsDeveloperRole`
|
|
1000
|
+
* ONLY — those are the only model extension fields that live under `compat`. */
|
|
996
1001
|
const setCompatKey = (key, value) => {
|
|
997
1002
|
const next = { ...compat };
|
|
998
1003
|
if (value === void 0) delete next[key];
|
|
@@ -1058,6 +1063,45 @@ if (typeof document !== 'undefined' && document.querySelector('style[data-plugin
|
|
|
1058
1063
|
gap: 14
|
|
1059
1064
|
},
|
|
1060
1065
|
children: [
|
|
1066
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1067
|
+
style: {
|
|
1068
|
+
borderTop: "0.5px solid var(--color-border-tertiary, rgba(0,0,0,0.15))",
|
|
1069
|
+
paddingTop: 12
|
|
1070
|
+
},
|
|
1071
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
1072
|
+
style: {
|
|
1073
|
+
display: "flex",
|
|
1074
|
+
alignItems: "flex-start",
|
|
1075
|
+
gap: 8,
|
|
1076
|
+
cursor: "pointer"
|
|
1077
|
+
},
|
|
1078
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
1079
|
+
type: "checkbox",
|
|
1080
|
+
style: checkboxStyle,
|
|
1081
|
+
checked: supportsDeveloperRole,
|
|
1082
|
+
disabled,
|
|
1083
|
+
onChange: (event) => {
|
|
1084
|
+
setCompatKey("supportsDeveloperRole", event.target.checked ? void 0 : false);
|
|
1085
|
+
}
|
|
1086
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
1087
|
+
style: {
|
|
1088
|
+
display: "flex",
|
|
1089
|
+
flexDirection: "column",
|
|
1090
|
+
gap: 2
|
|
1091
|
+
},
|
|
1092
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1093
|
+
className: ModelsSection_ext_module_default["modelFieldLabel"],
|
|
1094
|
+
children: t("supportsDeveloperRole")
|
|
1095
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1096
|
+
style: {
|
|
1097
|
+
fontSize: 12,
|
|
1098
|
+
color: "var(--color-text-tertiary, #999)"
|
|
1099
|
+
},
|
|
1100
|
+
children: t("supportsDeveloperRoleHint")
|
|
1101
|
+
})]
|
|
1102
|
+
})]
|
|
1103
|
+
})
|
|
1104
|
+
}),
|
|
1061
1105
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1062
1106
|
style: {
|
|
1063
1107
|
borderTop: "0.5px solid var(--color-border-tertiary, rgba(0,0,0,0.15))",
|