feat: extract models from command-code dist, load via models.json
- Add scripts/extract-models.ts to parse command-code npm dist file - Generate models.json (21 models, 15 pricing entries) with contextWindow and maxOutputTokens pre-filled; no nulls or hardcoded fallbacks in index.ts - Rewrite index.ts to load model list and costs from models.json - Cap gateway model maxOutputTokens at 65536 (API limit for Baseten/Vercel) - Add 'Update models' section to README documenting the generation flow - Add npm run extract-models script
This commit is contained in:
+3
-1
@@ -21,6 +21,7 @@
|
||||
"files": [
|
||||
"index.ts",
|
||||
"src/",
|
||||
"models.json",
|
||||
"README.md",
|
||||
"LICENSE"
|
||||
],
|
||||
@@ -34,7 +35,8 @@
|
||||
"test:abort": "tsx tests/test-abort.ts",
|
||||
"test:stream": "tsx tests/test-stream.ts",
|
||||
"test:pi-local": "node tests/test-pi-local.mjs",
|
||||
"test:smoke": "node tests/test-smoke.mjs"
|
||||
"test:smoke": "node tests/test-smoke.mjs",
|
||||
"extract-models": "tsx scripts/extract-models.ts"
|
||||
},
|
||||
"pi": {
|
||||
"extensions": [
|
||||
|
||||
Reference in New Issue
Block a user