Repository navigation
Conversation
- Requests take a year, 2026 or 2027 (2026 if absent, so the live page's answers don't change), and every period, the household and both cache keys follow it. Responses report the year, the guideline's year and the policyengine-us version. - The FPL the API reports is now the prior year's guideline, the one the credit uses, and the household's state is set for that year too, so Alaska and Hawaii households get their own guideline for it. - One scenario table drives both calculator endpoints. New: the enhanced schedule capped at 700% FPL, and the enhanced schedule with a $5 minimum premium, which returns a 400 until policyengine-us models it (#10681). H.R. 1834's reform ends in 2028, as the bill does. - Responses include the benchmark premium at each income. - The AI explanation prompt takes the year and names the new scenarios. - Pin policyengine-us 2.105.0 (policyengine-core 3.34.9, spm-calculator 1.1.0), give the Modal function 4 GB, and smoke-test a 2027 answer after each deploy. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…remium 2.115.0 is the first release with the published 2027 premiums (policyengine-us #10682) and the minimum premium reform (#10681), so the $5 minimum premium scenario now runs. The tests check that it leaves $60 a year where H.R. 1834's credit covers the whole benchmark and matches H.R. 1834 where the household pays more, and that a model without it still gets a 400 that says so. Its requirements are those of 2.105.0. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The calculator now compares 2027 current law with H.R. 1834 and shows 2026 current law beside them, so the January 2026 draft variants (the 700% FPL cap and the $5 minimum premium) go. A 2027 request with show_prior_year also gets 2026 current law for the same household and incomes: ptc_prior_year, slcsp_by_income_prior_year and fpl_prior_year. The smoke test asks for it, and the explanation prompt uses it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ACA_API_APP_NAME names the Modal app (aca-calc-api by default). A preview deploy, such as aca-calc-api-preview, gets caches of its own, and the image carries the name so its containers open them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
This branch was successfully deployed
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.
Summary
This PR lets the calculator API model 2027 coverage under current law and under H.R. 1834, and return 2026 current law for the same household alongside. Requests without a year still get 2026, so the live page's answers don't change until the calculator frontend (#34) asks for 2027.
It is the backend part of the 2027 update, which now tells one story: how premiums rise from 2026 to 2027 under current law, and what reviving the enhanced credits would do. It pins policyengine-us 2.115.0, the first release with the published 2027 premiums (PolicyEngine/policyengine-us#10682).
What changes
year, 2026 or 2027 (2026 if absent). The household's inputs, every simulation period and both cache keys follow it. Responses reportyear,fpl_yearandmodel_version.show_prior_yearalso gets 2026 current law for the same household and incomes:ptc_prior_year,slcsp_by_income_prior_yearandfpl_prior_year. The API runs it in parallel with the 2027 scenarios. A 2026 request can't ask for it, since the API doesn't model 2025.aca_magi_fraction), but the API reported the coverage year's: $15,960 instead of $15,650 for a single person's 2026 coverage. It now reports the prior year's, so the page's FPL lines and its "% FPL" figures match the credit.show_irais H.R. 1834: the enhanced (ARPA/IRA) schedule for 2026–2028, with no income limit. It passed the House on January 8, 2026 and has not been enacted. Its reform now ends with the bill, in 2028, where the old IRA-extension reform ran to 2100; 2026 and 2027 results are unchanged. The 700% FPL bill and CRFB's two brackets are unchanged. The calculator page stops offering them in Compare 2026 and 2027 current law with H.R. 1834 in the calculator #34, but the live page uses them until then, so a follow-up can remove them from the API.slcsp_by_income. The benchmark premium at each income, for the household members who'd buy a marketplace plan, so the page can show what the benchmark plan costs after the credit.show_prior_yearit also compares the 2026 and 2027 benchmark premiums and credits. Its cache key includes the year,show_prior_yearand the model version.An earlier version of this PR also modeled two January 2026 draft variants of H.R. 1834 (a 700% FPL cap and a $5 minimum premium). The update now compares only current law and H.R. 1834, so they're gone.
Results
A single 45-year-old in Lebanon County, PA (policyengine-us 2.115.0). Annual credits, with what the benchmark plan costs after them each month. The benchmark premium is $13,523 a year in 2026 and $14,837 in 2027.
Below 400% FPL, current law caps the household's payment at a share of income, so the 2027 credit grows with the premium and the payment barely moves. Above it, the household pays the whole premium, $109 a month more in 2027.
Tests
tests/test_api_scenarios.py, with the image's exact packages:🤖 Generated with Claude Code