Skip to content

feat: headless /api/v1/calculate endpoint — sub-50ms, no LLM#21

Open
HeetRanpura wants to merge 1 commit intoadvikdivekar:mainfrom
HeetRanpura:feature/headless-calculate-endpoint
Open

feat: headless /api/v1/calculate endpoint — sub-50ms, no LLM#21
HeetRanpura wants to merge 1 commit intoadvikdivekar:mainfrom
HeetRanpura:feature/headless-calculate-endpoint

Conversation

@HeetRanpura
Copy link
Copy Markdown
Contributor

  • 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

@HeetRanpura HeetRanpura force-pushed the feature/headless-calculate-endpoint branch from 9731bea to 14462e9 Compare April 23, 2026 20:52
- 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
@HeetRanpura HeetRanpura force-pushed the feature/headless-calculate-endpoint branch from 14462e9 to d9d2e22 Compare April 23, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant