Skip to content

Commit e28c5cf

Browse files
committed
fix: llm mapping
1 parent c4d7e37 commit e28c5cf

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

packages/uipath-openai-agents/samples/rag-assistant/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ class Output(BaseModel):
3232

3333

3434
# Define the assistant agent
35+
# Model defaults to gpt-4.1 which automatically maps to gpt-4o-2024-11-20
3536
assistant_agent = Agent(
3637
name="assistant_agent",
37-
model="gpt-4o-2024-11-20", # Use specific version supported by UiPath LLM Gateway
3838
instructions="""You are a helpful AI assistant that provides clear, concise answers.
3939
4040
Your capabilities:

packages/uipath-openai-agents/src/uipath_openai_agents/chat/supported_models.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,14 @@ class OpenAIModels:
5454

5555
# Model aliases - maps generic names to specific versions
5656
MODEL_ALIASES = {
57-
"gpt-4.1": gpt_4_1_2025_04_14,
58-
"gpt-4.1-mini": gpt_4_1_mini_2025_04_14,
59-
"gpt-4.1-nano": gpt_4_1_nano_2025_04_14,
57+
# Map gpt-4.1 variants to gpt-4o (most capable available model)
58+
"gpt-4.1": gpt_4o_2024_11_20,
59+
"gpt-4.1-mini": gpt_4o_mini_2024_07_18,
60+
"gpt-4.1-nano": gpt_4o_mini_2024_07_18,
61+
"gpt-4.1-2025-04-14": gpt_4o_2024_11_20, # Map invalid model to valid one
62+
"gpt-4.1-mini-2025-04-14": gpt_4o_mini_2024_07_18,
63+
"gpt-4.1-nano-2025-04-14": gpt_4o_mini_2024_07_18,
64+
# Generic model mappings
6065
"gpt-4o": gpt_4o_2024_11_20,
6166
"gpt-4o-mini": gpt_4o_mini_2024_07_18,
6267
"gpt-5": gpt_5_2025_08_07,

packages/uipath-openai-agents/testcases/triage-agent/src/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Integration testcase for the triage/routing pattern.
33
The triage agent receives a message and hands off to the appropriate
44
agent based on the language of the request.
5+
56
"""
67

78
import dotenv
@@ -10,6 +11,7 @@
1011
dotenv.load_dotenv()
1112

1213
# Define specialized agents for different languages
14+
# No need to specify model - defaults to gpt-4.1 which maps to gpt-4o-2024-11-20
1315
french_agent = Agent(
1416
name="french_agent",
1517
instructions="You only speak French",

0 commit comments

Comments
 (0)