mirror of
https://github.com/zyycn/codex-proxy-rs.git
synced 2026-12-03 00:00:58 +00:00
Use the empty country policy and leave residency and account routing unset. Migrate existing follow-location policies and us residency values while preserving custom settings and advancing the settings revision. Update the settings UI, existing contract tests, and deployment guidance. Co-authored-by: Codex <noreply@openai.com>
16 lines
972 B
SQL
16 lines
972 B
SQL
alter table runtime_settings
|
|
alter column openai_request_settings_json set default '{"requestCountry":{"mode":"default"},"oauthGuardianReviewModel":true,"residency":null,"accountRoutingOverride":null}'::jsonb;
|
|
|
|
-- 仅调整旧默认值,保留自定义国家、透传模式及其他驻留和路由配置
|
|
update runtime_settings
|
|
set openai_request_settings_json = openai_request_settings_json
|
|
|| case when openai_request_settings_json->'requestCountry' = '{"mode":"follow_location"}'::jsonb
|
|
then '{"requestCountry":{"mode":"default"}}'::jsonb else '{}'::jsonb end
|
|
|| case when openai_request_settings_json->'residency' = '"us"'::jsonb
|
|
then '{"residency":null}'::jsonb else '{}'::jsonb end,
|
|
settings_revision = config_revision + 1,
|
|
config_revision = config_revision + 1,
|
|
updated_at = now()
|
|
where openai_request_settings_json->'requestCountry' = '{"mode":"follow_location"}'::jsonb
|
|
or openai_request_settings_json->'residency' = '"us"'::jsonb;
|