mod.ts 373 B

12345678910
  1. import type { ApiConfiguration, ApiHandler } from "../types.d.ts";
  2. import { OpenRouterHandler } from "./providers/openrouter.ts";
  3. // Re-export the ApiHandler interface
  4. export type { ApiHandler };
  5. export function buildApiHandler(configuration: ApiConfiguration): ApiHandler {
  6. const { apiKey, model } = configuration;
  7. return new OpenRouterHandler({ apiKey, model });
  8. }