feat: headless /api/v1/calculate endpoint — sub-50ms, no LLM#21
Open
HeetRanpura wants to merge 1 commit intoadvikdivekar:mainfrom
Open
feat: headless /api/v1/calculate endpoint — sub-50ms, no LLM#21HeetRanpura wants to merge 1 commit intoadvikdivekar:mainfrom
HeetRanpura wants to merge 1 commit intoadvikdivekar:mainfrom
Conversation
Contributor
HeetRanpura
commented
Apr 23, 2026
- Add ComputeAllOutput schema bundling all deterministic outputs
- Add PathToSafeOutput schema for reverse calculator
- Create compute.py engine with compute_all() function that runs: india_defaults → affordability → scenarios → risk_score → path_to_safe
- Add POST /api/v1/calculate endpoint (no auth required)
- Designed for frontend real-time sliders and comparison tools
- Pure Python arithmetic, zero I/O, zero LLM, target < 50ms
- Decouples math engine from LLM pipeline completely
9731bea to
14462e9
Compare
- Add ComputeAllOutput schema at end of schemas.py (no overlap with other PRs) - Create engines/compute.py with compute_all() function - Add POST /api/v1/calculate endpoint after health check (no auth required) - Pure math, zero LLM, zero API budget cost, target < 50ms - Designed for frontend real-time sliders and comparison tools
14462e9 to
d9d2e22
Compare
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.