mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-09-07 00:24:17 +08:00
Home execution built its executor context without the request metadata enrichment used by the normal execution path, so usage records fell back to defaults: an explicit `service_tier: priority` request was serialized as `default`, the requested model alias degraded to the execution model, and an explicit `generate: false` became `true`. Enrich the Home attempt context in `executeHome` before auth preparation, execution, and Home result reporting. Apply the same enrichment in `executeStreamMixedOnce`, where prepare-stage usage records had an identical gap because enrichment only happened downstream in `executeStreamWithModelPool`, after `prepareHomeRequestAuth` had already reported the `prepare_failed` result. Fixes #4791