dsh-livebench-panel 0.1.9 → 0.1.10
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/lib/index.js +19 -3
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -381,6 +381,14 @@ function writeGeneratedModelConfig(layout, YAML, { displayName, modelId, reasoni
|
|
|
381
381
|
// note: reasoning_effort is an OpenAI-style knob and is intentionally
|
|
382
382
|
// not forwarded on the anthropic protocol path.
|
|
383
383
|
}
|
|
384
|
+
} else if (protocol === "openai_responses") {
|
|
385
|
+
// OpenAI Responses API proxy: provider name matches
|
|
386
|
+
// get_api_function('openai_responses') → chat_completion_openai_responses,
|
|
387
|
+
// which converts reasoning_effort to reasoning:{effort} itself.
|
|
388
|
+
lines.push(` openai_responses: ${modelId}`);
|
|
389
|
+
if (reasoningEffort) {
|
|
390
|
+
lines.push("api_kwargs:", " default:", ` reasoning_effort: ${reasoningEffort}`);
|
|
391
|
+
}
|
|
384
392
|
} else {
|
|
385
393
|
lines.push(` local: ${modelId}`);
|
|
386
394
|
if (reasoningEffort) {
|
|
@@ -557,12 +565,19 @@ function apply(ctx) {
|
|
|
557
565
|
// selects LiveBench's native anthropic client and the spawn env points
|
|
558
566
|
// the SDK at the proxy (ANTHROPIC_BASE_URL / ANTHROPIC_API_KEY).
|
|
559
567
|
const isAnthropicRoute = provider && provider.api === "anthropic-messages" && provider.baseURL;
|
|
560
|
-
|
|
568
|
+
// OpenAI Responses-API proxies (api: openai-responses) select LiveBench's
|
|
569
|
+
// openai_responses client; --api-base + LIVEBENCH_API_KEY route them the
|
|
570
|
+
// usual way, and reasoning_effort converts to reasoning:{effort} inside.
|
|
571
|
+
const isOpenAIResponsesRoute = provider
|
|
572
|
+
&& (provider.api === "openai-responses" || provider.api === "openai_responses")
|
|
573
|
+
&& provider.baseURL;
|
|
574
|
+
const needConfig = isAnthropicRoute || isOpenAIResponsesRoute || hasEffortSuffix;
|
|
575
|
+
if (needConfig) {
|
|
561
576
|
writeError = writeGeneratedModelConfig(layout, loadYaml(profileDir), {
|
|
562
577
|
displayName,
|
|
563
578
|
modelId,
|
|
564
579
|
reasoningEffort: isAnthropicRoute ? null : reasoningEffort,
|
|
565
|
-
protocol: isAnthropicRoute ? "anthropic" : "openai",
|
|
580
|
+
protocol: isAnthropicRoute ? "anthropic" : isOpenAIResponsesRoute ? "openai_responses" : "openai",
|
|
566
581
|
});
|
|
567
582
|
if (writeError) return { status: 500, payload: { ok: false, error: writeError } };
|
|
568
583
|
cliModel = displayName;
|
|
@@ -693,7 +708,8 @@ function apply(ctx) {
|
|
|
693
708
|
providers: providers.map(({ id, name: pname, models, api, baseURL }) => ({
|
|
694
709
|
id,
|
|
695
710
|
name: pname,
|
|
696
|
-
routable:
|
|
711
|
+
routable: ["openai-completions", "openai-responses", "openai_responses", "anthropic-messages"].includes(api)
|
|
712
|
+
&& typeof baseURL === "string" && baseURL.length > 0,
|
|
697
713
|
baseURL: baseURL ?? null,
|
|
698
714
|
models,
|
|
699
715
|
})),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-livebench-panel",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
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",
|