Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
add support for gpt 5.1 (#4197)
Shuchang Zheng43e89d2991fc
diff --git a/skyvern/config.py b/skyvern/config.pyindex 956f3f8c7..341c76c33 100644--- a/skyvern/config.py+++ b/skyvern/config.py@@ -281,6 +281,13 @@ class Settings(BaseSettings):AZURE_GPT5_NANO_API_BASE: str | None = NoneAZURE_GPT5_NANO_API_VERSION: str = "2025-04-01-preview"+ # AZURE gpt-5.1+ ENABLE_AZURE_GPT5_1: bool = False+ AZURE_GPT5_1_DEPLOYMENT: str = "gpt-5.1"+ AZURE_GPT5_1_API_KEY: str | None = None+ AZURE_GPT5_1_API_BASE: str | None = None+ AZURE_GPT5_1_API_VERSION: str = "2025-04-01-preview"+# GEMINIGEMINI_API_KEY: str | None = NoneGEMINI_INCLUDE_THOUGHT: bool = Falsediff --git a/skyvern/forge/sdk/api/llm/config_registry.py b/skyvern/forge/sdk/api/llm/config_registry.pyindex b820105d3..f710b45ea 100644--- a/skyvern/forge/sdk/api/llm/config_registry.py+++ b/skyvern/forge/sdk/api/llm/config_registry.py@@ -108,6 +108,18 @@ if settings.ENABLE_OPENAI:reasoning_effort=settings.GPT5_REASONING_EFFORT,),)+ LLMConfigRegistry.register_config(+ "OPENAI_GPT5_1",+ LLMConfig(+ "gpt-5.1",+ ["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_GPT4_TURBO",LLMConfig(@@ -661,6 +673,31 @@ if settings.ENABLE_AZURE_GPT5_NANO:),)+if settings.ENABLE_AZURE_GPT5_1:+ LLMConfigRegistry.register_config(+ "AZURE_OPENAI_GPT5_1",+ LLMConfig(+ f"azure/{settings.AZURE_GPT5_1_DEPLOYMENT}",+ [+ "AZURE_GPT5_1_DEPLOYMENT",+ "AZURE_GPT5_1_API_KEY",+ "AZURE_GPT5_1_API_BASE",+ "AZURE_GPT5_1_API_VERSION",+ ],+ litellm_params=LiteLLMParams(+ api_base=settings.AZURE_GPT5_1_API_BASE,+ api_key=settings.AZURE_GPT5_1_API_KEY,+ api_version=settings.AZURE_GPT5_1_API_VERSION,+ model_info={"model_name": "azure/gpt-5.1"},+ ),+ 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,+ ),+ )+if settings.ENABLE_AZURE_O4_MINI:LLMConfigRegistry.register_config("AZURE_OPENAI_O4_MINI",