- Replace `OPENREADER_COMPUTE_MODE` and related variables with `COMPUTE_MODE` - Replace `OPENREADER_*` PDF/Whisper model URLs with `PDF_LAYOUT_MODEL_BASE_URL` and `WHISPER_MODEL_BASE_URL` - Remove legacy `NEXT_PUBLIC_*` runtime config seeds in favor of `RUNTIME_SEED_*` - Update documentation, code, and environment references to match new variable names - Remove deprecated `scripts/fetch-models.mjs` and related npm script - Update runtime config SSR injection from `window.__OPENREADER_RUNTIME_CONFIG__` to `window.__RUNTIME_CONFIG__` - Adjust Next.js config to use new compute mode env var and optimize output file tracing for ONNX dependencies BREAKING CHANGE: Environment variable names for compute mode, model URLs, and runtime config seeding have changed. Update `.env` files and deployment configs to use `COMPUTE_MODE`, `PDF_LAYOUT_MODEL_BASE_URL`, `WHISPER_MODEL_BASE_URL`, and `RUNTIME_SEED_*` as appropriate. Legacy `OPENREADER_*` and `NEXT_PUBLIC_*` variables are no longer supported.
17 lines
730 B
TypeScript
17 lines
730 B
TypeScript
import type { ComputeBackend, PdfLayoutInput, WhisperAlignInput, WhisperAlignResult } from '@/lib/server/compute/types';
|
|
import { UnsupportedComputeError } from '@/lib/server/compute/types';
|
|
import type { ParsedPdfDocument } from '@/types/parsed-pdf';
|
|
|
|
export class NoneComputeBackend implements ComputeBackend {
|
|
readonly mode = 'none' as const;
|
|
|
|
async alignWords(input: WhisperAlignInput): Promise<WhisperAlignResult> {
|
|
void input;
|
|
throw new UnsupportedComputeError('Word alignment is unavailable: COMPUTE_MODE=none');
|
|
}
|
|
|
|
async parsePdfLayout(input: PdfLayoutInput): Promise<ParsedPdfDocument> {
|
|
void input;
|
|
throw new UnsupportedComputeError('PDF layout parsing is unavailable: COMPUTE_MODE=none');
|
|
}
|
|
}
|