dsh-livebench-panel 0.2.3 → 0.2.5

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 +7 -3
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -25,7 +25,7 @@
25
25
  * @module dsh-livebench-panel
26
26
  */
27
27
  import { spawn } from "node:child_process";
28
- import { readdirSync, readFileSync, existsSync, statSync, writeFileSync } from "node:fs";
28
+ import { readdirSync, readFileSync, existsSync, statSync, writeFileSync, mkdirSync } from "node:fs";
29
29
  import { createRequire } from "node:module";
30
30
  import { delimiter, dirname, join } from "node:path";
31
31
  import { homedir } from "node:os";
@@ -365,7 +365,9 @@ function displayModelName(providerId, modelId) {
365
365
  */
366
366
  function writeGeneratedModelConfig(layout, YAML, { displayName, modelId, reasoningEffort, protocol }) {
367
367
  const configDir = join(layout.livebenchDir, "model", "model_configs");
368
- const target = join(configDir, "dsh_panel_generated.yaml");
368
+ // 每个模型一个独立配置文件:并发启动多模型时共享单文件会互相覆盖,
369
+ // 导致先启动的进程读到别人的配置 → anthropic/responses 路由失效 → 全 $ERROR$。
370
+ const target = join(configDir, "dsh_panel_generated__" + displayName.replace(/[^A-Za-z0-9._@-]/g, "_") + ".yaml");
369
371
  void YAML;
370
372
  const lines = [
371
373
  "# Generated by dsh-livebench-panel — regenerated on every evaluation start.",
@@ -767,7 +769,9 @@ function apply(ctx) {
767
769
  } catch { /* credential seam unavailable — fall through to env */ }
768
770
  if (!key && process.env[provider.keyEnv]) key = process.env[provider.keyEnv];
769
771
  }
770
- if (provider.api === "openai-completions") {
772
+ if (provider.api === "openai-completions" || provider.api === "openai-responses" || provider.api === "openai_responses") {
773
+ // openai-responses 与 openai-completions 一样走 --api-base + LIVEBENCH_API_KEY
774
+ // (Responses 客户端同样从 api_dict 读 base_url/api_key)。
771
775
  args.push("--api-base", provider.baseURL);
772
776
  if (key) env.LIVEBENCH_API_KEY = key;
773
777
  } else if (provider.api === "anthropic-messages") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-livebench-panel",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
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
  "type": "module",