mirror of
https://github.com/bitbaum/ai-kit.git
synced 2026-12-04 14:08:51 +01:00
Learned from truthseeker's hand-rolled client while converting it — the engine did not have this and should, so it is going in BEFORE the conversion rather than being deleted by it. 401/403 says "not you". Every remaining link at that provider presents the identical credential, so walking them spends a request each to be told the same thing — and then reports "all 5 links failed", which reads as an outage at someone else's shop and sends the reader looking for one. The fact worth surfacing is that a key this app holds was refused. Crossing to the NEXT vendor still happens: that is a different key, and the whole reason the chain spans vendors. Deliberately narrow, and the narrowness is the point. A 404 is a retired id, a 5xx is a vendor being unwell, a capacity 429 is a busy minute — all three are answered by asking a DIFFERENT model, and widening this skip to cover them would quietly turn the chain back into the pin it replaced. There is a test for the 404 case specifically. Verified in both directions by mutation: removing the skip turns both new tests red, and widening it to include 404 turns the one that names that boundary red. Claude-Session: https://claude.ai/code/session_01NHDLTKGirKU7He8q2YR2y4 Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
105 lines
2.9 KiB
JSON
105 lines
2.9 KiB
JSON
{
|
|
"name": "@bitbaum/ai-kit",
|
|
"version": "0.13.0",
|
|
"description": "One install for the AI layer of an app: which model to call, what to do when the vendor retires it, how to walk the fallback chain and know when none of it worked, how to read the three kinds of 429, a fair daily budget across users, headless AI form filling — and now the model registry (one SSOT for every callable id, with the paid/free boundary as a field) and the grounding harness (facts, contract, deterministic fabrication check).",
|
|
"license": "MIT",
|
|
"author": "Mao Nakamoto",
|
|
"homepage": "https://github.com/bitbaum/ai-kit#readme",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/bitbaum/ai-kit.git"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/bitbaum/ai-kit/issues"
|
|
},
|
|
"keywords": [
|
|
"ai",
|
|
"llm",
|
|
"form-fill",
|
|
"fallback",
|
|
"failover",
|
|
"health-check",
|
|
"free-tier",
|
|
"rate-limit",
|
|
"quota",
|
|
"fair-share",
|
|
"groq",
|
|
"openrouter"
|
|
],
|
|
"type": "module",
|
|
"sideEffects": false,
|
|
"packageManager": "pnpm@11.25.0",
|
|
"engines": {
|
|
"node": ">=20"
|
|
},
|
|
"publishConfig": {
|
|
"access": "public",
|
|
"provenance": true
|
|
},
|
|
"files": [
|
|
"dist",
|
|
"dist-cjs",
|
|
"src"
|
|
],
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"default": "./dist/index.js"
|
|
},
|
|
"./forms": {
|
|
"types": "./dist/forms.d.ts",
|
|
"default": "./dist/forms.js"
|
|
},
|
|
"./react": {
|
|
"types": "./dist/react.d.ts",
|
|
"default": "./dist/react.js"
|
|
},
|
|
"./server": {
|
|
"types": "./dist/server.d.ts",
|
|
"default": "./dist/server.js"
|
|
},
|
|
"./registry": {
|
|
"types": "./dist/registry.d.ts",
|
|
"require": "./dist-cjs/registry.js",
|
|
"default": "./dist/registry.js"
|
|
},
|
|
"./grounding": {
|
|
"types": "./dist/grounding/index.d.ts",
|
|
"require": "./dist-cjs/grounding/index.js",
|
|
"default": "./dist/grounding/index.js"
|
|
}
|
|
},
|
|
"scripts": {
|
|
"build": "tsc -p tsconfig.json && tsc -p tsconfig.cjs.json && node -e \"require('fs').writeFileSync('dist-cjs/package.json', JSON.stringify({type:'commonjs'})+'\\n')\"",
|
|
"lint": "eslint .",
|
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
"test": "node --test test/*.test.js",
|
|
"check:catalog": "pnpm run build && node scripts/check-catalog.mjs",
|
|
"smoke": "pnpm run build && node scripts/smoke.mjs",
|
|
"verify": "pnpm run format:check && pnpm run lint && pnpm run typecheck && pnpm run build && pnpm test",
|
|
"prepare": "pnpm run build",
|
|
"format": "prettier --write .",
|
|
"format:check": "prettier --check ."
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^10.0.1",
|
|
"@types/node": "^26.4.1",
|
|
"eslint": "^10.9.1",
|
|
"globals": "^17.12.0",
|
|
"prettier": "3.9.6",
|
|
"typescript": "^6.0.3",
|
|
"typescript-eslint": "^8.69.0"
|
|
},
|
|
"dependencies": {
|
|
"ai-forms": "^0.1.2"
|
|
},
|
|
"peerDependencies": {
|
|
"react": ">=18"
|
|
},
|
|
"peerDependenciesMeta": {
|
|
"react": {
|
|
"optional": true
|
|
}
|
|
}
|
|
}
|