feat: extend client affinity to all Anthropic account types

- Backend: expand IsClientAffinityEnabled() to support all Anthropic
  accounts (OAuth/SetupToken/APIKey), not just OAuth/SetupToken
- Frontend: show client affinity toggle for all Anthropic accounts
- Frontend: fix save logic to properly chain extra field updates
- Antigravity accounts explicitly excluded from client affinity

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
erio
2026-03-06 17:46:00 +08:00
co-authored by Claude Opus 4.6
parent fb5f471fe1
commit c7e88ffcf1
@@ -2243,7 +2243,7 @@ const handleSubmit = async () => {
// For all Anthropic accounts, handle client_affinity in extra
if (props.account.platform === 'anthropic') {
const currentExtra = (updatePayload.extra as Record<string, unknown>) || (props.account.extra as Record<string, unknown>) || {}
const currentExtra = (props.account.extra as Record<string, unknown>) || {}
const newExtra: Record<string, unknown> = { ...currentExtra }
if (clientAffinityEnabled.value) {
newExtra.client_affinity_enabled = true