fix(openai): make Codex fingerprint convergence opt-in (#5610)
main ← cying22:fix/openai-oauth-quota-regression
已关闭 02:01AM - 14 Aug 26 UTC
## Summary
- default missing, empty, or invalid `codex_fingerprint_mode` values… to `off`
- align create, edit, and bulk-edit flows with opt-in fingerprint convergence
- keep explicit `device`, `session`, and `full` configurations unchanged
- add regressions for legacy accounts, explicit opt-in, and bulk `off` updates
## Why
v0.1.175 introduced Codex fingerprint convergence and treated an absent account setting as `session`. Existing OpenAI OAuth accounts generally do not have this new key, so upgrading silently changed every non-passthrough request by replacing installation, session, thread, turn, and window identifiers in both headers and `client_metadata`.
The quota regressions reported in #5555, #5556, and #5582 line up with that version boundary, including reports that rolling back to v0.1.173 restores expected quota behavior. OpenAI's exact server-side quota policy is not observable here, so this PR takes the compatibility-safe approach: preserve the pre-v0.1.175 client identity unless an administrator explicitly opts into convergence.
This is independent of the existing OpenAI automatic-passthrough switch. Accounts can continue using the normal transform path without having their fingerprint identifiers converged by default.
## Validation
- `go test ./internal/service -run 'Test(GetCodexFingerprintMode|ResolveCodexFingerprintIDsFromRequest|ApplyCodexFingerprintHeaders|ApplyCodexFingerprintClientMetadata|FingerprintIDs)' -count=1`
- `go test ./internal/service -count=1`
- `npm test -- --run src/components/account/__tests__/CreateAccountModal.spec.ts src/components/account/__tests__/EditAccountModal.spec.ts src/components/account/__tests__/BulkEditAccountModal.spec.ts` (89 tests)
- `npm run typecheck`
- ESLint on all changed frontend source and test files
- `git diff --check`
Refs #5555, #5556, #5582