qwen-code/scripts/startup-benchmark
tanzhenxin 9534a528a6
perf(cli): keep running in place when env files only hold model credentials (#12680)
* perf(cli): keep running in place when env files only hold model credentials

The env-file relaunch rule from #12602 fires for any value that `.env` files
or `settings.env` inject, including the API key that `/auth` stores and the
keys the docs recommend for `~/.qwen/.env`. Those users always paid the
second boot. Providers read credentials and endpoints per request, never
while a module loads, so `hasLoadedEnvironmentValues()` now ignores the
documented per-auth-type variables and the `envKey` of every configured
model provider. Any other injected value still forces a fresh image, and a
provider entry can never exempt a loader or boot-time key.

The DashScope proxy base URL was the one such variable read at module load;
it is now read at call time.

Reported by @wenshao in the #12622 review (F2).

Claude-Session: https://claude.ai/code/session_01163b7X4Ntw1S2pr9VrtRrs

* feat(scripts): let the startup benchmark load credentials from a file

`--credentials settings|dotenv` moves the stub's key and URL from the shell
into the settings file's `env` block or `~/.qwen/.env`, so the env-file
relaunch rule can be measured. The default stays `shell`.

Claude-Session: https://claude.ai/code/session_01163b7X4Ntw1S2pr9VrtRrs
2026-09-25 10:13:38 +00:00
..
benchmark.mjs perf(cli): keep running in place when env files only hold model credentials (#12680) 2026-09-25 10:13:38 +00:00
lib.mjs perf(cli): keep running in place when env files only hold model credentials (#12680) 2026-09-25 10:13:38 +00:00
proxies.mjs perf(cli): keep running in place when env files only hold model credentials (#12680) 2026-09-25 10:13:38 +00:00