{"version":3,"file":"openrouter.d.ts","sourceRoot":"","sources":["../../src/providers/openrouter.ts"],"names":[],"mappings":"AAGA,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAC;AAG7D,wBAAgB,kBAAkB,IAAI,QAAQ,CAAC,oBAAoB,CAAC,CAgBnE","sourcesContent":["import { openAICompletionsApi } from \"../api/openai-completions.lazy.ts\";\nimport { envApiKeyAuth, lazyOAuth } from \"../auth/helpers.ts\";\nimport { loadOpenRouterOAuth } from \"../auth/oauth/load.ts\";\nimport { createProvider, type Provider } from \"../models.ts\";\nimport { OPENROUTER_MODELS } from \"./openrouter.models.ts\";\n\nexport function openrouterProvider(): Provider<\"openai-completions\"> {\n\treturn createProvider({\n\t\tid: \"openrouter\",\n\t\tname: \"OpenRouter\",\n\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\tauth: {\n\t\t\tapiKey: envApiKeyAuth(\"OpenRouter API key\", [\"OPENROUTER_API_KEY\"]),\n\t\t\toauth: lazyOAuth({\n\t\t\t\tname: \"OpenRouter OAuth\",\n\t\t\t\tloginLabel: \"Sign in with OpenRouter\",\n\t\t\t\tload: loadOpenRouterOAuth,\n\t\t\t}),\n\t\t},\n\t\tmodels: Object.values(OPENROUTER_MODELS),\n\t\tapi: openAICompletionsApi(),\n\t});\n}\n"]}