Skip to content

Commit

Permalink
add azure o3 mini (#1711)
Browse files Browse the repository at this point in the history
  • Loading branch information
wintonzheng authored Feb 4, 2025
1 parent f0b274d commit 4bdc32c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
7 changes: 7 additions & 0 deletions skyvern/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ class Settings(BaseSettings):
ENABLE_ANTHROPIC: bool = False
ENABLE_AZURE: bool = False
ENABLE_AZURE_GPT4O_MINI: bool = False
ENABLE_AZURE_O3_MINI: bool = False
ENABLE_BEDROCK: bool = False
ENABLE_GEMINI: bool = False
# OPENAI
Expand All @@ -121,6 +122,12 @@ class Settings(BaseSettings):
AZURE_GPT4O_MINI_API_BASE: str | None = None
AZURE_GPT4O_MINI_API_VERSION: str | None = None

# AZURE o3 mini
AZURE_O3_MINI_DEPLOYMENT: str | None = None
AZURE_O3_MINI_API_KEY: str | None = None
AZURE_O3_MINI_API_BASE: str | None = None
AZURE_O3_MINI_API_VERSION: str | None = None

# GEMINI
GEMINI_API_KEY: str | None = None

Expand Down
25 changes: 25 additions & 0 deletions skyvern/forge/sdk/api/llm/config_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,31 @@ def get_config(cls, llm_key: str) -> LLMRouterConfig | LLMConfig:
),
)

if settings.ENABLE_AZURE_O3_MINI:
LLMConfigRegistry.register_config(
"AZURE_OPENAI_O3_MINI",
LLMConfig(
f"azure/{settings.AZURE_O3_MINI_DEPLOYMENT}",
[
"AZURE_O3_MINI_DEPLOYMENT",
"AZURE_O3_MINI_API_KEY",
"AZURE_O3_MINI_API_BASE",
"AZURE_O3_MINI_API_VERSION",
],
litellm_params=LiteLLMParams(
api_base=settings.AZURE_O3_MINI_API_BASE,
api_key=settings.AZURE_O3_MINI_API_KEY,
api_version=settings.AZURE_O3_MINI_API_VERSION,
model_info={"model_name": "azure/o3-mini"},
),
supports_vision=False,
add_assistant_prefix=False,
max_completion_tokens=16384,
temperature=None, # Temperature isn't supported in the O-model series
reasoning_effort="low",
),
)

if settings.ENABLE_GEMINI:
LLMConfigRegistry.register_config(
"GEMINI_PRO",
Expand Down

0 comments on commit 4bdc32c

Please sign in to comment.