mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 07:03:25 +00:00
Fix TypeScript error in version check
This commit is contained in:
parent
b3d4478b61
commit
e3c4dd22ae
2 changed files with 78 additions and 61 deletions
|
|
@ -1630,6 +1630,23 @@ export const MODELS = {
|
||||||
contextWindow: 8192,
|
contextWindow: 8192,
|
||||||
maxTokens: 4096,
|
maxTokens: 4096,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
|
"grok-4.1-fast-non-reasoning": {
|
||||||
|
id: "grok-4.1-fast-non-reasoning",
|
||||||
|
name: "Grok 4.1 Fast (Non-Reasoning)",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "xai",
|
||||||
|
baseUrl: "https://api.x.ai/v1",
|
||||||
|
reasoning: false,
|
||||||
|
input: ["text", "image"],
|
||||||
|
cost: {
|
||||||
|
input: 0.2,
|
||||||
|
output: 0.5,
|
||||||
|
cacheRead: 0.05,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 2000000,
|
||||||
|
maxTokens: 30000,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
"grok-3": {
|
"grok-3": {
|
||||||
id: "grok-3",
|
id: "grok-3",
|
||||||
name: "Grok 3",
|
name: "Grok 3",
|
||||||
|
|
@ -1800,6 +1817,23 @@ export const MODELS = {
|
||||||
contextWindow: 131072,
|
contextWindow: 131072,
|
||||||
maxTokens: 4096,
|
maxTokens: 4096,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
|
"grok-4.1-fast": {
|
||||||
|
id: "grok-4.1-fast",
|
||||||
|
name: "Grok 4.1 Fast",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "xai",
|
||||||
|
baseUrl: "https://api.x.ai/v1",
|
||||||
|
reasoning: true,
|
||||||
|
input: ["text", "image"],
|
||||||
|
cost: {
|
||||||
|
input: 0.2,
|
||||||
|
output: 0.5,
|
||||||
|
cacheRead: 0.05,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 2000000,
|
||||||
|
maxTokens: 30000,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
"grok-3-mini-latest": {
|
"grok-3-mini-latest": {
|
||||||
id: "grok-3-mini-latest",
|
id: "grok-3-mini-latest",
|
||||||
name: "Grok 3 Mini Latest",
|
name: "Grok 3 Mini Latest",
|
||||||
|
|
@ -1923,6 +1957,23 @@ export const MODELS = {
|
||||||
} satisfies Model<"anthropic-messages">,
|
} satisfies Model<"anthropic-messages">,
|
||||||
},
|
},
|
||||||
openrouter: {
|
openrouter: {
|
||||||
|
"x-ai/grok-4.1-fast": {
|
||||||
|
id: "x-ai/grok-4.1-fast",
|
||||||
|
name: "xAI: Grok 4.1 Fast",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "openrouter",
|
||||||
|
baseUrl: "https://openrouter.ai/api/v1",
|
||||||
|
reasoning: true,
|
||||||
|
input: ["text", "image"],
|
||||||
|
cost: {
|
||||||
|
input: 0,
|
||||||
|
output: 0,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 2000000,
|
||||||
|
maxTokens: 30000,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
"google/gemini-3-pro-preview": {
|
"google/gemini-3-pro-preview": {
|
||||||
id: "google/gemini-3-pro-preview",
|
id: "google/gemini-3-pro-preview",
|
||||||
name: "Google: Gemini 3 Pro Preview",
|
name: "Google: Gemini 3 Pro Preview",
|
||||||
|
|
@ -1940,40 +1991,6 @@ export const MODELS = {
|
||||||
contextWindow: 1048576,
|
contextWindow: 1048576,
|
||||||
maxTokens: 65536,
|
maxTokens: 65536,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
"openrouter/sherlock-dash-alpha": {
|
|
||||||
id: "openrouter/sherlock-dash-alpha",
|
|
||||||
name: "Sherlock Dash Alpha",
|
|
||||||
api: "openai-completions",
|
|
||||||
provider: "openrouter",
|
|
||||||
baseUrl: "https://openrouter.ai/api/v1",
|
|
||||||
reasoning: false,
|
|
||||||
input: ["text", "image"],
|
|
||||||
cost: {
|
|
||||||
input: 0,
|
|
||||||
output: 0,
|
|
||||||
cacheRead: 0,
|
|
||||||
cacheWrite: 0,
|
|
||||||
},
|
|
||||||
contextWindow: 1840000,
|
|
||||||
maxTokens: 64000,
|
|
||||||
} satisfies Model<"openai-completions">,
|
|
||||||
"openrouter/sherlock-think-alpha": {
|
|
||||||
id: "openrouter/sherlock-think-alpha",
|
|
||||||
name: "Sherlock Think Alpha",
|
|
||||||
api: "openai-completions",
|
|
||||||
provider: "openrouter",
|
|
||||||
baseUrl: "https://openrouter.ai/api/v1",
|
|
||||||
reasoning: true,
|
|
||||||
input: ["text", "image"],
|
|
||||||
cost: {
|
|
||||||
input: 0,
|
|
||||||
output: 0,
|
|
||||||
cacheRead: 0,
|
|
||||||
cacheWrite: 0,
|
|
||||||
},
|
|
||||||
contextWindow: 1840000,
|
|
||||||
maxTokens: 64000,
|
|
||||||
} satisfies Model<"openai-completions">,
|
|
||||||
"openai/gpt-5.1": {
|
"openai/gpt-5.1": {
|
||||||
id: "openai/gpt-5.1",
|
id: "openai/gpt-5.1",
|
||||||
name: "OpenAI: GPT-5.1",
|
name: "OpenAI: GPT-5.1",
|
||||||
|
|
@ -2068,13 +2085,13 @@ export const MODELS = {
|
||||||
reasoning: true,
|
reasoning: true,
|
||||||
input: ["text"],
|
input: ["text"],
|
||||||
cost: {
|
cost: {
|
||||||
input: 0.5,
|
input: 0.44999999999999996,
|
||||||
output: 2.5,
|
output: 2.35,
|
||||||
cacheRead: 0,
|
cacheRead: 0,
|
||||||
cacheWrite: 0,
|
cacheWrite: 0,
|
||||||
},
|
},
|
||||||
contextWindow: 262144,
|
contextWindow: 262144,
|
||||||
maxTokens: 262144,
|
maxTokens: 16384,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
"amazon/nova-premier-v1": {
|
"amazon/nova-premier-v1": {
|
||||||
id: "amazon/nova-premier-v1",
|
id: "amazon/nova-premier-v1",
|
||||||
|
|
@ -4813,23 +4830,6 @@ export const MODELS = {
|
||||||
contextWindow: 200000,
|
contextWindow: 200000,
|
||||||
maxTokens: 8192,
|
maxTokens: 8192,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
"mistralai/ministral-8b": {
|
|
||||||
id: "mistralai/ministral-8b",
|
|
||||||
name: "Mistral: Ministral 8B",
|
|
||||||
api: "openai-completions",
|
|
||||||
provider: "openrouter",
|
|
||||||
baseUrl: "https://openrouter.ai/api/v1",
|
|
||||||
reasoning: false,
|
|
||||||
input: ["text"],
|
|
||||||
cost: {
|
|
||||||
input: 0.09999999999999999,
|
|
||||||
output: 0.09999999999999999,
|
|
||||||
cacheRead: 0,
|
|
||||||
cacheWrite: 0,
|
|
||||||
},
|
|
||||||
contextWindow: 131072,
|
|
||||||
maxTokens: 4096,
|
|
||||||
} satisfies Model<"openai-completions">,
|
|
||||||
"mistralai/ministral-3b": {
|
"mistralai/ministral-3b": {
|
||||||
id: "mistralai/ministral-3b",
|
id: "mistralai/ministral-3b",
|
||||||
name: "Mistral: Ministral 3B",
|
name: "Mistral: Ministral 3B",
|
||||||
|
|
@ -4847,6 +4847,23 @@ export const MODELS = {
|
||||||
contextWindow: 131072,
|
contextWindow: 131072,
|
||||||
maxTokens: 4096,
|
maxTokens: 4096,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
|
"mistralai/ministral-8b": {
|
||||||
|
id: "mistralai/ministral-8b",
|
||||||
|
name: "Mistral: Ministral 8B",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "openrouter",
|
||||||
|
baseUrl: "https://openrouter.ai/api/v1",
|
||||||
|
reasoning: false,
|
||||||
|
input: ["text"],
|
||||||
|
cost: {
|
||||||
|
input: 0.09999999999999999,
|
||||||
|
output: 0.09999999999999999,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 131072,
|
||||||
|
maxTokens: 4096,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
"qwen/qwen-2.5-7b-instruct": {
|
"qwen/qwen-2.5-7b-instruct": {
|
||||||
id: "qwen/qwen-2.5-7b-instruct",
|
id: "qwen/qwen-2.5-7b-instruct",
|
||||||
name: "Qwen: Qwen2.5 7B Instruct",
|
name: "Qwen: Qwen2.5 7B Instruct",
|
||||||
|
|
@ -5119,9 +5136,9 @@ export const MODELS = {
|
||||||
contextWindow: 131072,
|
contextWindow: 131072,
|
||||||
maxTokens: 16384,
|
maxTokens: 16384,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
"openai/gpt-4o-mini-2024-07-18": {
|
"openai/gpt-4o-mini": {
|
||||||
id: "openai/gpt-4o-mini-2024-07-18",
|
id: "openai/gpt-4o-mini",
|
||||||
name: "OpenAI: GPT-4o-mini (2024-07-18)",
|
name: "OpenAI: GPT-4o-mini",
|
||||||
api: "openai-completions",
|
api: "openai-completions",
|
||||||
provider: "openrouter",
|
provider: "openrouter",
|
||||||
baseUrl: "https://openrouter.ai/api/v1",
|
baseUrl: "https://openrouter.ai/api/v1",
|
||||||
|
|
@ -5136,9 +5153,9 @@ export const MODELS = {
|
||||||
contextWindow: 128000,
|
contextWindow: 128000,
|
||||||
maxTokens: 16384,
|
maxTokens: 16384,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
"openai/gpt-4o-mini": {
|
"openai/gpt-4o-mini-2024-07-18": {
|
||||||
id: "openai/gpt-4o-mini",
|
id: "openai/gpt-4o-mini-2024-07-18",
|
||||||
name: "OpenAI: GPT-4o-mini",
|
name: "OpenAI: GPT-4o-mini (2024-07-18)",
|
||||||
api: "openai-completions",
|
api: "openai-completions",
|
||||||
provider: "openrouter",
|
provider: "openrouter",
|
||||||
baseUrl: "https://openrouter.ai/api/v1",
|
baseUrl: "https://openrouter.ai/api/v1",
|
||||||
|
|
|
||||||
|
|
@ -314,7 +314,7 @@ async function checkForNewVersion(currentVersion: string): Promise<string | null
|
||||||
const response = await fetch("https://registry.npmjs.org/@mariozechner/pi-coding-agent/latest");
|
const response = await fetch("https://registry.npmjs.org/@mariozechner/pi-coding-agent/latest");
|
||||||
if (!response.ok) return null;
|
if (!response.ok) return null;
|
||||||
|
|
||||||
const data = await response.json();
|
const data = (await response.json()) as { version?: string };
|
||||||
const latestVersion = data.version;
|
const latestVersion = data.version;
|
||||||
|
|
||||||
if (latestVersion && latestVersion !== currentVersion) {
|
if (latestVersion && latestVersion !== currentVersion) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue