dsh-livebench-panel 0.2.17 → 0.2.18

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.
Files changed (2) hide show
  1. package/lib/index.js +14 -13
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -791,7 +791,6 @@ function apply(ctx) {
791
791
  const _pad = (n) => String(n).padStart(2, "0");
792
792
  const runStamp = `r${_now.getFullYear()}${_pad(_now.getMonth() + 1)}${_pad(_now.getDate())}-${_pad(_now.getHours())}${_pad(_now.getMinutes())}${_pad(_now.getSeconds())}`;
793
793
  const displayName = displayModelName(providerId || "direct", modelId) + (hasEffortSuffix ? "@" + effort : "") + "__" + runStamp;
794
- let cliModel = modelId;
795
794
  let writeError = null; // Anthropic-protocol proxies cannot go through --api-base (that path
796
795
  // speaks OpenAI Chat Completions). Instead the generated model config
797
796
  // selects LiveBench's native anthropic client and the spawn env points
@@ -803,22 +802,24 @@ function apply(ctx) {
803
802
  const isOpenAIResponsesRoute = provider
804
803
  && (provider.api === "openai-responses" || provider.api === "openai_responses")
805
804
  && provider.baseURL;
806
- const needConfig = isAnthropicRoute || isOpenAIResponsesRoute || hasEffortSuffix;
807
- if (needConfig) {
808
- writeError = writeGeneratedModelConfig(layout, loadYaml(profileDir), {
809
- displayName,
810
- modelId,
811
- reasoningEffort: isAnthropicRoute ? null : effort,
812
- protocol: isAnthropicRoute ? "anthropic" : isOpenAIResponsesRoute ? "openai_responses" : "openai",
813
- });
814
- if (writeError) return { status: 500, payload: { ok: false, error: writeError } };
815
- cliModel = displayName;
816
- }
805
+ // 每次都写自己的模型配置,并且 --model 永远用 display-name。
806
+ // 不能图省事把裸模型名交给 LiveBench:它会用 get_model_config(裸名) 去撞它自带的
807
+ // 模型库(例如 "kimi-k3" 命中 moonshotai.yml),命中后就改用那份配置的
808
+ // provider / api_kwargs / max_tokens —— 实测会把 temperature 悄悄变成 1.0、
809
+ // max_tokens 变成 131072,等于用户选的 provider 被换掉。写了自己的配置,
810
+ // 解析结果就是确定的 {local: <modelId>} + --api-base。
811
+ writeError = writeGeneratedModelConfig(layout, loadYaml(profileDir), {
812
+ displayName,
813
+ modelId,
814
+ reasoningEffort: isAnthropicRoute ? null : effort,
815
+ protocol: isAnthropicRoute ? "anthropic" : isOpenAIResponsesRoute ? "openai_responses" : "openai",
816
+ });
817
+ if (writeError) return { status: 500, payload: { ok: false, error: writeError } };
817
818
 
818
819
  const benchParts = ["live_bench", ...(category ? [category] : []), ...(task ? [task] : [])];
819
820
  const args = [
820
821
  "run_livebench.py",
821
- "--model", cliModel,
822
+ "--model", displayName,
822
823
  "--model-display-name", displayName,
823
824
  "--bench-name",
824
825
  ...(benchNames !== null ? benchNames : [benchParts.join("/")]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-livebench-panel",
3
- "version": "0.2.17",
3
+ "version": "0.2.18",
4
4
  "description": "DSH web plugin: a LiveBench tab in the Trajectory view (right of 对话/轨迹). Run LiveBench evaluations against every model configured in the DeepSeek Harness — pick provider/model, category, task, release and question range from dropdowns, watch progress, and read scores in place.",
5
5
  "license": "MIT",
6
6
  "author": "cszr (Vithrive)",