Cache models to avoid redundant dynamic imports
Introduces a module-level cache for models in endpoint.ts to prevent repeated dynamic imports on every request. This improves performance by loading models only once and reusing them for subsequent calls.