mirror of
https://github.com/Xe138/AI-Trader.git
synced 2026-04-17 07:17:25 -04:00
feat: use enabled field from config to determine which models run
Changed the API to respect the 'enabled' field in model configurations,
rather than requiring models to be explicitly specified in API requests.
Changes:
- Make 'models' parameter optional in POST /simulate/trigger
- If models not provided, read config and use enabled models
- If models provided, use as explicit override (for testing)
- Raise error if no enabled models found and none specified
- Update response message to show model count
Behavior:
- Default: Only runs models with "enabled": true in config
- Override: Can still specify models in request for manual testing
- Safety: Prevents accidental execution of disabled/expensive models
Example before (required):
POST /simulate/trigger
{"config_path": "...", "date_range": [...], "models": ["gpt-4"]}
Example after (optional):
POST /simulate/trigger
{"config_path": "...", "date_range": [...]}
# Uses models where enabled: true
This makes the config file the source of truth for which models
should run, while still allowing ad-hoc overrides for testing.
This commit is contained in:
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Changed
|
||||
- **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
|
||||
- If provided, explicitly overrides config (for manual testing)
|
||||
- Prevents accidental execution of all models
|
||||
|
||||
### Removed
|
||||
- **Web UI Port** - Removed unused web dashboard port configuration
|
||||
- Removed port 8888 from docker-compose.yml (not implemented)
|
||||
|
||||
Reference in New Issue
Block a user