Commit 775fa75
committed
✨ feat(newapi): vendor/model sync; K/M context; move ratios path
Add a NewAPI model-management sync suite and restructure outputs:
- Endpoints (under /api/newapi/):
- vendors.json — rows aligned to `vendors` table
- models.json — rows aligned to `models` table
- ratio_config-v1-base.json — pricing ratios payload
- build.js:
- Centralize all NewAPI generation into one block
- Add helpers: buildNewApiSyncPayload(), buildNewApiTags(), formatTokensToKM()
- Include context size in tags using K/M notation (e.g., 128K, 1M; no prefix)
- Unify Markdown table limits via K/M formatting (1,000K becomes 1M)
- docs:
- Update docs/index.md to list new endpoints and new ratios path
- Update README.md & README.zh-CN.md links/descriptions
BREAKING CHANGE: pricing ratios endpoint moved from
/api/newapi-ratio_config-v1-base.json
to
/api/newapi/ratio_config-v1-base.json
(Update consumers accordingly; payload shape unchanged.)1 parent 2d7a5ea commit 775fa75
2 files changed
+38
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
175 | 177 | | |
176 | 178 | | |
177 | 179 | | |
178 | | - | |
| 180 | + | |
| 181 | + | |
179 | 182 | | |
180 | 183 | | |
181 | 184 | | |
| |||
498 | 501 | | |
499 | 502 | | |
500 | 503 | | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | 504 | | |
516 | 505 | | |
517 | 506 | | |
| |||
535 | 524 | | |
536 | 525 | | |
537 | 526 | | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
538 | 531 | | |
539 | 532 | | |
540 | 533 | | |
| |||
578 | 571 | | |
579 | 572 | | |
580 | 573 | | |
581 | | - | |
| 574 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
155 | 182 | | |
156 | 183 | | |
157 | 184 | | |
| |||
164 | 191 | | |
165 | 192 | | |
166 | 193 | | |
| 194 | + | |
| 195 | + | |
167 | 196 | | |
168 | 197 | | |
169 | 198 | | |
0 commit comments