@vtstech/pi-model-test 1.0.5 → 1.0.6

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/model-test.js +3 -16
  2. package/package.json +2 -2
package/model-test.js CHANGED
@@ -12,20 +12,7 @@ import {
12
12
  truncate,
13
13
  sanitizeForReport
14
14
  } from "@vtstech/pi-shared/format";
15
- import { getOllamaBaseUrl, detectModelFamily, readModelsJson } from "@vtstech/pi-shared/ollama";
16
- var BUILTIN_PROVIDERS = {
17
- openrouter: { api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", envKey: "OPENROUTER_API_KEY" },
18
- anthropic: { api: "anthropic-messages", baseUrl: "https://api.anthropic.com/v1", envKey: "ANTHROPIC_API_KEY" },
19
- google: { api: "gemini", baseUrl: "https://generativelanguage.googleapis.com", envKey: "GOOGLE_API_KEY" },
20
- openai: { api: "openai-completions", baseUrl: "https://api.openai.com/v1", envKey: "OPENAI_API_KEY" },
21
- groq: { api: "openai-completions", baseUrl: "https://api.groq.com/v1", envKey: "GROQ_API_KEY" },
22
- deepseek: { api: "openai-completions", baseUrl: "https://api.deepseek.com/v1", envKey: "DEEPSEEK_API_KEY" },
23
- mistral: { api: "openai-completions", baseUrl: "https://api.mistral.ai/v1", envKey: "MISTRAL_API_KEY" },
24
- xai: { api: "openai-completions", baseUrl: "https://api.x.ai/v1", envKey: "XAI_API_KEY" },
25
- together: { api: "openai-completions", baseUrl: "https://api.together.xyz/v1", envKey: "TOGETHER_API_KEY" },
26
- fireworks: { api: "openai-completions", baseUrl: "https://api.fireworks.ai/inference/v1", envKey: "FIREWORKS_API_KEY" },
27
- cohere: { api: "cohere-chat", baseUrl: "https://api.cohere.com/v1", envKey: "COHERE_API_KEY" }
28
- };
15
+ import { getOllamaBaseUrl, detectModelFamily, readModelsJson, BUILTIN_PROVIDERS } from "@vtstech/pi-shared/ollama";
29
16
  function detectProvider(ctx) {
30
17
  const model = ctx.model;
31
18
  if (!model) return { kind: "unknown", name: "none" };
@@ -37,7 +24,7 @@ function detectProvider(ctx) {
37
24
  const baseUrl = userProviderCfg.baseUrl || "";
38
25
  const apiMode = userProviderCfg.api || "";
39
26
  const apiKey = userProviderCfg.apiKey || "";
40
- const isOllama = /ollama/i.test(providerName) || /localhost:\d+/.test(baseUrl) || /127\.0\.0\.1:\d+/.test(baseUrl) || /\/api\/chat/.test(baseUrl) || apiMode === "ollama";
27
+ const isOllama = /ollama/i.test(providerName) || /localhost:\d+/.test(baseUrl) || /127\.0\.0\.1:\d+/.test(baseUrl) || /0\.0\.0\.0:\d+/.test(baseUrl) || /\/api\/chat/.test(baseUrl) || apiMode === "ollama";
41
28
  if (isOllama) {
42
29
  return { kind: "ollama", name: providerName, apiMode: "ollama", baseUrl, apiKey };
43
30
  }
@@ -1167,7 +1154,7 @@ The JSON object must have exactly these 4 keys:
1167
1154
  }
1168
1155
  }
1169
1156
  const branding = [
1170
- ` \u26A1 Pi Model Benchmark v1.0.5`,
1157
+ ` \u26A1 Pi Model Benchmark v1.0.6`,
1171
1158
  ` Written by VTSTech`,
1172
1159
  ` GitHub: https://github.com/VTSTech`,
1173
1160
  ` Website: www.vts-tech.org`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtstech/pi-model-test",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Model benchmark/testing extension for Pi Coding Agent",
5
5
  "main": "model-test.js",
6
6
  "keywords": ["pi-extensions"],
@@ -14,7 +14,7 @@
14
14
  "url": "https://github.com/VTSTech/pi-coding-agent"
15
15
  },
16
16
  "dependencies": {
17
- "@vtstech/pi-shared": "1.0.5"
17
+ "@vtstech/pi-shared": "1.0.6"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "@mariozechner/pi-coding-agent": ">=0.66"