Commit 14f4a53
fix: query TaxBenefitModel by name before getting version (#69)
* feat: add structural reform support for economy and household calculations
Adds run_structural_reform tool for the agent to run economy-wide structural reforms:
- Agent calls POST /agent/run-structural-reform to trigger Modal
- Modal applies simulation_modifier to reform simulation
- Decile impacts calculated and stored
- Agent polls until completion
Also adds simulation_modifier support to household calculations:
- Updated Modal household functions to use low-level Simulation API when modifier present
- Added helper functions _calculate_uk/us_household_with_modifier
- Updated _get_policy_data to include simulation_modifier
- Agent can use policy_id with modifier in /household/calculate
Fixes broken policyengine.outputs.inequality/poverty imports (module doesn't exist yet).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: query TaxBenefitModel by name before getting version
TaxBenefitModelVersion doesn't have a name field - need to query
TaxBenefitModel first, then get the version by model_id.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>1 parent 1f4ff97 commit 14f4a53
1 file changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
446 | 447 | | |
447 | 448 | | |
448 | 449 | | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
449 | 459 | | |
450 | | - | |
| 460 | + | |
451 | 461 | | |
452 | 462 | | |
453 | 463 | | |
| |||
0 commit comments