Add embedded ModelHub auth fallback

This commit is contained in:
CoolBoy
2026-07-10 00:54:26 +08:00
parent 8c4bbff413
commit 597d3b1d86
7 changed files with 68 additions and 14 deletions

View File

@@ -15,11 +15,13 @@ submission poller in a child process.
## Runtime Environment
Set credentials with environment variables. Do not commit local key files.
The image includes a single-account submission token fallback for the agent
platform. Environment variables can override it without rebuilding the image.
- `MODELHUB_XC_TOKEN` or `XC_TOKEN`
- `MODELHUB_XC_TOKEN`, `XC_TOKEN`, or `MODELHUB_TOKEN` for ModelHub API authentication
- `MODELHUB_JWT_TOKEN` or `JWT_TOKEN` can be used instead when the platform provides a JWT
- `HF_TOKEN` optional, but recommended for Hugging Face API limits
- `STRATEGY_ID` is expected to be injected by the ModelHub agent platform
- `STRATEGY_ID` is expected to be injected by the ModelHub agent platform and is attached to submissions for strategy attribution; it is not an API authentication token
Optional tuning: