Artur Mukhamadiev f7895585d8 [pi][agent-browser] added agent-browser & pi configuration
:Release Notes:
- pi configuration do not configured to work with devtools mcp server

:Detailed Notes:
- Added configuration for agent-browser, but no good results was
  received. Seems like on a complex webpages like rutube.ru we could
  encounter several buttons which compacting to the identical nodes,
  leading to a problems with navigation
- agent-browser compaction of a11y tree seems to be a good starting
  point, but not sufficient

:Testing Performed:
- prompt: Launch <Movie> on rutube in both opencode and pi

:QA Notes:
-

:Issues Addressed:
-
2026-07-14 20:30:42 +03:00

44 lines
1.3 KiB
TypeScript

import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
// Local llama.cpp server (llama-server) exposing an OpenAI-compatible API.
// Mirrors .opencode/opencode.json -> provider "llama.cpp".
//
// Start the server with the scripts in ./llama-cpp/ (run_ornith.sh / run_gemma4.sh),
// which listen on http://0.0.0.0:8080 and register model aliases "ornith-1.0" and
// "gemma-4" respectively.
const BASE_URL = "http://localhost:8080/v1";
const MODELS = [
{
id: "ornith-1.0",
name: "Ornith 1.0 (llama.cpp)",
reasoning: true,
input: ["text", "image"] as const,
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
contextWindow: 65536,
maxTokens: 8192,
},
{
id: "gemma-4",
name: "Gemma 4 12B (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,
});
}