Three things landed together; the message names all of them, because a commit that mentions one is a commit nobody finds the other two in. **Figures.** Thirty-four JPEG 2000 files — 21 on questions, the rest unattached in the media library — are WebP now, with `questions.image_path`, `questions.explanation_image_path` and `media_assets.path` repointed together. Serving already converted them on the way out, so nothing was broken; this removes the step and makes what is stored the same thing that is served. The originals stay: they are the only copy of what came out of the PDF, they cost a few megabytes between them, and a conversion nobody can undo is not one to run against a live bank. Paths are found by what the columns say rather than by listing a bucket, because three tables record them and updating two would be worse than none. **The openai SDK is gone.** Ten call sites — one more than the map said, the Celery article drafter — every one of them a POST with a JSON body, and not one reading usage, cost, tool calls or logprobs. Every other call to the same proxy was already plain httpx: embeddings, the ChromaDB embedding function, speech both ways, model discovery, the vision probe. So this deletes an abstraction rather than swapping one for another, and leaves one HTTP client instead of two. `chat()` and `achat()` return the message content; a `ProxyError` carries the status and the first 500 characters of the body, which is where the proxy explains itself. Behaviour is preserved deliberately, including a 600-second fallback timeout for the four call sites that were running on the SDK's ten-minute default. Lowering that is a real change and belongs in its own commit. Proved against the live proxy on both services rather than only against mocks: a completion, an async completion, a real 400 the vision probe still classifies as a refusal, 407 models read from the catalogue, and a word read off an image. **Voice.** A chosen voice is honoured whatever serves it. The prefix check only accepted a locally served one, so a site adding a hosted voice would offer it in Settings, save the learner's choice, and then quietly read every question in the default voice. The list has always come from the database — adding a voice is a row in Settings → AI models, never a code change. And the sign-in page stops offering a locked door: `signup-policy` reports whether registration is open at all, and the Sign up link goes when it is not. The switch existed and the only way to discover it was to fill the form in. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TqXevQJhxFrM7jJg82cgZN
33 lines
931 B
Text
33 lines
931 B
Text
fastapi==0.109.2
|
|
psycopg2-binary==2.9.9
|
|
uvicorn[standard]==0.27.1
|
|
sqlalchemy==2.0.27
|
|
alembic==1.13.1
|
|
python-jose[cryptography]==3.3.0
|
|
bcrypt>=4.0.1
|
|
python-multipart==0.0.9
|
|
pydantic[email]==2.6.1
|
|
pydantic-settings==2.1.0
|
|
PyMuPDF==1.23.22
|
|
# Thumbnails. It arrives transitively today, which is not a reason to let a
|
|
# feature depend on somebody else's dependency tree.
|
|
Pillow==12.3.0
|
|
chromadb==0.4.24
|
|
celery[redis]==5.3.6
|
|
redis==5.0.1
|
|
fastapi-mail==1.4.1
|
|
apscheduler==3.10.4
|
|
aiofiles==23.2.1
|
|
python-dotenv==1.0.1
|
|
# The only HTTP client in the process. Completions, embeddings, model
|
|
# discovery and the audio endpoints all POST to the same OpenAI-compatible
|
|
# proxy; litellm and then the openai SDK each stood in front of the
|
|
# completions half of that, and neither was doing anything this was not.
|
|
httpx==0.27.0
|
|
boto3==1.34.69
|
|
pgvector==0.3.6
|
|
openpyxl==3.1.2
|
|
authlib==1.3.0
|
|
itsdangerous==2.1.2
|
|
fpdf2==2.8.1
|
|
python-json-logger>=2.0.0
|