co-mono/packages/ai/package.json
Mario Zechner da66a97ea7 feat(ai): Add auto-generated TypeScript models with factory function
- Generate models.generated.ts from models.json with proper types
- Categorize providers: OpenAI (Responses), OpenAI-compatible, Anthropic, Gemini
- Create createLLM() factory with TypeScript overloads for type safety
- Auto-detect base URLs and environment variables for providers
- Support 353 models across 39 providers with full autocompletion
- Exclude generated file from git (rebuilt on npm build)
2025-08-25 21:31:29 +02:00

50 lines
1.2 KiB
JSON

{
"name": "@mariozechner/ai",
"version": "0.5.8",
"description": "Unified API for OpenAI, Anthropic, and Google Gemini LLM providers",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist",
"README.md"
],
"scripts": {
"clean": "rm -rf dist",
"models": "curl -s https://models.dev/api.json -o src/models.json",
"generate-models": "npx tsx scripts/generate-models.ts",
"build": "npm run generate-models && tsc -p tsconfig.build.json && cp src/models.json dist/models.json",
"check": "biome check --write .",
"test": "npx tsx --test test/providers.test.ts",
"extract-models": "npx tsx scripts/extract-openai-models.ts",
"prepublishOnly": "npm run clean && npm run models && npm run build"
},
"dependencies": {
"@anthropic-ai/sdk": "^0.60.0",
"@google/genai": "^1.15.0",
"chalk": "^5.5.0",
"openai": "^5.15.0"
},
"keywords": [
"ai",
"llm",
"openai",
"anthropic",
"gemini",
"unified",
"api"
],
"author": "Mario Zechner",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/badlogic/pi-mono.git",
"directory": "packages/ai"
},
"engines": {
"node": ">=20.0.0"
},
"devDependencies": {
"@types/node": "^24.3.0"
}
}