Prefer node-fetch instead of native
| @@ -1,4 +1,5 @@ | ||
| 1 | 1 | import express from 'express'; |
| 2 | +import fetch from 'node-fetch'; | |
| 2 | 3 | |
| 3 | 4 | export const router = express.Router(); |
| 4 | 5 | const API_OPENROUTER = 'https://openrouter.ai/api/v1'; |
| @@ -3,6 +3,7 @@ import path from 'node:path'; | ||
| 3 | 3 | import { Buffer } from 'node:buffer'; |
| 4 | 4 | |
| 5 | 5 | import express from 'express'; |
| 6 | +import fetch from 'node-fetch'; | |
| 6 | 7 | import { sync as writeFileAtomicSync } from 'write-file-atomic'; |
| 7 | 8 | |
| 8 | 9 | import { Tokenizer } from '@agnai/web-tokenizers'; |