mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-21 17:00:45 +00:00
feat: models.dev in generate models - too many deprecated models
could have opted for a whitelist but we'll just fetch from the copilot /models endpoint
This commit is contained in:
parent
ccae7a4e0e
commit
17ebb9a19d
2 changed files with 718 additions and 374 deletions
|
|
@ -38,153 +38,6 @@ const COPILOT_STATIC_HEADERS = {
|
||||||
"X-Initiator": "agent",
|
"X-Initiator": "agent",
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
function getGitHubTokenFromEnv(): string | null {
|
|
||||||
return process.env.COPILOT_GITHUB_TOKEN || process.env.GH_TOKEN || process.env.GITHUB_TOKEN || null;
|
|
||||||
}
|
|
||||||
|
|
||||||
function isDeprecatedCopilotModel(model: unknown): boolean {
|
|
||||||
if (!model || typeof model !== "object") return false;
|
|
||||||
const m = model as Record<string, unknown>;
|
|
||||||
if (m.deprecated === true) return true;
|
|
||||||
if (m.is_deprecated === true) return true;
|
|
||||||
if (m.status === "deprecated") return true;
|
|
||||||
if (m.lifecycle === "deprecated") return true;
|
|
||||||
const id = typeof m.id === "string" ? m.id : "";
|
|
||||||
return id.includes("deprecated");
|
|
||||||
}
|
|
||||||
|
|
||||||
function supportsToolsCopilotModel(model: unknown): boolean {
|
|
||||||
if (!model || typeof model !== "object") return true;
|
|
||||||
const m = model as Record<string, unknown>;
|
|
||||||
const caps = m.capabilities;
|
|
||||||
if (!caps || typeof caps !== "object") return true;
|
|
||||||
const tools = (caps as Record<string, unknown>).tools;
|
|
||||||
if (tools === undefined) return true;
|
|
||||||
return tools !== false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function supportsVisionCopilotModel(model: unknown): boolean {
|
|
||||||
if (!model || typeof model !== "object") return false;
|
|
||||||
const m = model as Record<string, unknown>;
|
|
||||||
const caps = m.capabilities;
|
|
||||||
if (!caps || typeof caps !== "object") return false;
|
|
||||||
const vision = (caps as Record<string, unknown>).vision;
|
|
||||||
if (vision === true) return true;
|
|
||||||
const modalities = (caps as Record<string, unknown>).modalities;
|
|
||||||
if (Array.isArray(modalities)) return modalities.includes("vision") || modalities.includes("image");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getNumberField(model: unknown, keys: string[], fallback: number): number {
|
|
||||||
if (!model || typeof model !== "object") return fallback;
|
|
||||||
const m = model as Record<string, unknown>;
|
|
||||||
for (const key of keys) {
|
|
||||||
const value = m[key];
|
|
||||||
if (typeof value === "number" && Number.isFinite(value)) return value;
|
|
||||||
}
|
|
||||||
return fallback;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function fetchCopilotModels(githubToken: string): Promise<Model<any>[]> {
|
|
||||||
try {
|
|
||||||
console.log("Fetching models from GitHub Copilot API...");
|
|
||||||
const response = await fetch("https://api.githubcopilot.com/models", {
|
|
||||||
headers: {
|
|
||||||
Accept: "application/json",
|
|
||||||
Authorization: `Bearer ${githubToken}`,
|
|
||||||
...COPILOT_STATIC_HEADERS,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!response.ok) {
|
|
||||||
const text = await response.text();
|
|
||||||
console.warn(`Failed to fetch GitHub Copilot models: ${response.status} ${text}`);
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
const data = (await response.json()) as unknown;
|
|
||||||
const list =
|
|
||||||
Array.isArray(data) ? data : Array.isArray((data as any)?.models) ? (data as any).models : (data as any)?.data;
|
|
||||||
if (!Array.isArray(list)) {
|
|
||||||
console.warn("Failed to parse GitHub Copilot models response");
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
const models: Model<any>[] = [];
|
|
||||||
|
|
||||||
for (const item of list) {
|
|
||||||
if (isDeprecatedCopilotModel(item)) continue;
|
|
||||||
if (!supportsToolsCopilotModel(item)) continue;
|
|
||||||
|
|
||||||
const id = typeof (item as any)?.id === "string" ? (item as any).id : typeof item === "string" ? item : null;
|
|
||||||
if (!id) continue;
|
|
||||||
|
|
||||||
const name = typeof (item as any)?.name === "string" ? (item as any).name : id;
|
|
||||||
const contextWindow = getNumberField(item, ["context_window", "contextWindow", "max_context_tokens"], 128000);
|
|
||||||
const maxTokens = getNumberField(item, ["max_output_tokens", "maxTokens", "max_tokens"], 8192);
|
|
||||||
const input: ("text" | "image")[] = supportsVisionCopilotModel(item) ? ["text", "image"] : ["text"];
|
|
||||||
|
|
||||||
models.push({
|
|
||||||
id,
|
|
||||||
name,
|
|
||||||
api: "openai-completions",
|
|
||||||
provider: "github-copilot",
|
|
||||||
baseUrl: "https://api.githubcopilot.com",
|
|
||||||
reasoning: false,
|
|
||||||
input,
|
|
||||||
cost: {
|
|
||||||
input: 0,
|
|
||||||
output: 0,
|
|
||||||
cacheRead: 0,
|
|
||||||
cacheWrite: 0,
|
|
||||||
},
|
|
||||||
contextWindow,
|
|
||||||
maxTokens,
|
|
||||||
headers: { ...COPILOT_STATIC_HEADERS },
|
|
||||||
compat: {
|
|
||||||
supportsStore: false,
|
|
||||||
supportsDeveloperRole: false,
|
|
||||||
supportsReasoningEffort: false,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(`Fetched ${models.length} models from GitHub Copilot`);
|
|
||||||
return models;
|
|
||||||
} catch (error) {
|
|
||||||
console.warn("Failed to fetch GitHub Copilot models:", error);
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function getFallbackCopilotModels(): Model<any>[] {
|
|
||||||
const fallbackModelIds = ["gpt-4o", "gpt-4o-mini", "claude-3.5-sonnet", "o1", "o1-mini"];
|
|
||||||
|
|
||||||
return fallbackModelIds.map((id) => ({
|
|
||||||
id,
|
|
||||||
name: id,
|
|
||||||
api: "openai-completions",
|
|
||||||
provider: "github-copilot",
|
|
||||||
baseUrl: "https://api.githubcopilot.com",
|
|
||||||
reasoning: false,
|
|
||||||
input: ["text"],
|
|
||||||
cost: {
|
|
||||||
input: 0,
|
|
||||||
output: 0,
|
|
||||||
cacheRead: 0,
|
|
||||||
cacheWrite: 0,
|
|
||||||
},
|
|
||||||
contextWindow: 128000,
|
|
||||||
maxTokens: 8192,
|
|
||||||
headers: { ...COPILOT_STATIC_HEADERS },
|
|
||||||
compat: {
|
|
||||||
supportsStore: false,
|
|
||||||
supportsDeveloperRole: false,
|
|
||||||
supportsReasoningEffort: false,
|
|
||||||
},
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
async function fetchOpenRouterModels(): Promise<Model<any>[]> {
|
async function fetchOpenRouterModels(): Promise<Model<any>[]> {
|
||||||
try {
|
try {
|
||||||
console.log("Fetching models from OpenRouter API...");
|
console.log("Fetching models from OpenRouter API...");
|
||||||
|
|
@ -459,6 +312,41 @@ async function loadModelsDevData(): Promise<Model<any>[]> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const copilotSection = (data as Record<string, unknown>)["github-copilot"];
|
||||||
|
if (copilotSection && typeof copilotSection === "object") {
|
||||||
|
const copilotModels = (copilotSection as Record<string, unknown>).models;
|
||||||
|
if (copilotModels && typeof copilotModels === "object") {
|
||||||
|
for (const [modelId, model] of Object.entries(copilotModels)) {
|
||||||
|
const m = model as ModelsDevModel;
|
||||||
|
if (m.tool_call !== true) continue;
|
||||||
|
|
||||||
|
models.push({
|
||||||
|
id: modelId,
|
||||||
|
name: m.name || modelId,
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "github-copilot",
|
||||||
|
baseUrl: "https://api.githubcopilot.com",
|
||||||
|
reasoning: m.reasoning === true,
|
||||||
|
input: m.modalities?.input?.includes("image") ? ["text", "image"] : ["text"],
|
||||||
|
cost: {
|
||||||
|
input: 0,
|
||||||
|
output: 0,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: m.limit?.context || 128000,
|
||||||
|
maxTokens: m.limit?.output || 8192,
|
||||||
|
headers: { ...COPILOT_STATIC_HEADERS },
|
||||||
|
compat: {
|
||||||
|
supportsStore: false,
|
||||||
|
supportsDeveloperRole: false,
|
||||||
|
supportsReasoningEffort: false,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
console.log(`Loaded ${models.length} tool-capable models from models.dev`);
|
console.log(`Loaded ${models.length} tool-capable models from models.dev`);
|
||||||
return models;
|
return models;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
@ -477,19 +365,6 @@ async function generateModels() {
|
||||||
// Combine models (models.dev has priority)
|
// Combine models (models.dev has priority)
|
||||||
const allModels = [...modelsDevModels, ...openRouterModels];
|
const allModels = [...modelsDevModels, ...openRouterModels];
|
||||||
|
|
||||||
const githubToken = getGitHubTokenFromEnv();
|
|
||||||
let copilotModels: Model<any>[] = [];
|
|
||||||
if (!githubToken) {
|
|
||||||
console.warn("No GitHub token found for GitHub Copilot model discovery (set COPILOT_GITHUB_TOKEN, GH_TOKEN, or GITHUB_TOKEN). Using fallback list.");
|
|
||||||
copilotModels = getFallbackCopilotModels();
|
|
||||||
} else {
|
|
||||||
copilotModels = await fetchCopilotModels(githubToken);
|
|
||||||
if (copilotModels.length === 0) {
|
|
||||||
console.warn("No GitHub Copilot models fetched. Using fallback list.");
|
|
||||||
copilotModels = getFallbackCopilotModels();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
allModels.push(...copilotModels);
|
|
||||||
|
|
||||||
// Fix incorrect cache pricing for Claude Opus 4.5 from models.dev
|
// Fix incorrect cache pricing for Claude Opus 4.5 from models.dev
|
||||||
// models.dev has 3x the correct pricing (1.5/18.75 instead of 0.5/6.25)
|
// models.dev has 3x the correct pricing (1.5/18.75 instead of 0.5/6.25)
|
||||||
|
|
@ -642,8 +517,9 @@ export const MODELS = {
|
||||||
if (model.headers) {
|
if (model.headers) {
|
||||||
output += `\t\t\theaders: ${JSON.stringify(model.headers)},\n`;
|
output += `\t\t\theaders: ${JSON.stringify(model.headers)},\n`;
|
||||||
}
|
}
|
||||||
if ((model as any).compat) {
|
if (model.compat) {
|
||||||
output += `\t\t\tcompat: ${JSON.stringify((model as any).compat)},\n`;
|
output += ` compat: ${JSON.stringify(model.compat)},
|
||||||
|
`;
|
||||||
}
|
}
|
||||||
output += `\t\t\treasoning: ${model.reasoning},\n`;
|
output += `\t\t\treasoning: ${model.reasoning},\n`;
|
||||||
output += `\t\t\tinput: [${model.input.map(i => `"${i}"`).join(", ")}],\n`;
|
output += `\t\t\tinput: [${model.input.map(i => `"${i}"`).join(", ")}],\n`;
|
||||||
|
|
|
||||||
|
|
@ -2468,6 +2468,606 @@ export const MODELS = {
|
||||||
maxTokens: 16384,
|
maxTokens: 16384,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
},
|
},
|
||||||
|
"github-copilot": {
|
||||||
|
"gemini-2.0-flash-001": {
|
||||||
|
id: "gemini-2.0-flash-001",
|
||||||
|
name: "Gemini 2.0 Flash",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "github-copilot",
|
||||||
|
baseUrl: "https://api.githubcopilot.com",
|
||||||
|
headers: {
|
||||||
|
"User-Agent": "GitHubCopilotChat/0.35.0",
|
||||||
|
"Editor-Version": "vscode/1.105.1",
|
||||||
|
"Editor-Plugin-Version": "copilot-chat/0.35.0",
|
||||||
|
"Copilot-Integration-Id": "copilot-developer-cli",
|
||||||
|
"Openai-Intent": "conversation-edits",
|
||||||
|
"X-Initiator": "agent",
|
||||||
|
},
|
||||||
|
compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false },
|
||||||
|
reasoning: false,
|
||||||
|
input: ["text", "image"],
|
||||||
|
cost: {
|
||||||
|
input: 0,
|
||||||
|
output: 0,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 1000000,
|
||||||
|
maxTokens: 8192,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
|
"grok-code-fast-1": {
|
||||||
|
id: "grok-code-fast-1",
|
||||||
|
name: "Grok Code Fast 1",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "github-copilot",
|
||||||
|
baseUrl: "https://api.githubcopilot.com",
|
||||||
|
headers: {
|
||||||
|
"User-Agent": "GitHubCopilotChat/0.35.0",
|
||||||
|
"Editor-Version": "vscode/1.105.1",
|
||||||
|
"Editor-Plugin-Version": "copilot-chat/0.35.0",
|
||||||
|
"Copilot-Integration-Id": "copilot-developer-cli",
|
||||||
|
"Openai-Intent": "conversation-edits",
|
||||||
|
"X-Initiator": "agent",
|
||||||
|
},
|
||||||
|
compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false },
|
||||||
|
reasoning: true,
|
||||||
|
input: ["text"],
|
||||||
|
cost: {
|
||||||
|
input: 0,
|
||||||
|
output: 0,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 128000,
|
||||||
|
maxTokens: 64000,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
|
"gpt-5.1-codex": {
|
||||||
|
id: "gpt-5.1-codex",
|
||||||
|
name: "GPT-5.1-Codex",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "github-copilot",
|
||||||
|
baseUrl: "https://api.githubcopilot.com",
|
||||||
|
headers: {
|
||||||
|
"User-Agent": "GitHubCopilotChat/0.35.0",
|
||||||
|
"Editor-Version": "vscode/1.105.1",
|
||||||
|
"Editor-Plugin-Version": "copilot-chat/0.35.0",
|
||||||
|
"Copilot-Integration-Id": "copilot-developer-cli",
|
||||||
|
"Openai-Intent": "conversation-edits",
|
||||||
|
"X-Initiator": "agent",
|
||||||
|
},
|
||||||
|
compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false },
|
||||||
|
reasoning: true,
|
||||||
|
input: ["text", "image"],
|
||||||
|
cost: {
|
||||||
|
input: 0,
|
||||||
|
output: 0,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 128000,
|
||||||
|
maxTokens: 128000,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
|
"claude-haiku-4.5": {
|
||||||
|
id: "claude-haiku-4.5",
|
||||||
|
name: "Claude Haiku 4.5",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "github-copilot",
|
||||||
|
baseUrl: "https://api.githubcopilot.com",
|
||||||
|
headers: {
|
||||||
|
"User-Agent": "GitHubCopilotChat/0.35.0",
|
||||||
|
"Editor-Version": "vscode/1.105.1",
|
||||||
|
"Editor-Plugin-Version": "copilot-chat/0.35.0",
|
||||||
|
"Copilot-Integration-Id": "copilot-developer-cli",
|
||||||
|
"Openai-Intent": "conversation-edits",
|
||||||
|
"X-Initiator": "agent",
|
||||||
|
},
|
||||||
|
compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false },
|
||||||
|
reasoning: true,
|
||||||
|
input: ["text", "image"],
|
||||||
|
cost: {
|
||||||
|
input: 0,
|
||||||
|
output: 0,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 128000,
|
||||||
|
maxTokens: 16000,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
|
"gemini-3-pro-preview": {
|
||||||
|
id: "gemini-3-pro-preview",
|
||||||
|
name: "Gemini 3 Pro Preview",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "github-copilot",
|
||||||
|
baseUrl: "https://api.githubcopilot.com",
|
||||||
|
headers: {
|
||||||
|
"User-Agent": "GitHubCopilotChat/0.35.0",
|
||||||
|
"Editor-Version": "vscode/1.105.1",
|
||||||
|
"Editor-Plugin-Version": "copilot-chat/0.35.0",
|
||||||
|
"Copilot-Integration-Id": "copilot-developer-cli",
|
||||||
|
"Openai-Intent": "conversation-edits",
|
||||||
|
"X-Initiator": "agent",
|
||||||
|
},
|
||||||
|
compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false },
|
||||||
|
reasoning: true,
|
||||||
|
input: ["text", "image"],
|
||||||
|
cost: {
|
||||||
|
input: 0,
|
||||||
|
output: 0,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 128000,
|
||||||
|
maxTokens: 64000,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
|
"oswe-vscode-prime": {
|
||||||
|
id: "oswe-vscode-prime",
|
||||||
|
name: "Raptor Mini (Preview)",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "github-copilot",
|
||||||
|
baseUrl: "https://api.githubcopilot.com",
|
||||||
|
headers: {
|
||||||
|
"User-Agent": "GitHubCopilotChat/0.35.0",
|
||||||
|
"Editor-Version": "vscode/1.105.1",
|
||||||
|
"Editor-Plugin-Version": "copilot-chat/0.35.0",
|
||||||
|
"Copilot-Integration-Id": "copilot-developer-cli",
|
||||||
|
"Openai-Intent": "conversation-edits",
|
||||||
|
"X-Initiator": "agent",
|
||||||
|
},
|
||||||
|
compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false },
|
||||||
|
reasoning: true,
|
||||||
|
input: ["text", "image"],
|
||||||
|
cost: {
|
||||||
|
input: 0,
|
||||||
|
output: 0,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 200000,
|
||||||
|
maxTokens: 64000,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
|
"claude-3.5-sonnet": {
|
||||||
|
id: "claude-3.5-sonnet",
|
||||||
|
name: "Claude Sonnet 3.5",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "github-copilot",
|
||||||
|
baseUrl: "https://api.githubcopilot.com",
|
||||||
|
headers: {
|
||||||
|
"User-Agent": "GitHubCopilotChat/0.35.0",
|
||||||
|
"Editor-Version": "vscode/1.105.1",
|
||||||
|
"Editor-Plugin-Version": "copilot-chat/0.35.0",
|
||||||
|
"Copilot-Integration-Id": "copilot-developer-cli",
|
||||||
|
"Openai-Intent": "conversation-edits",
|
||||||
|
"X-Initiator": "agent",
|
||||||
|
},
|
||||||
|
compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false },
|
||||||
|
reasoning: false,
|
||||||
|
input: ["text", "image"],
|
||||||
|
cost: {
|
||||||
|
input: 0,
|
||||||
|
output: 0,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 90000,
|
||||||
|
maxTokens: 8192,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
|
"gpt-5.1-codex-mini": {
|
||||||
|
id: "gpt-5.1-codex-mini",
|
||||||
|
name: "GPT-5.1-Codex-mini",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "github-copilot",
|
||||||
|
baseUrl: "https://api.githubcopilot.com",
|
||||||
|
headers: {
|
||||||
|
"User-Agent": "GitHubCopilotChat/0.35.0",
|
||||||
|
"Editor-Version": "vscode/1.105.1",
|
||||||
|
"Editor-Plugin-Version": "copilot-chat/0.35.0",
|
||||||
|
"Copilot-Integration-Id": "copilot-developer-cli",
|
||||||
|
"Openai-Intent": "conversation-edits",
|
||||||
|
"X-Initiator": "agent",
|
||||||
|
},
|
||||||
|
compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false },
|
||||||
|
reasoning: true,
|
||||||
|
input: ["text", "image"],
|
||||||
|
cost: {
|
||||||
|
input: 0,
|
||||||
|
output: 0,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 128000,
|
||||||
|
maxTokens: 100000,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
|
"gpt-5.1": {
|
||||||
|
id: "gpt-5.1",
|
||||||
|
name: "GPT-5.1",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "github-copilot",
|
||||||
|
baseUrl: "https://api.githubcopilot.com",
|
||||||
|
headers: {
|
||||||
|
"User-Agent": "GitHubCopilotChat/0.35.0",
|
||||||
|
"Editor-Version": "vscode/1.105.1",
|
||||||
|
"Editor-Plugin-Version": "copilot-chat/0.35.0",
|
||||||
|
"Copilot-Integration-Id": "copilot-developer-cli",
|
||||||
|
"Openai-Intent": "conversation-edits",
|
||||||
|
"X-Initiator": "agent",
|
||||||
|
},
|
||||||
|
compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false },
|
||||||
|
reasoning: true,
|
||||||
|
input: ["text", "image"],
|
||||||
|
cost: {
|
||||||
|
input: 0,
|
||||||
|
output: 0,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 128000,
|
||||||
|
maxTokens: 128000,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
|
"gpt-5-codex": {
|
||||||
|
id: "gpt-5-codex",
|
||||||
|
name: "GPT-5-Codex",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "github-copilot",
|
||||||
|
baseUrl: "https://api.githubcopilot.com",
|
||||||
|
headers: {
|
||||||
|
"User-Agent": "GitHubCopilotChat/0.35.0",
|
||||||
|
"Editor-Version": "vscode/1.105.1",
|
||||||
|
"Editor-Plugin-Version": "copilot-chat/0.35.0",
|
||||||
|
"Copilot-Integration-Id": "copilot-developer-cli",
|
||||||
|
"Openai-Intent": "conversation-edits",
|
||||||
|
"X-Initiator": "agent",
|
||||||
|
},
|
||||||
|
compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false },
|
||||||
|
reasoning: true,
|
||||||
|
input: ["text", "image"],
|
||||||
|
cost: {
|
||||||
|
input: 0,
|
||||||
|
output: 0,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 128000,
|
||||||
|
maxTokens: 128000,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
|
"gpt-4o": {
|
||||||
|
id: "gpt-4o",
|
||||||
|
name: "GPT-4o",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "github-copilot",
|
||||||
|
baseUrl: "https://api.githubcopilot.com",
|
||||||
|
headers: {
|
||||||
|
"User-Agent": "GitHubCopilotChat/0.35.0",
|
||||||
|
"Editor-Version": "vscode/1.105.1",
|
||||||
|
"Editor-Plugin-Version": "copilot-chat/0.35.0",
|
||||||
|
"Copilot-Integration-Id": "copilot-developer-cli",
|
||||||
|
"Openai-Intent": "conversation-edits",
|
||||||
|
"X-Initiator": "agent",
|
||||||
|
},
|
||||||
|
compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false },
|
||||||
|
reasoning: false,
|
||||||
|
input: ["text", "image"],
|
||||||
|
cost: {
|
||||||
|
input: 0,
|
||||||
|
output: 0,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 64000,
|
||||||
|
maxTokens: 16384,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
|
"gpt-4.1": {
|
||||||
|
id: "gpt-4.1",
|
||||||
|
name: "GPT-4.1",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "github-copilot",
|
||||||
|
baseUrl: "https://api.githubcopilot.com",
|
||||||
|
headers: {
|
||||||
|
"User-Agent": "GitHubCopilotChat/0.35.0",
|
||||||
|
"Editor-Version": "vscode/1.105.1",
|
||||||
|
"Editor-Plugin-Version": "copilot-chat/0.35.0",
|
||||||
|
"Copilot-Integration-Id": "copilot-developer-cli",
|
||||||
|
"Openai-Intent": "conversation-edits",
|
||||||
|
"X-Initiator": "agent",
|
||||||
|
},
|
||||||
|
compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false },
|
||||||
|
reasoning: false,
|
||||||
|
input: ["text", "image"],
|
||||||
|
cost: {
|
||||||
|
input: 0,
|
||||||
|
output: 0,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 128000,
|
||||||
|
maxTokens: 16384,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
|
"gpt-5-mini": {
|
||||||
|
id: "gpt-5-mini",
|
||||||
|
name: "GPT-5-mini",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "github-copilot",
|
||||||
|
baseUrl: "https://api.githubcopilot.com",
|
||||||
|
headers: {
|
||||||
|
"User-Agent": "GitHubCopilotChat/0.35.0",
|
||||||
|
"Editor-Version": "vscode/1.105.1",
|
||||||
|
"Editor-Plugin-Version": "copilot-chat/0.35.0",
|
||||||
|
"Copilot-Integration-Id": "copilot-developer-cli",
|
||||||
|
"Openai-Intent": "conversation-edits",
|
||||||
|
"X-Initiator": "agent",
|
||||||
|
},
|
||||||
|
compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false },
|
||||||
|
reasoning: true,
|
||||||
|
input: ["text", "image"],
|
||||||
|
cost: {
|
||||||
|
input: 0,
|
||||||
|
output: 0,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 128000,
|
||||||
|
maxTokens: 64000,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
|
"claude-3.7-sonnet": {
|
||||||
|
id: "claude-3.7-sonnet",
|
||||||
|
name: "Claude Sonnet 3.7",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "github-copilot",
|
||||||
|
baseUrl: "https://api.githubcopilot.com",
|
||||||
|
headers: {
|
||||||
|
"User-Agent": "GitHubCopilotChat/0.35.0",
|
||||||
|
"Editor-Version": "vscode/1.105.1",
|
||||||
|
"Editor-Plugin-Version": "copilot-chat/0.35.0",
|
||||||
|
"Copilot-Integration-Id": "copilot-developer-cli",
|
||||||
|
"Openai-Intent": "conversation-edits",
|
||||||
|
"X-Initiator": "agent",
|
||||||
|
},
|
||||||
|
compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false },
|
||||||
|
reasoning: false,
|
||||||
|
input: ["text", "image"],
|
||||||
|
cost: {
|
||||||
|
input: 0,
|
||||||
|
output: 0,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 200000,
|
||||||
|
maxTokens: 16384,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
|
"gemini-2.5-pro": {
|
||||||
|
id: "gemini-2.5-pro",
|
||||||
|
name: "Gemini 2.5 Pro",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "github-copilot",
|
||||||
|
baseUrl: "https://api.githubcopilot.com",
|
||||||
|
headers: {
|
||||||
|
"User-Agent": "GitHubCopilotChat/0.35.0",
|
||||||
|
"Editor-Version": "vscode/1.105.1",
|
||||||
|
"Editor-Plugin-Version": "copilot-chat/0.35.0",
|
||||||
|
"Copilot-Integration-Id": "copilot-developer-cli",
|
||||||
|
"Openai-Intent": "conversation-edits",
|
||||||
|
"X-Initiator": "agent",
|
||||||
|
},
|
||||||
|
compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false },
|
||||||
|
reasoning: false,
|
||||||
|
input: ["text", "image"],
|
||||||
|
cost: {
|
||||||
|
input: 0,
|
||||||
|
output: 0,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 128000,
|
||||||
|
maxTokens: 64000,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
|
"gpt-5.1-codex-max": {
|
||||||
|
id: "gpt-5.1-codex-max",
|
||||||
|
name: "GPT-5.1-Codex-max",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "github-copilot",
|
||||||
|
baseUrl: "https://api.githubcopilot.com",
|
||||||
|
headers: {
|
||||||
|
"User-Agent": "GitHubCopilotChat/0.35.0",
|
||||||
|
"Editor-Version": "vscode/1.105.1",
|
||||||
|
"Editor-Plugin-Version": "copilot-chat/0.35.0",
|
||||||
|
"Copilot-Integration-Id": "copilot-developer-cli",
|
||||||
|
"Openai-Intent": "conversation-edits",
|
||||||
|
"X-Initiator": "agent",
|
||||||
|
},
|
||||||
|
compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false },
|
||||||
|
reasoning: true,
|
||||||
|
input: ["text", "image"],
|
||||||
|
cost: {
|
||||||
|
input: 0,
|
||||||
|
output: 0,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 128000,
|
||||||
|
maxTokens: 128000,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
|
o3: {
|
||||||
|
id: "o3",
|
||||||
|
name: "o3 (Preview)",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "github-copilot",
|
||||||
|
baseUrl: "https://api.githubcopilot.com",
|
||||||
|
headers: {
|
||||||
|
"User-Agent": "GitHubCopilotChat/0.35.0",
|
||||||
|
"Editor-Version": "vscode/1.105.1",
|
||||||
|
"Editor-Plugin-Version": "copilot-chat/0.35.0",
|
||||||
|
"Copilot-Integration-Id": "copilot-developer-cli",
|
||||||
|
"Openai-Intent": "conversation-edits",
|
||||||
|
"X-Initiator": "agent",
|
||||||
|
},
|
||||||
|
compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false },
|
||||||
|
reasoning: true,
|
||||||
|
input: ["text", "image"],
|
||||||
|
cost: {
|
||||||
|
input: 0,
|
||||||
|
output: 0,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 128000,
|
||||||
|
maxTokens: 16384,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
|
"claude-sonnet-4": {
|
||||||
|
id: "claude-sonnet-4",
|
||||||
|
name: "Claude Sonnet 4",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "github-copilot",
|
||||||
|
baseUrl: "https://api.githubcopilot.com",
|
||||||
|
headers: {
|
||||||
|
"User-Agent": "GitHubCopilotChat/0.35.0",
|
||||||
|
"Editor-Version": "vscode/1.105.1",
|
||||||
|
"Editor-Plugin-Version": "copilot-chat/0.35.0",
|
||||||
|
"Copilot-Integration-Id": "copilot-developer-cli",
|
||||||
|
"Openai-Intent": "conversation-edits",
|
||||||
|
"X-Initiator": "agent",
|
||||||
|
},
|
||||||
|
compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false },
|
||||||
|
reasoning: true,
|
||||||
|
input: ["text", "image"],
|
||||||
|
cost: {
|
||||||
|
input: 0,
|
||||||
|
output: 0,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 128000,
|
||||||
|
maxTokens: 16000,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
|
"gpt-5": {
|
||||||
|
id: "gpt-5",
|
||||||
|
name: "GPT-5",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "github-copilot",
|
||||||
|
baseUrl: "https://api.githubcopilot.com",
|
||||||
|
headers: {
|
||||||
|
"User-Agent": "GitHubCopilotChat/0.35.0",
|
||||||
|
"Editor-Version": "vscode/1.105.1",
|
||||||
|
"Editor-Plugin-Version": "copilot-chat/0.35.0",
|
||||||
|
"Copilot-Integration-Id": "copilot-developer-cli",
|
||||||
|
"Openai-Intent": "conversation-edits",
|
||||||
|
"X-Initiator": "agent",
|
||||||
|
},
|
||||||
|
compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false },
|
||||||
|
reasoning: true,
|
||||||
|
input: ["text", "image"],
|
||||||
|
cost: {
|
||||||
|
input: 0,
|
||||||
|
output: 0,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 128000,
|
||||||
|
maxTokens: 128000,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
|
"claude-3.7-sonnet-thought": {
|
||||||
|
id: "claude-3.7-sonnet-thought",
|
||||||
|
name: "Claude Sonnet 3.7 Thinking",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "github-copilot",
|
||||||
|
baseUrl: "https://api.githubcopilot.com",
|
||||||
|
headers: {
|
||||||
|
"User-Agent": "GitHubCopilotChat/0.35.0",
|
||||||
|
"Editor-Version": "vscode/1.105.1",
|
||||||
|
"Editor-Plugin-Version": "copilot-chat/0.35.0",
|
||||||
|
"Copilot-Integration-Id": "copilot-developer-cli",
|
||||||
|
"Openai-Intent": "conversation-edits",
|
||||||
|
"X-Initiator": "agent",
|
||||||
|
},
|
||||||
|
compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false },
|
||||||
|
reasoning: true,
|
||||||
|
input: ["text", "image"],
|
||||||
|
cost: {
|
||||||
|
input: 0,
|
||||||
|
output: 0,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 200000,
|
||||||
|
maxTokens: 16384,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
|
"claude-opus-4.5": {
|
||||||
|
id: "claude-opus-4.5",
|
||||||
|
name: "Claude Opus 4.5",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "github-copilot",
|
||||||
|
baseUrl: "https://api.githubcopilot.com",
|
||||||
|
headers: {
|
||||||
|
"User-Agent": "GitHubCopilotChat/0.35.0",
|
||||||
|
"Editor-Version": "vscode/1.105.1",
|
||||||
|
"Editor-Plugin-Version": "copilot-chat/0.35.0",
|
||||||
|
"Copilot-Integration-Id": "copilot-developer-cli",
|
||||||
|
"Openai-Intent": "conversation-edits",
|
||||||
|
"X-Initiator": "agent",
|
||||||
|
},
|
||||||
|
compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false },
|
||||||
|
reasoning: true,
|
||||||
|
input: ["text", "image"],
|
||||||
|
cost: {
|
||||||
|
input: 0,
|
||||||
|
output: 0,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 128000,
|
||||||
|
maxTokens: 16000,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
|
"gpt-5.2": {
|
||||||
|
id: "gpt-5.2",
|
||||||
|
name: "GPT-5.2",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "github-copilot",
|
||||||
|
baseUrl: "https://api.githubcopilot.com",
|
||||||
|
headers: {
|
||||||
|
"User-Agent": "GitHubCopilotChat/0.35.0",
|
||||||
|
"Editor-Version": "vscode/1.105.1",
|
||||||
|
"Editor-Plugin-Version": "copilot-chat/0.35.0",
|
||||||
|
"Copilot-Integration-Id": "copilot-developer-cli",
|
||||||
|
"Openai-Intent": "conversation-edits",
|
||||||
|
"X-Initiator": "agent",
|
||||||
|
},
|
||||||
|
compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false },
|
||||||
|
reasoning: true,
|
||||||
|
input: ["text", "image"],
|
||||||
|
cost: {
|
||||||
|
input: 0,
|
||||||
|
output: 0,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 128000,
|
||||||
|
maxTokens: 64000,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
|
"claude-sonnet-4.5": {
|
||||||
|
id: "claude-sonnet-4.5",
|
||||||
|
name: "Claude Sonnet 4.5",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "github-copilot",
|
||||||
|
baseUrl: "https://api.githubcopilot.com",
|
||||||
|
headers: {
|
||||||
|
"User-Agent": "GitHubCopilotChat/0.35.0",
|
||||||
|
"Editor-Version": "vscode/1.105.1",
|
||||||
|
"Editor-Plugin-Version": "copilot-chat/0.35.0",
|
||||||
|
"Copilot-Integration-Id": "copilot-developer-cli",
|
||||||
|
"Openai-Intent": "conversation-edits",
|
||||||
|
"X-Initiator": "agent",
|
||||||
|
},
|
||||||
|
compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false },
|
||||||
|
reasoning: true,
|
||||||
|
input: ["text", "image"],
|
||||||
|
cost: {
|
||||||
|
input: 0,
|
||||||
|
output: 0,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 128000,
|
||||||
|
maxTokens: 16000,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
|
},
|
||||||
openrouter: {
|
openrouter: {
|
||||||
"openai/gpt-5.2-chat": {
|
"openai/gpt-5.2-chat": {
|
||||||
id: "openai/gpt-5.2-chat",
|
id: "openai/gpt-5.2-chat",
|
||||||
|
|
@ -5733,23 +6333,6 @@ export const MODELS = {
|
||||||
contextWindow: 32768,
|
contextWindow: 32768,
|
||||||
maxTokens: 4096,
|
maxTokens: 4096,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
"cohere/command-r-plus-08-2024": {
|
|
||||||
id: "cohere/command-r-plus-08-2024",
|
|
||||||
name: "Cohere: Command R+ (08-2024)",
|
|
||||||
api: "openai-completions",
|
|
||||||
provider: "openrouter",
|
|
||||||
baseUrl: "https://openrouter.ai/api/v1",
|
|
||||||
reasoning: false,
|
|
||||||
input: ["text"],
|
|
||||||
cost: {
|
|
||||||
input: 2.5,
|
|
||||||
output: 10,
|
|
||||||
cacheRead: 0,
|
|
||||||
cacheWrite: 0,
|
|
||||||
},
|
|
||||||
contextWindow: 128000,
|
|
||||||
maxTokens: 4000,
|
|
||||||
} satisfies Model<"openai-completions">,
|
|
||||||
"cohere/command-r-08-2024": {
|
"cohere/command-r-08-2024": {
|
||||||
id: "cohere/command-r-08-2024",
|
id: "cohere/command-r-08-2024",
|
||||||
name: "Cohere: Command R (08-2024)",
|
name: "Cohere: Command R (08-2024)",
|
||||||
|
|
@ -5767,6 +6350,23 @@ export const MODELS = {
|
||||||
contextWindow: 128000,
|
contextWindow: 128000,
|
||||||
maxTokens: 4000,
|
maxTokens: 4000,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
|
"cohere/command-r-plus-08-2024": {
|
||||||
|
id: "cohere/command-r-plus-08-2024",
|
||||||
|
name: "Cohere: Command R+ (08-2024)",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "openrouter",
|
||||||
|
baseUrl: "https://openrouter.ai/api/v1",
|
||||||
|
reasoning: false,
|
||||||
|
input: ["text"],
|
||||||
|
cost: {
|
||||||
|
input: 2.5,
|
||||||
|
output: 10,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 128000,
|
||||||
|
maxTokens: 4000,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
"sao10k/l3.1-euryale-70b": {
|
"sao10k/l3.1-euryale-70b": {
|
||||||
id: "sao10k/l3.1-euryale-70b",
|
id: "sao10k/l3.1-euryale-70b",
|
||||||
name: "Sao10K: Llama 3.1 Euryale 70B v2.2",
|
name: "Sao10K: Llama 3.1 Euryale 70B v2.2",
|
||||||
|
|
@ -5835,23 +6435,6 @@ export const MODELS = {
|
||||||
contextWindow: 131072,
|
contextWindow: 131072,
|
||||||
maxTokens: 16384,
|
maxTokens: 16384,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
"meta-llama/llama-3.1-70b-instruct": {
|
|
||||||
id: "meta-llama/llama-3.1-70b-instruct",
|
|
||||||
name: "Meta: Llama 3.1 70B Instruct",
|
|
||||||
api: "openai-completions",
|
|
||||||
provider: "openrouter",
|
|
||||||
baseUrl: "https://openrouter.ai/api/v1",
|
|
||||||
reasoning: false,
|
|
||||||
input: ["text"],
|
|
||||||
cost: {
|
|
||||||
input: 0.39999999999999997,
|
|
||||||
output: 0.39999999999999997,
|
|
||||||
cacheRead: 0,
|
|
||||||
cacheWrite: 0,
|
|
||||||
},
|
|
||||||
contextWindow: 131072,
|
|
||||||
maxTokens: 4096,
|
|
||||||
} satisfies Model<"openai-completions">,
|
|
||||||
"meta-llama/llama-3.1-405b-instruct": {
|
"meta-llama/llama-3.1-405b-instruct": {
|
||||||
id: "meta-llama/llama-3.1-405b-instruct",
|
id: "meta-llama/llama-3.1-405b-instruct",
|
||||||
name: "Meta: Llama 3.1 405B Instruct",
|
name: "Meta: Llama 3.1 405B Instruct",
|
||||||
|
|
@ -5869,6 +6452,23 @@ export const MODELS = {
|
||||||
contextWindow: 130815,
|
contextWindow: 130815,
|
||||||
maxTokens: 4096,
|
maxTokens: 4096,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
|
"meta-llama/llama-3.1-70b-instruct": {
|
||||||
|
id: "meta-llama/llama-3.1-70b-instruct",
|
||||||
|
name: "Meta: Llama 3.1 70B Instruct",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "openrouter",
|
||||||
|
baseUrl: "https://openrouter.ai/api/v1",
|
||||||
|
reasoning: false,
|
||||||
|
input: ["text"],
|
||||||
|
cost: {
|
||||||
|
input: 0.39999999999999997,
|
||||||
|
output: 0.39999999999999997,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 131072,
|
||||||
|
maxTokens: 4096,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
"mistralai/mistral-nemo": {
|
"mistralai/mistral-nemo": {
|
||||||
id: "mistralai/mistral-nemo",
|
id: "mistralai/mistral-nemo",
|
||||||
name: "Mistral: Mistral Nemo",
|
name: "Mistral: Mistral Nemo",
|
||||||
|
|
@ -5886,9 +6486,9 @@ export const MODELS = {
|
||||||
contextWindow: 131072,
|
contextWindow: 131072,
|
||||||
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",
|
||||||
|
|
@ -5903,9 +6503,9 @@ export const MODELS = {
|
||||||
contextWindow: 128000,
|
contextWindow: 128000,
|
||||||
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",
|
||||||
|
|
@ -6056,23 +6656,6 @@ export const MODELS = {
|
||||||
contextWindow: 128000,
|
contextWindow: 128000,
|
||||||
maxTokens: 64000,
|
maxTokens: 64000,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
"meta-llama/llama-3-8b-instruct": {
|
|
||||||
id: "meta-llama/llama-3-8b-instruct",
|
|
||||||
name: "Meta: Llama 3 8B Instruct",
|
|
||||||
api: "openai-completions",
|
|
||||||
provider: "openrouter",
|
|
||||||
baseUrl: "https://openrouter.ai/api/v1",
|
|
||||||
reasoning: false,
|
|
||||||
input: ["text"],
|
|
||||||
cost: {
|
|
||||||
input: 0.03,
|
|
||||||
output: 0.06,
|
|
||||||
cacheRead: 0,
|
|
||||||
cacheWrite: 0,
|
|
||||||
},
|
|
||||||
contextWindow: 8192,
|
|
||||||
maxTokens: 16384,
|
|
||||||
} satisfies Model<"openai-completions">,
|
|
||||||
"meta-llama/llama-3-70b-instruct": {
|
"meta-llama/llama-3-70b-instruct": {
|
||||||
id: "meta-llama/llama-3-70b-instruct",
|
id: "meta-llama/llama-3-70b-instruct",
|
||||||
name: "Meta: Llama 3 70B Instruct",
|
name: "Meta: Llama 3 70B Instruct",
|
||||||
|
|
@ -6090,6 +6673,23 @@ export const MODELS = {
|
||||||
contextWindow: 8192,
|
contextWindow: 8192,
|
||||||
maxTokens: 16384,
|
maxTokens: 16384,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
|
"meta-llama/llama-3-8b-instruct": {
|
||||||
|
id: "meta-llama/llama-3-8b-instruct",
|
||||||
|
name: "Meta: Llama 3 8B Instruct",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "openrouter",
|
||||||
|
baseUrl: "https://openrouter.ai/api/v1",
|
||||||
|
reasoning: false,
|
||||||
|
input: ["text"],
|
||||||
|
cost: {
|
||||||
|
input: 0.03,
|
||||||
|
output: 0.06,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 8192,
|
||||||
|
maxTokens: 16384,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
"mistralai/mixtral-8x22b-instruct": {
|
"mistralai/mixtral-8x22b-instruct": {
|
||||||
id: "mistralai/mixtral-8x22b-instruct",
|
id: "mistralai/mixtral-8x22b-instruct",
|
||||||
name: "Mistral: Mixtral 8x22B Instruct",
|
name: "Mistral: Mixtral 8x22B Instruct",
|
||||||
|
|
@ -6175,23 +6775,6 @@ export const MODELS = {
|
||||||
contextWindow: 128000,
|
contextWindow: 128000,
|
||||||
maxTokens: 4096,
|
maxTokens: 4096,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
"openai/gpt-4-turbo-preview": {
|
|
||||||
id: "openai/gpt-4-turbo-preview",
|
|
||||||
name: "OpenAI: GPT-4 Turbo Preview",
|
|
||||||
api: "openai-completions",
|
|
||||||
provider: "openrouter",
|
|
||||||
baseUrl: "https://openrouter.ai/api/v1",
|
|
||||||
reasoning: false,
|
|
||||||
input: ["text"],
|
|
||||||
cost: {
|
|
||||||
input: 10,
|
|
||||||
output: 30,
|
|
||||||
cacheRead: 0,
|
|
||||||
cacheWrite: 0,
|
|
||||||
},
|
|
||||||
contextWindow: 128000,
|
|
||||||
maxTokens: 4096,
|
|
||||||
} satisfies Model<"openai-completions">,
|
|
||||||
"openai/gpt-3.5-turbo-0613": {
|
"openai/gpt-3.5-turbo-0613": {
|
||||||
id: "openai/gpt-3.5-turbo-0613",
|
id: "openai/gpt-3.5-turbo-0613",
|
||||||
name: "OpenAI: GPT-3.5 Turbo (older v0613)",
|
name: "OpenAI: GPT-3.5 Turbo (older v0613)",
|
||||||
|
|
@ -6209,6 +6792,23 @@ export const MODELS = {
|
||||||
contextWindow: 4095,
|
contextWindow: 4095,
|
||||||
maxTokens: 4096,
|
maxTokens: 4096,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
|
"openai/gpt-4-turbo-preview": {
|
||||||
|
id: "openai/gpt-4-turbo-preview",
|
||||||
|
name: "OpenAI: GPT-4 Turbo Preview",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "openrouter",
|
||||||
|
baseUrl: "https://openrouter.ai/api/v1",
|
||||||
|
reasoning: false,
|
||||||
|
input: ["text"],
|
||||||
|
cost: {
|
||||||
|
input: 10,
|
||||||
|
output: 30,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 128000,
|
||||||
|
maxTokens: 4096,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
"mistralai/mistral-tiny": {
|
"mistralai/mistral-tiny": {
|
||||||
id: "mistralai/mistral-tiny",
|
id: "mistralai/mistral-tiny",
|
||||||
name: "Mistral Tiny",
|
name: "Mistral Tiny",
|
||||||
|
|
@ -6277,9 +6877,9 @@ export const MODELS = {
|
||||||
contextWindow: 16385,
|
contextWindow: 16385,
|
||||||
maxTokens: 4096,
|
maxTokens: 4096,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
"openai/gpt-4": {
|
"openai/gpt-4-0314": {
|
||||||
id: "openai/gpt-4",
|
id: "openai/gpt-4-0314",
|
||||||
name: "OpenAI: GPT-4",
|
name: "OpenAI: GPT-4 (older v0314)",
|
||||||
api: "openai-completions",
|
api: "openai-completions",
|
||||||
provider: "openrouter",
|
provider: "openrouter",
|
||||||
baseUrl: "https://openrouter.ai/api/v1",
|
baseUrl: "https://openrouter.ai/api/v1",
|
||||||
|
|
@ -6294,9 +6894,9 @@ export const MODELS = {
|
||||||
contextWindow: 8191,
|
contextWindow: 8191,
|
||||||
maxTokens: 4096,
|
maxTokens: 4096,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
"openai/gpt-4-0314": {
|
"openai/gpt-4": {
|
||||||
id: "openai/gpt-4-0314",
|
id: "openai/gpt-4",
|
||||||
name: "OpenAI: GPT-4 (older v0314)",
|
name: "OpenAI: GPT-4",
|
||||||
api: "openai-completions",
|
api: "openai-completions",
|
||||||
provider: "openrouter",
|
provider: "openrouter",
|
||||||
baseUrl: "https://openrouter.ai/api/v1",
|
baseUrl: "https://openrouter.ai/api/v1",
|
||||||
|
|
@ -6346,136 +6946,4 @@ export const MODELS = {
|
||||||
maxTokens: 30000,
|
maxTokens: 30000,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
},
|
},
|
||||||
"github-copilot": {
|
|
||||||
"gpt-4o": {
|
|
||||||
id: "gpt-4o",
|
|
||||||
name: "gpt-4o",
|
|
||||||
api: "openai-completions",
|
|
||||||
provider: "github-copilot",
|
|
||||||
baseUrl: "https://api.githubcopilot.com",
|
|
||||||
headers: {
|
|
||||||
"User-Agent": "GitHubCopilotChat/0.35.0",
|
|
||||||
"Editor-Version": "vscode/1.105.1",
|
|
||||||
"Editor-Plugin-Version": "copilot-chat/0.35.0",
|
|
||||||
"Copilot-Integration-Id": "copilot-developer-cli",
|
|
||||||
"Openai-Intent": "conversation-edits",
|
|
||||||
"X-Initiator": "agent",
|
|
||||||
},
|
|
||||||
compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false },
|
|
||||||
reasoning: false,
|
|
||||||
input: ["text"],
|
|
||||||
cost: {
|
|
||||||
input: 0,
|
|
||||||
output: 0,
|
|
||||||
cacheRead: 0,
|
|
||||||
cacheWrite: 0,
|
|
||||||
},
|
|
||||||
contextWindow: 128000,
|
|
||||||
maxTokens: 8192,
|
|
||||||
} satisfies Model<"openai-completions">,
|
|
||||||
"gpt-4o-mini": {
|
|
||||||
id: "gpt-4o-mini",
|
|
||||||
name: "gpt-4o-mini",
|
|
||||||
api: "openai-completions",
|
|
||||||
provider: "github-copilot",
|
|
||||||
baseUrl: "https://api.githubcopilot.com",
|
|
||||||
headers: {
|
|
||||||
"User-Agent": "GitHubCopilotChat/0.35.0",
|
|
||||||
"Editor-Version": "vscode/1.105.1",
|
|
||||||
"Editor-Plugin-Version": "copilot-chat/0.35.0",
|
|
||||||
"Copilot-Integration-Id": "copilot-developer-cli",
|
|
||||||
"Openai-Intent": "conversation-edits",
|
|
||||||
"X-Initiator": "agent",
|
|
||||||
},
|
|
||||||
compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false },
|
|
||||||
reasoning: false,
|
|
||||||
input: ["text"],
|
|
||||||
cost: {
|
|
||||||
input: 0,
|
|
||||||
output: 0,
|
|
||||||
cacheRead: 0,
|
|
||||||
cacheWrite: 0,
|
|
||||||
},
|
|
||||||
contextWindow: 128000,
|
|
||||||
maxTokens: 8192,
|
|
||||||
} satisfies Model<"openai-completions">,
|
|
||||||
"claude-3.5-sonnet": {
|
|
||||||
id: "claude-3.5-sonnet",
|
|
||||||
name: "claude-3.5-sonnet",
|
|
||||||
api: "openai-completions",
|
|
||||||
provider: "github-copilot",
|
|
||||||
baseUrl: "https://api.githubcopilot.com",
|
|
||||||
headers: {
|
|
||||||
"User-Agent": "GitHubCopilotChat/0.35.0",
|
|
||||||
"Editor-Version": "vscode/1.105.1",
|
|
||||||
"Editor-Plugin-Version": "copilot-chat/0.35.0",
|
|
||||||
"Copilot-Integration-Id": "copilot-developer-cli",
|
|
||||||
"Openai-Intent": "conversation-edits",
|
|
||||||
"X-Initiator": "agent",
|
|
||||||
},
|
|
||||||
compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false },
|
|
||||||
reasoning: false,
|
|
||||||
input: ["text"],
|
|
||||||
cost: {
|
|
||||||
input: 0,
|
|
||||||
output: 0,
|
|
||||||
cacheRead: 0,
|
|
||||||
cacheWrite: 0,
|
|
||||||
},
|
|
||||||
contextWindow: 128000,
|
|
||||||
maxTokens: 8192,
|
|
||||||
} satisfies Model<"openai-completions">,
|
|
||||||
o1: {
|
|
||||||
id: "o1",
|
|
||||||
name: "o1",
|
|
||||||
api: "openai-completions",
|
|
||||||
provider: "github-copilot",
|
|
||||||
baseUrl: "https://api.githubcopilot.com",
|
|
||||||
headers: {
|
|
||||||
"User-Agent": "GitHubCopilotChat/0.35.0",
|
|
||||||
"Editor-Version": "vscode/1.105.1",
|
|
||||||
"Editor-Plugin-Version": "copilot-chat/0.35.0",
|
|
||||||
"Copilot-Integration-Id": "copilot-developer-cli",
|
|
||||||
"Openai-Intent": "conversation-edits",
|
|
||||||
"X-Initiator": "agent",
|
|
||||||
},
|
|
||||||
compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false },
|
|
||||||
reasoning: false,
|
|
||||||
input: ["text"],
|
|
||||||
cost: {
|
|
||||||
input: 0,
|
|
||||||
output: 0,
|
|
||||||
cacheRead: 0,
|
|
||||||
cacheWrite: 0,
|
|
||||||
},
|
|
||||||
contextWindow: 128000,
|
|
||||||
maxTokens: 8192,
|
|
||||||
} satisfies Model<"openai-completions">,
|
|
||||||
"o1-mini": {
|
|
||||||
id: "o1-mini",
|
|
||||||
name: "o1-mini",
|
|
||||||
api: "openai-completions",
|
|
||||||
provider: "github-copilot",
|
|
||||||
baseUrl: "https://api.githubcopilot.com",
|
|
||||||
headers: {
|
|
||||||
"User-Agent": "GitHubCopilotChat/0.35.0",
|
|
||||||
"Editor-Version": "vscode/1.105.1",
|
|
||||||
"Editor-Plugin-Version": "copilot-chat/0.35.0",
|
|
||||||
"Copilot-Integration-Id": "copilot-developer-cli",
|
|
||||||
"Openai-Intent": "conversation-edits",
|
|
||||||
"X-Initiator": "agent",
|
|
||||||
},
|
|
||||||
compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false },
|
|
||||||
reasoning: false,
|
|
||||||
input: ["text"],
|
|
||||||
cost: {
|
|
||||||
input: 0,
|
|
||||||
output: 0,
|
|
||||||
cacheRead: 0,
|
|
||||||
cacheWrite: 0,
|
|
||||||
},
|
|
||||||
contextWindow: 128000,
|
|
||||||
maxTokens: 8192,
|
|
||||||
} satisfies Model<"openai-completions">,
|
|
||||||
},
|
|
||||||
} as const;
|
} as const;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue