30 lines
784 B
TypeScript
30 lines
784 B
TypeScript
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
|
|
//const BASE_URL = "http://172.26.76.49:8001/v1";
|
|
const BASE_URL = "http://127.0.0.1:4901/v1";
|
|
|
|
const MODELS = [
|
|
{
|
|
id: "qwen-3.6",
|
|
name: "Qwen-3.6 35B A3B (llama.cpp)",
|
|
reasoning: true,
|
|
input: ["text", "image"] as const,
|
|
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
|
contextWindow: 131072,
|
|
maxTokens: 8192,
|
|
},
|
|
];
|
|
|
|
export default function (pi: ExtensionAPI) {
|
|
pi.registerProvider("llama-cpp", {
|
|
name: "llama.cpp (local)",
|
|
baseUrl: BASE_URL,
|
|
// llama-server accepts any bearer token; send a placeholder so the
|
|
// Authorization header is present.
|
|
apiKey: "llama-cpp",
|
|
authHeader: true,
|
|
api: "openai-completions",
|
|
models: MODELS,
|
|
});
|
|
}
|