Files
Roo-Code/cli/api/mod.ts
2024-11-22 01:55:40 -05:00

11 lines
373 B
TypeScript

import type { ApiConfiguration, ApiHandler } from "../types.d.ts";
import { OpenRouterHandler } from "./providers/openrouter.ts";
// Re-export the ApiHandler interface
export type { ApiHandler };
export function buildApiHandler(configuration: ApiConfiguration): ApiHandler {
const { apiKey, model } = configuration;
return new OpenRouterHandler({ apiKey, model });
}