8e09afda27
When an auxiliary task is configured with provider=custom and an explicit base_url but an empty api_key, the custom_key fallback chain in resolve_provider_client() jumped straight to the no-key-required placeholder without consulting model.api_key from config.yaml. Users on self-hosted gateways who share the same endpoint and credentials for both the main model and auxiliary tasks got 401 auth errors. Add _read_main_api_key() following the same pattern as _read_main_model() and _read_main_provider(): checks _RUNTIME_MAIN_API_KEY (runtime override) first, then config.yaml model.api_key. Insert it into the fallback chain before no-key-required so real credentials are used when available, while local servers without auth still get the placeholder.