readest/apps/readest-app/.env.web.example
Huang Xin b06c11f030
fix(api): validate DeepL and AI gateway request limits (#6818)
* fix(translate): validate DeepL requests and check quota per request

Validate that `text` is an array of strings and cap a request at 100 items
and 50,000 characters. Read the cache first, then check the daily quota
against the whole request's uncached characters before any upstream call,
instead of checking each item against the same starting usage in parallel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(ai): require the caller's gateway key on the AI proxy routes

The chat and embed routes fell back to a server-side AI Gateway key when the
request carried none. Every client already sends the user's own key, so
drop the fallback and its env examples, and cap request size (500 messages /
500k chars for chat, 100 texts / 500k chars for embed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(ai): reject a non-string system prompt

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 17:28:59 +02:00

6 lines
260 B
Text

NEXT_PUBLIC_APP_PLATFORM=web
READEST_TTS_CATALOG_URL=
# Optional: fixed daily TTS character quota for every plan (nonzero).
TTS_FIXED_QUOTA=
# Local development against the worker's Docker emulator:
# READEST_TTS_CATALOG_URL=http://localhost:8801/catalog.json