mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-11-16 22:57:53 +08:00
Add an optional `connection-pool` block to the api-key config surface: group level on codex/claude/gemini/vertex/openai-compatibility entries and per key inside `keys`. There is deliberately no global switch, so enabling reuse for one key cannot change the transport lifecycle of another provider or OAuth identity. - `connection-pool` joins the v8 shared key fields, so a group block is flattened into every key and each key may override it. - A per-key block merges onto the group block: fields the key does not mention (or sets to null) keep inheriting the group value. Replacing the whole block would silently drop the group's `enabled: true` when a key only overrides a timeout. - The resolved block reaches executors on `Auth.ProxyConnectionPool` (deep-copied on clone so auth snapshots never share mutable state). Writing the block is the opt-in; only an explicit `enabled: false` turns pooling off for that key. - OpenAI-compatible keys use the same field-level inheritance against their provider group default, and watcher config diffs report connection-pool changes on hot reload.