co-mono/packages/ai/package.json
Mario Zechner c7618db3f7 refactor(ai): Implement unified model system with type-safe createLLM
- Add Model interface to types.ts with normalized structure
- Create type-safe generic createLLM function with provider-specific model constraints
- Generate models from OpenRouter API and models.dev data
- Strip provider prefixes for direct providers (google, openai, anthropic, xai)
- Keep full model IDs for OpenRouter-proxied models
- Clean separation: types.ts (Model interface), models.ts (factory logic), models.generated.ts (data)
- Remove old model scripts and unused dependencies
- Rename GeminiLLM to GoogleLLM for consistency
- Add tests for new providers (xAI, Groq, Cerebras, OpenRouter)
- Support 181 tool-capable models across 7 providers with full type safety
2025-08-29 23:19:47 +02:00

49 lines
1 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",
"generate-models": "npx tsx scripts/generate-models.ts",
"build": "npm run generate-models && tsc -p tsconfig.build.json",
"check": "biome check --write .",
"test": "vitest --run",
"prepublishOnly": "npm run clean && 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",
"vitest": "^3.2.4"
}
}