refactor: remove config_path from API interface

Makes config_path an internal server detail rather than an API parameter.

Changes:
- Remove config_path from SimulateTriggerRequest
- Add config_path parameter to create_app() with default
- Store in app.state.config_path for internal use
- Update trigger endpoint to use internal config path
- Change missing config error from 400 to 500 (server error)

API calls now only need to specify date_range (and optionally models):
  POST /simulate/trigger
  {"date_range": ["2025-01-16"]}

The server uses configs/default_config.json by default.
This simplifies the API and hides implementation details from clients.
This commit is contained in:
2025-10-31 15:18:56 -04:00
parent ec2a37e474
commit 8e7e80807b
2 changed files with 20 additions and 9 deletions

View File

@@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Changed
- **Simplified API Interface** - Config path is now a server-side detail
- Removed `config_path` parameter from POST /simulate/trigger
- Server uses internal default config (configs/default_config.json)
- Simplifies API calls - only need to specify date_range
- **Model Selection** - `enabled` field in config now controls which models run
- API `models` parameter is now optional
- If not provided, uses models where `enabled: true` in config