@vtstech/pi-shared 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/ollama.js +14 -0
  2. package/package.json +1 -1
package/ollama.js CHANGED
@@ -84,6 +84,19 @@ function isReasoningModel(name) {
84
84
  const lower = name.toLowerCase();
85
85
  return lower.includes("deepseek-r1") || lower.includes("qwq") || lower.includes("o1") || lower.includes("o3") || lower.includes("qwen3") || lower.includes("think") || lower.includes("reason");
86
86
  }
87
+ var BUILTIN_PROVIDERS = {
88
+ openrouter: { api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", envKey: "OPENROUTER_API_KEY" },
89
+ anthropic: { api: "anthropic-messages", baseUrl: "https://api.anthropic.com/v1", envKey: "ANTHROPIC_API_KEY" },
90
+ google: { api: "gemini", baseUrl: "https://generativelanguage.googleapis.com", envKey: "GOOGLE_API_KEY" },
91
+ openai: { api: "openai-completions", baseUrl: "https://api.openai.com/v1", envKey: "OPENAI_API_KEY" },
92
+ groq: { api: "openai-completions", baseUrl: "https://api.groq.com/v1", envKey: "GROQ_API_KEY" },
93
+ deepseek: { api: "openai-completions", baseUrl: "https://api.deepseek.com/v1", envKey: "DEEPSEEK_API_KEY" },
94
+ mistral: { api: "openai-completions", baseUrl: "https://api.mistral.ai/v1", envKey: "MISTRAL_API_KEY" },
95
+ xai: { api: "openai-completions", baseUrl: "https://api.x.ai/v1", envKey: "XAI_API_KEY" },
96
+ together: { api: "openai-completions", baseUrl: "https://api.together.xyz/v1", envKey: "TOGETHER_API_KEY" },
97
+ fireworks: { api: "openai-completions", baseUrl: "https://api.fireworks.ai/inference/v1", envKey: "FIREWORKS_API_KEY" },
98
+ cohere: { api: "cohere-chat", baseUrl: "https://api.cohere.com/v1", envKey: "COHERE_API_KEY" }
99
+ };
87
100
  function detectModelFamily(modelName) {
88
101
  const name = modelName.toLowerCase();
89
102
  const families = [
@@ -115,6 +128,7 @@ function detectModelFamily(modelName) {
115
128
  return "unknown";
116
129
  }
117
130
  export {
131
+ BUILTIN_PROVIDERS,
118
132
  MODELS_JSON_PATH,
119
133
  detectModelFamily,
120
134
  fetchContextLengthsBatched,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtstech/pi-shared",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Shared utilities for Pi Coding Agent extensions",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",