Feature/model defaults and upload limits - #137
Open
Jordan-Leis wants to merge 5 commits into
Open
Conversation
Adds gpt-5.4-nano as the top-priority model in the shared MODEL_PRIORITY ranking, and switches the Study Selection page to reuse pickBestFromList() instead of its own hardcoded Gemini 2.5 Flash Lite default, so both pages agree on the org default.
…cret ALLOWED_EMAILS was previously set as two independent plain env vars (one on the backend container, one on auth-sidecar), which drifted out of sync in production and locked out a real user. Both containers now reference one Container-App-level secret via secretRef, so a single `az containerapp secret set` updates access for both.
The upload size cap was previously three different, inconsistent hardcoded values (nginx 50MB, backend header-check 25MB, backend post-read check 20MB), and the frontend claimed a 20MB limit without enforcing it client-side. Both backend checks now use one env-driven value (MAX_UPLOAD_SIZE_MB, default 50), matching nginx, and the frontend enforces + displays the same limit. Also adds a page-count cap (MAX_PAGES, default 100), enforced at upload time via PyMuPDF (already a backend dependency) since page count is otherwise only known after full, slower document processing.
Per feedback from evaluators (via Spencer/boss) — 100 pages was too restrictive for real studies (300+ page documents already showing good results), and 500 pairs reasonably with the existing 50MB size cap (~0.1MB/page). Still fully overridable via the MAX_PAGES env var, no code changes needed to tune it further.
spencer-crook
approved these changes
Jul 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.