mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-21 22:01:41 +00:00
Revert "Fix jiti alias resolution in dev mode with tsx"
This reverts commit c7aa2c97a9.
This commit is contained in:
parent
c7aa2c97a9
commit
5f380822ea
2 changed files with 23 additions and 17 deletions
|
|
@ -4359,6 +4359,23 @@ export const MODELS = {
|
||||||
contextWindow: 256000,
|
contextWindow: 256000,
|
||||||
maxTokens: 128000,
|
maxTokens: 128000,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
|
"kwaipilot/kat-coder-pro:free": {
|
||||||
|
id: "kwaipilot/kat-coder-pro:free",
|
||||||
|
name: "Kwaipilot: KAT-Coder-Pro V1 (free)",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "openrouter",
|
||||||
|
baseUrl: "https://openrouter.ai/api/v1",
|
||||||
|
reasoning: false,
|
||||||
|
input: ["text"],
|
||||||
|
cost: {
|
||||||
|
input: 0,
|
||||||
|
output: 0,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 256000,
|
||||||
|
maxTokens: 128000,
|
||||||
|
} 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",
|
||||||
|
|
@ -4572,13 +4589,13 @@ export const MODELS = {
|
||||||
reasoning: true,
|
reasoning: true,
|
||||||
input: ["text"],
|
input: ["text"],
|
||||||
cost: {
|
cost: {
|
||||||
input: 0.27,
|
input: 0.28,
|
||||||
output: 1.12,
|
output: 1.2,
|
||||||
cacheRead: 0,
|
cacheRead: 0.14,
|
||||||
cacheWrite: 0,
|
cacheWrite: 0,
|
||||||
},
|
},
|
||||||
contextWindow: 196608,
|
contextWindow: 196608,
|
||||||
maxTokens: 65536,
|
maxTokens: 4096,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
"mistralai/codestral-2508": {
|
"mistralai/codestral-2508": {
|
||||||
id: "mistralai/codestral-2508",
|
id: "mistralai/codestral-2508",
|
||||||
|
|
|
||||||
|
|
@ -31,25 +31,14 @@ function getAliases(): Record<string, string> {
|
||||||
if (_aliases) return _aliases;
|
if (_aliases) return _aliases;
|
||||||
|
|
||||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||||
// Use .js extension but check if .ts exists (dev mode with tsx)
|
const packageIndex = path.resolve(__dirname, "../..", "index.js");
|
||||||
let packageIndex = path.resolve(__dirname, "../..", "index.js");
|
|
||||||
if (!fs.existsSync(packageIndex)) {
|
|
||||||
const tsPath = packageIndex.replace(/\.js$/, ".ts");
|
|
||||||
if (fs.existsSync(tsPath)) packageIndex = tsPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
let extensionsIndex = path.resolve(__dirname, "index.js");
|
|
||||||
if (!fs.existsSync(extensionsIndex)) {
|
|
||||||
const tsPath = extensionsIndex.replace(/\.js$/, ".ts");
|
|
||||||
if (fs.existsSync(tsPath)) extensionsIndex = tsPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
const typeboxEntry = require.resolve("@sinclair/typebox");
|
const typeboxEntry = require.resolve("@sinclair/typebox");
|
||||||
const typeboxRoot = typeboxEntry.replace(/\/build\/cjs\/index\.js$/, "");
|
const typeboxRoot = typeboxEntry.replace(/\/build\/cjs\/index\.js$/, "");
|
||||||
|
|
||||||
_aliases = {
|
_aliases = {
|
||||||
"@mariozechner/pi-coding-agent": packageIndex,
|
"@mariozechner/pi-coding-agent": packageIndex,
|
||||||
"@mariozechner/pi-coding-agent/extensions": extensionsIndex,
|
"@mariozechner/pi-coding-agent/extensions": path.resolve(__dirname, "index.js"),
|
||||||
"@mariozechner/pi-tui": require.resolve("@mariozechner/pi-tui"),
|
"@mariozechner/pi-tui": require.resolve("@mariozechner/pi-tui"),
|
||||||
"@mariozechner/pi-ai": require.resolve("@mariozechner/pi-ai"),
|
"@mariozechner/pi-ai": require.resolve("@mariozechner/pi-ai"),
|
||||||
"@sinclair/typebox": typeboxRoot,
|
"@sinclair/typebox": typeboxRoot,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue