Skip to content

Automate browser based workflows with AI

Fix Gemini flex PayGo header and add OpenAI GPT-5-nano/GPT-5.4 flex routers (#5511)

Shuchang Zhengf7f9cf96b2bb
diff --git a/docs/going-to-production/proxy-geolocation.mdx b/docs/going-to-production/proxy-geolocation.mdx
index 73fbfdaf7..37abf490f 100644
--- a/docs/going-to-production/proxy-geolocation.mdx
+++ b/docs/going-to-production/proxy-geolocation.mdx
@@ -252,13 +252,14 @@ export const PROXY_LOCATIONS = [
{ code: "IN", name: "India", value: "RESIDENTIAL_IN", timezone: "Asia/Kolkata", flag: "🇮🇳" },
{ code: "PH", name: "Philippines", value: "RESIDENTIAL_PH", timezone: "Asia/Manila", flag: "🇵🇭" },
{ code: "KR", name: "South Korea", value: "RESIDENTIAL_KR", timezone: "Asia/Seoul", flag: "🇰🇷" },
+ { code: "SA", name: "Saudi Arabia", value: "RESIDENTIAL_SA", timezone: "Asia/Riyadh", flag: "🇸🇦" },
{ code: "JP", name: "Japan", value: "RESIDENTIAL_JP", timezone: "Asia/Tokyo", flag: "🇯🇵" },
{ code: "AU", name: "Australia", value: "RESIDENTIAL_AU", timezone: "Australia/Sydney", flag: "🇦🇺" },
{ code: "NZ", name: "New Zealand", value: "RESIDENTIAL_NZ", timezone: "Pacific/Auckland", flag: "🇳🇿" },
{ code: "NONE", name: "No Proxy", value: "NONE", timezone: "—", flag: "🚫" },
]
-export const AVAILABLE_COUNTRIES = ["US", "CA", "MX", "AR", "BR", "GB", "IE", "NL", "DE", "FR", "ES", "IT", "TR", "ZA", "IN", "PH", "KR", "JP", "AU", "NZ"]
+export const AVAILABLE_COUNTRIES = ["US", "CA", "MX", "AR", "BR", "GB", "IE", "NL", "DE", "FR", "ES", "IT", "TR", "ZA", "IN", "PH", "KR", "SA", "JP", "AU", "NZ"]
export const ProxyMapSelector = () => {
const [selected, setSelected] = useState("US")
@@ -597,6 +598,7 @@ Use these enum values for country-level targeting. Each routes through a residen
| `RESIDENTIAL_NZ` | New Zealand | Pacific/Auckland |
| `RESIDENTIAL_PH` | Philippines | Asia/Manila |
| `RESIDENTIAL_KR` | South Korea | Asia/Seoul |
+| `RESIDENTIAL_SA` | Saudi Arabia | Asia/Riyadh |
| `RESIDENTIAL_TR` | Türkiye | Europe/Istanbul |
| `RESIDENTIAL_ZA` | South Africa | Africa/Johannesburg |
| `NONE` | No proxy | — |
diff --git a/docs/multi-step-automations/workflow-parameters.mdx b/docs/multi-step-automations/workflow-parameters.mdx
index fc072711f..931cad7a4 100644
--- a/docs/multi-step-automations/workflow-parameters.mdx
+++ b/docs/multi-step-automations/workflow-parameters.mdx
@@ -600,6 +600,7 @@ curl -X POST "https://api.skyvern.com/v1/run/workflows" \
| `RESIDENTIAL_NZ` | New Zealand |
| `RESIDENTIAL_PH` | Philippines |
| `RESIDENTIAL_KR` | South Korea |
+| `RESIDENTIAL_SA` | Saudi Arabia |
| `RESIDENTIAL_TR` | Türkiye |
| `RESIDENTIAL_ZA` | South Africa |
| `NONE` | No proxy |
diff --git a/docs/running-automations/task-parameters.mdx b/docs/running-automations/task-parameters.mdx
index c67197b64..24e4a04ee 100644
--- a/docs/running-automations/task-parameters.mdx
+++ b/docs/running-automations/task-parameters.mdx
@@ -308,6 +308,7 @@ Use this for geo-restricted content or to reduce bot detection.
| `RESIDENTIAL_NL` | Netherlands |
| `RESIDENTIAL_PH` | Philippines |
| `RESIDENTIAL_KR` | South Korea |
+| `RESIDENTIAL_SA` | Saudi Arabia |
| `RESIDENTIAL_TR` | Turkey |
| `RESIDENTIAL_ISP` | ISP proxy |
| `US-CA` | California, US |
diff --git a/fern/running-tasks/proxy-location.mdx b/fern/running-tasks/proxy-location.mdx
index b4ed9972d..49aec3a08 100644
--- a/fern/running-tasks/proxy-location.mdx
+++ b/fern/running-tasks/proxy-location.mdx
@@ -32,6 +32,7 @@ Pass any of the following enum values to `proxy_location`. Each value pins the r
| `RESIDENTIAL_NZ` | New Zealand |
| `RESIDENTIAL_PH` | Philippines |
| `RESIDENTIAL_KR` | South Korea |
+| `RESIDENTIAL_SA` | Saudi Arabia |
| `RESIDENTIAL_TR` | Türkiye |
| `RESIDENTIAL_ZA` | South Africa |
| `NONE` | Disable proxy routing (traffic originates from Skyvern’s US datacenters) |
diff --git a/skyvern-frontend/src/api/types.ts b/skyvern-frontend/src/api/types.ts
index bab46af3d..c6a15e9f2 100644
--- a/skyvern-frontend/src/api/types.ts
+++ b/skyvern-frontend/src/api/types.ts
@@ -63,6 +63,7 @@ export const ProxyLocation = {
ResidentialNL: "RESIDENTIAL_NL",
ResidentialPH: "RESIDENTIAL_PH",
ResidentialKR: "RESIDENTIAL_KR",
+ ResidentialSA: "RESIDENTIAL_SA",
ResidentialISP: "RESIDENTIAL_ISP",
None: "NONE",
} as const;
diff --git a/skyvern-frontend/src/util/geoData.ts b/skyvern-frontend/src/util/geoData.ts
index f7eff6d2d..6f15b384b 100644
--- a/skyvern-frontend/src/util/geoData.ts
+++ b/skyvern-frontend/src/util/geoData.ts
@@ -19,6 +19,7 @@ export const SUPPORTED_COUNTRY_CODES = [
"NZ",
"PH",
"KR",
+ "SA",
"TR",
"ZA",
] as const;
@@ -44,6 +45,7 @@ export const COUNTRY_NAMES: Record<SupportedCountryCode, string> = {
NZ: "New Zealand",
PH: "Philippines",
KR: "South Korea",
+ SA: "Saudi Arabia",
TR: "Turkey",
ZA: "South Africa",
};
@@ -67,6 +69,7 @@ export const COUNTRY_FLAGS: Record<SupportedCountryCode, string> = {
NZ: "🇳🇿",
PH: "🇵🇭",
KR: "🇰🇷",
+ SA: "🇸🇦",
TR: "🇹🇷",
ZA: "🇿🇦",
};
@@ -92,6 +95,7 @@ const PROXY_LOCATION_TO_COUNTRY: Record<string, string> = {
[ProxyLocation.ResidentialNZ]: "NZ",
[ProxyLocation.ResidentialPH]: "PH",
[ProxyLocation.ResidentialKR]: "KR",
+ [ProxyLocation.ResidentialSA]: "SA",
[ProxyLocation.ResidentialTR]: "TR",
[ProxyLocation.ResidentialZA]: "ZA",
};
@@ -116,6 +120,7 @@ const COUNTRY_TO_PROXY_LOCATION: Record<string, ProxyLocation> = {
NZ: ProxyLocation.ResidentialNZ,
PH: ProxyLocation.ResidentialPH,
KR: ProxyLocation.ResidentialKR,
+ SA: ProxyLocation.ResidentialSA,
TR: ProxyLocation.ResidentialTR,
ZA: ProxyLocation.ResidentialZA,
};
diff --git a/skyvern/client/types/proxy_location.py b/skyvern/client/types/proxy_location.py
index 948c70a88..2525f6d1d 100644
--- a/skyvern/client/types/proxy_location.py
+++ b/skyvern/client/types/proxy_location.py
@@ -29,6 +29,7 @@ ProxyLocation = typing.Union[
"RESIDENTIAL_NL",
"RESIDENTIAL_PH",
"RESIDENTIAL_KR",
+ "RESIDENTIAL_SA",
"RESIDENTIAL_ISP",
"NONE",
],
diff --git a/skyvern/forge/sdk/api/llm/config_registry.py b/skyvern/forge/sdk/api/llm/config_registry.py
index bc8de2a01..967791346 100644
--- a/skyvern/forge/sdk/api/llm/config_registry.py
+++ b/skyvern/forge/sdk/api/llm/config_registry.py
@@ -131,6 +131,24 @@ if settings.ENABLE_OPENAI:
reasoning_effort=settings.GPT5_REASONING_EFFORT,
),
)
+ LLMConfigRegistry.register_config(
+ "OPENAI_GPT5_NANO_FLEX",
+ LLMConfig(
+ "gpt-5-nano-2025-08-07",
+ ["OPENAI_API_KEY"],
+ supports_vision=True,
+ add_assistant_prefix=False,
+ max_completion_tokens=128000,
+ temperature=1, # GPT-5 only supports temperature=1
+ reasoning_effort=settings.GPT5_REASONING_EFFORT,
+ litellm_params=LiteLLMParams(
+ api_key=settings.OPENAI_API_KEY,
+ model_info={"model_name": "gpt-5-nano-2025-08-07"},
+ service_tier="flex",
+ timeout=900.0,
+ ),
+ ),
+ )
LLMConfigRegistry.register_config(
"OPENAI_GPT5_1",
LLMConfig(
@@ -167,6 +185,36 @@ if settings.ENABLE_OPENAI:
reasoning_effort=settings.GPT5_REASONING_EFFORT,
),
)
+ LLMConfigRegistry.register_config(
+ "OPENAI_GPT5_4_NANO",
+ LLMConfig(
+ "gpt-5.4-nano",
+ ["OPENAI_API_KEY"],
+ supports_vision=True,
+ add_assistant_prefix=False,
+ max_completion_tokens=128000,
+ temperature=1, # GPT-5 only supports temperature=1
+ reasoning_effort=settings.GPT5_REASONING_EFFORT,
+ ),
+ )
+ LLMConfigRegistry.register_config(
+ "OPENAI_GPT5_4_NANO_FLEX",
+ LLMConfig(
+ "gpt-5.4-nano",
+ ["OPENAI_API_KEY"],
+ supports_vision=True,
+ add_assistant_prefix=False,
+ max_completion_tokens=128000,
+ temperature=1, # GPT-5 only supports temperature=1
+ reasoning_effort=settings.GPT5_REASONING_EFFORT,
+ litellm_params=LiteLLMParams(
+ api_key=settings.OPENAI_API_KEY,
+ model_info={"model_name": "gpt-5.4-nano"},
+ service_tier="flex",
+ timeout=900.0,
+ ),
+ ),
+ )
LLMConfigRegistry.register_config(
"OPENAI_GPT4_TURBO",
LLMConfig(
@@ -1609,7 +1657,7 @@ if settings.ENABLE_VERTEX_AI:
},
vertex_credentials=settings.VERTEX_CREDENTIALS,
service_tier="SERVICE_TIER_FLEX",
- extra_headers={"X-Vertex-AI-LLM-Shared-Request-Type": "flex"},
+ extra_headers={"X-Vertex-AI-LLM-Shared-Request-Type": "flex", "X-Vertex-AI-LLM-Request-Type": "shared"},
timeout=900.0, # Vertex flex best-effort SLA upper bound (15 min)
),
),
@@ -1631,7 +1679,7 @@ if settings.ENABLE_VERTEX_AI:
},
vertex_credentials=settings.VERTEX_CREDENTIALS,
service_tier="SERVICE_TIER_FLEX",
- extra_headers={"X-Vertex-AI-LLM-Shared-Request-Type": "flex"},
+ extra_headers={"X-Vertex-AI-LLM-Shared-Request-Type": "flex", "X-Vertex-AI-LLM-Request-Type": "shared"},
timeout=900.0, # Vertex flex best-effort SLA upper bound (15 min)
),
),
@@ -1653,7 +1701,7 @@ if settings.ENABLE_VERTEX_AI:
},
vertex_credentials=settings.VERTEX_CREDENTIALS,
service_tier="SERVICE_TIER_FLEX",
- extra_headers={"X-Vertex-AI-LLM-Shared-Request-Type": "flex"},
+ extra_headers={"X-Vertex-AI-LLM-Shared-Request-Type": "flex", "X-Vertex-AI-LLM-Request-Type": "shared"},
timeout=900.0, # Vertex flex best-effort SLA upper bound (15 min)
),
),
@@ -1673,7 +1721,7 @@ if settings.ENABLE_VERTEX_AI:
thinking_level="medium" if settings.GEMINI_INCLUDE_THOUGHT else "minimal",
vertex_credentials=settings.VERTEX_CREDENTIALS,
service_tier="SERVICE_TIER_FLEX",
- extra_headers={"X-Vertex-AI-LLM-Shared-Request-Type": "flex"},
+ extra_headers={"X-Vertex-AI-LLM-Shared-Request-Type": "flex", "X-Vertex-AI-LLM-Request-Type": "shared"},
timeout=900.0,
),
),
@@ -1692,7 +1740,7 @@ if settings.ENABLE_VERTEX_AI:
thinking_level="medium" if settings.GEMINI_INCLUDE_THOUGHT else "minimal",
vertex_credentials=settings.VERTEX_CREDENTIALS,
service_tier="SERVICE_TIER_FLEX",
- extra_headers={"X-Vertex-AI-LLM-Shared-Request-Type": "flex"},
+ extra_headers={"X-Vertex-AI-LLM-Shared-Request-Type": "flex", "X-Vertex-AI-LLM-Request-Type": "shared"},
timeout=900.0,
),
),
@@ -1711,7 +1759,7 @@ if settings.ENABLE_VERTEX_AI:
thinking_level="medium" if settings.GEMINI_INCLUDE_THOUGHT else "minimal",
vertex_credentials=settings.VERTEX_CREDENTIALS,
service_tier="SERVICE_TIER_FLEX",
- extra_headers={"X-Vertex-AI-LLM-Shared-Request-Type": "flex"},
+ extra_headers={"X-Vertex-AI-LLM-Shared-Request-Type": "flex", "X-Vertex-AI-LLM-Request-Type": "shared"},
timeout=900.0,
),
),
diff --git a/skyvern/schemas/docs/doc_strings.py b/skyvern/schemas/docs/doc_strings.py
index 6fb8e1dfc..0e3fd61f3 100644
--- a/skyvern/schemas/docs/doc_strings.py
+++ b/skyvern/schemas/docs/doc_strings.py
@@ -25,6 +25,7 @@ Available geotargeting options:
- RESIDENTIAL_NZ: New Zealand
- RESIDENTIAL_PH: Philippines
- RESIDENTIAL_KR: South Korea
+- RESIDENTIAL_SA: Saudi Arabia
- RESIDENTIAL_ZA: South Africa
- RESIDENTIAL_AR: Argentina
- RESIDENTIAL_AU: Australia
diff --git a/skyvern/schemas/runs.py b/skyvern/schemas/runs.py
index 6b61b2d41..4aa1bffae 100644
--- a/skyvern/schemas/runs.py
+++ b/skyvern/schemas/runs.py
@@ -60,6 +60,7 @@ class ProxyLocation(StrEnum):
RESIDENTIAL_NL = "RESIDENTIAL_NL"
RESIDENTIAL_PH = "RESIDENTIAL_PH"
RESIDENTIAL_KR = "RESIDENTIAL_KR"
+ RESIDENTIAL_SA = "RESIDENTIAL_SA"
RESIDENTIAL_ISP = "RESIDENTIAL_ISP"
NONE = "NONE"
@@ -100,6 +101,7 @@ class ProxyLocation(StrEnum):
cls.RESIDENTIAL_NL,
cls.RESIDENTIAL_PH,
cls.RESIDENTIAL_KR,
+ cls.RESIDENTIAL_SA,
}
@staticmethod
@@ -125,6 +127,7 @@ class ProxyLocation(StrEnum):
ProxyLocation.RESIDENTIAL_NL: 2000,
ProxyLocation.RESIDENTIAL_PH: 2000,
ProxyLocation.RESIDENTIAL_KR: 2000,
+ ProxyLocation.RESIDENTIAL_SA: 2000,
}
return counts.get(proxy_location, 10000)
@@ -151,6 +154,7 @@ class ProxyLocation(StrEnum):
ProxyLocation.RESIDENTIAL_NL: "NL",
ProxyLocation.RESIDENTIAL_PH: "PH",
ProxyLocation.RESIDENTIAL_KR: "KR",
+ ProxyLocation.RESIDENTIAL_SA: "SA",
}
return mapping.get(proxy_location, "US")
@@ -176,6 +180,7 @@ SUPPORTED_GEO_COUNTRIES = frozenset(
"NZ",
"PH",
"KR",
+ "SA",
"TR",
"ZA",
}
@@ -324,6 +329,9 @@ def get_tzinfo_from_proxy(proxy_location: ProxyLocation) -> ZoneInfo | None:
if proxy_location == ProxyLocation.RESIDENTIAL_KR:
return ZoneInfo("Asia/Seoul")
+ if proxy_location == ProxyLocation.RESIDENTIAL_SA:
+ return ZoneInfo("Asia/Riyadh")
+
if proxy_location == ProxyLocation.RESIDENTIAL_ISP:
return ZoneInfo("America/New_York")