Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
42f9567
Test to dev sync (#678)
ahmetgunduz Sep 11, 2025
60dc8e0
fix evolver tests (#679)
ahmetgunduz Sep 11, 2025
1661a1d
MCP Deploy Error (#682)
ahmetgunduz Sep 11, 2025
ed6f766
fix: Centralize API key validation and fix misleading error messages …
ahmetgunduz Sep 19, 2025
c63fa52
normalized expected output from basemodel (#685)
xainaz Sep 24, 2025
171ab48
Add trace_request parameter (#686)
elsheikhams99 Sep 25, 2025
232f5a9
Merge branch 'test' into development
ahmetgunduz Sep 25, 2025
3eff28d
Update pyproject.toml (#689)
ahmetgunduz Sep 26, 2025
cbbd6af
added response format to model run (#692)
xainaz Oct 7, 2025
8cd8961
agent func test fix (#690)
xainaz Oct 8, 2025
d28721d
fixed conflict (#697)
xainaz Oct 10, 2025
aaad1bc
changed to literal text (#700)
xainaz Oct 15, 2025
b67134f
Fix issubclass() TypeError and make temperature/top_p optional (#705)
ahmetgunduz Oct 22, 2025
ed14372
PROD-1954-added inspector in build agent (#704)
xainaz Oct 22, 2025
6a139a0
Merge branch 'test' into development
ikxplain Oct 23, 2025
5a19883
Eng 2559 default inspector tests (#706)
xainaz Oct 23, 2025
74d8920
Prod 1970 streaming progress (#701)
ahmetgunduz Oct 23, 2025
48fc611
PROD-2008-Modify-agents-warning-message (#707)
ahmetgunduz Oct 23, 2025
5ef8236
fixed time default values (#708)
ahmetgunduz Oct 24, 2025
707c79c
feat: automate docs generation.
ikxplain Oct 28, 2025
a50d7ff
feat: automate docs generation.
ikxplain Oct 28, 2025
c07aff2
feat: automate docs generation. (#710)
ikxplain Oct 28, 2025
fb4bdb4
feat: automate docs generation.
ikxplain Oct 28, 2025
7b34d5a
Update docs.yaml
ikxplain Oct 28, 2025
a3aa3f3
Move deprecated params to kwargs (#699)
elsheikhams99 Oct 30, 2025
0f995ac
propagate error (#712)
xainaz Oct 30, 2025
1e08231
Fixed non-inspector related tests (#709)
xainaz Oct 30, 2025
63001ed
fix merge conlict (#714)
ahmetgunduz Oct 30, 2025
cb839ea
Merge branch 'test' into development
ahmetgunduz Oct 30, 2025
c55a6ba
inspector changed to default none, and renamed (#716)
ahmetgunduz Oct 30, 2025
9792f28
fix tests (#717)
ahmetgunduz Oct 30, 2025
f1ff172
Merge branch 'test' into development
ahmetgunduz Oct 30, 2025
f7ce3bb
fix: Mark test_specific_model_parameters_e2e as flaky (#720)
ahmetgunduz Nov 3, 2025
34ae423
Backpropagate the thotfix (#726)
ahmetgunduz Nov 10, 2025
8f993a7
Add error handling for kwargs (#724)
elsheikhams99 Nov 10, 2025
6c90286
Merge branch 'test' into development
ikxplain Nov 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion aixplain/factories/agent_factory/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,16 @@ def create(
tools = [] if tools is None else list(tools)
workflow_tasks = [] if workflow_tasks is None else list(workflow_tasks)
from aixplain.utils.llm_utils import get_llm_instance

# Define supported kwargs
supported_kwargs = {"llm_id"}

# Validate kwargs - raise error if unsupported kwargs are provided
unsupported_kwargs = set(kwargs.keys()) - supported_kwargs
if unsupported_kwargs:
raise ValueError(
f"Unsupported keyword argument(s): {', '.join(sorted(unsupported_kwargs))}. "
f"Supported kwargs are: {', '.join(sorted(supported_kwargs))}."
)
# Extract llm_id from kwargs if present (deprecated parameter)
llm_id = kwargs.get("llm_id", None)
if llm_id is not None:
Expand Down
10 changes: 10 additions & 0 deletions aixplain/factories/team_agent_factory/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,16 @@ def create(
mentalist_llm: DEPRECATED. LLM for planning.
use_mentalist: DEPRECATED. Whether to use the mentalist agent.
"""
# Define supported kwargs
supported_kwargs = {"llm_id", "mentalist_llm", "use_mentalist"}

# Validate kwargs - raise error if unsupported kwargs are provided
unsupported_kwargs = set(kwargs.keys()) - supported_kwargs
if unsupported_kwargs:
raise ValueError(
f"Unsupported keyword argument(s): {', '.join(sorted(unsupported_kwargs))}. "
f"Supported kwargs are: {', '.join(sorted(supported_kwargs))}."
)
# Handle deprecated parameters from kwargs
if "llm_id" in kwargs:
llm_id = kwargs.pop("llm_id")
Expand Down
13 changes: 12 additions & 1 deletion aixplain/modules/agent/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,18 @@ def run(
Dict: parsed output from model
"""
start = time.time()


# Define supported kwargs
supported_kwargs = {"output_format", "expected_output"}

# Validate kwargs - raise error if unsupported kwargs are provided
unsupported_kwargs = set(kwargs.keys()) - supported_kwargs
if unsupported_kwargs:
raise ValueError(
f"Unsupported keyword argument(s): {', '.join(sorted(unsupported_kwargs))}. "
f"Supported kwargs are: {', '.join(sorted(supported_kwargs))}."
)

# Extract deprecated parameters from kwargs
output_format = kwargs.get("output_format", None)
expected_output = kwargs.get("expected_output", None)
Expand Down
10 changes: 10 additions & 0 deletions aixplain/modules/team_agent/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,16 @@ def __init__(
mentalist_llm (Optional[LLM], optional): DEPRECATED. Mentalist/Planner LLM instance. Defaults to None.
use_mentalist (bool, optional): DEPRECATED. Whether to use mentalist/planner. Defaults to True.
"""
# Define supported kwargs
supported_kwargs = {"llm_id", "mentalist_llm", "use_mentalist"}

# Validate kwargs - raise error if unsupported kwargs are provided
unsupported_kwargs = set(additional_info.keys()) - supported_kwargs
if unsupported_kwargs:
raise ValueError(
f"Unsupported keyword argument(s): {', '.join(sorted(unsupported_kwargs))}. "
f"Supported kwargs are: {', '.join(sorted(supported_kwargs))}."
)
# Handle deprecated parameters from kwargs
if "llm_id" in additional_info:
llm_id = additional_info.pop("llm_id")
Expand Down
12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ classifiers = [
"Topic :: Software Development :: Libraries",
]
dependencies = [
"requests>=2.1.0",
"tqdm>=4.1.0",
"requests>=2.1.0",
"tqdm>=4.1.0",
"pandas>=2.0.0",
"python-dotenv>=1.0.0",
"validators>=0.20.0",
"python-dotenv>=1.0.0",
"validators>=0.20.0",
"filetype>=1.2.0",
"click>=7.1.2",
"PyYAML>=6.0.1",
Expand All @@ -72,6 +72,6 @@ test = [
"pytest>=6.1.0",
"docker>=6.1.3",
"requests-mock>=1.11.0",
"pytest-mock>=3.10.0"
"pytest-mock>=3.10.0",
"pytest-rerunfailures>=16.0"
]

3 changes: 3 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ select = ["D"]
ignore = []
extend-safe-fixes = []

[lint.per-file-ignores]
"tests/**/*.py" = ["D"]

[lint.isort]
known-first-party = ["src"]

Expand Down
26 changes: 19 additions & 7 deletions tests/functional/agent/agent_functional_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def run_input_map(request):
@pytest.fixture(scope="function")
def delete_agents_and_team_agents():
from tests.test_deletion_utils import safe_delete_all_agents_and_team_agents

# Clean up before test
safe_delete_all_agents_and_team_agents()

Expand All @@ -74,7 +74,9 @@ def test_end2end(run_input_map, delete_agents_and_team_agents, AgentFactory):
tools.append(AgentFactory.create_model_tool(**tool_))
if "pipeline_tools" in run_input_map:
for tool in run_input_map["pipeline_tools"]:
tools.append(AgentFactory.create_pipeline_tool(pipeline=tool["pipeline_id"], description=tool["description"]))
tools.append(
AgentFactory.create_pipeline_tool(pipeline=tool["pipeline_id"], description=tool["description"])
)

agent = AgentFactory.create(
name=run_input_map["agent_name"],
Expand Down Expand Up @@ -106,7 +108,10 @@ def test_python_interpreter_tool(delete_agents_and_team_agents, AgentFactory):
tool = AgentFactory.create_python_interpreter_tool()
assert tool is not None
assert tool.name == "Python Interpreter"
assert tool.description == "A Python shell. Use this to execute python commands. Input should be a valid python command."
assert (
tool.description
== "A Python shell. Use this to execute python commands. Input should be a valid python command."
)

agent = AgentFactory.create(
name="Python Developer",
Expand Down Expand Up @@ -180,7 +185,9 @@ def test_update_draft_agent(run_input_map, delete_agents_and_team_agents, AgentF
tools.append(AgentFactory.create_model_tool(**tool_))
if "pipeline_tools" in run_input_map:
for tool in run_input_map["pipeline_tools"]:
tools.append(AgentFactory.create_pipeline_tool(pipeline=tool["pipeline_id"], description=tool["description"]))
tools.append(
AgentFactory.create_pipeline_tool(pipeline=tool["pipeline_id"], description=tool["description"])
)

agent = AgentFactory.create(
name=run_input_map["agent_name"],
Expand Down Expand Up @@ -267,7 +274,9 @@ def test_update_tools_of_agent(run_input_map, delete_agents_and_team_agents, Age

if "pipeline_tools" in run_input_map:
for tool in run_input_map["pipeline_tools"]:
tools.append(AgentFactory.create_pipeline_tool(pipeline=tool["pipeline_id"], description=tool["description"]))
tools.append(
AgentFactory.create_pipeline_tool(pipeline=tool["pipeline_id"], description=tool["description"])
)

agent.tools = tools
agent.update()
Expand All @@ -285,6 +294,7 @@ def test_update_tools_of_agent(run_input_map, delete_agents_and_team_agents, Age
agent.delete()


@pytest.mark.flaky(reruns=2, reruns_delay=2)
@pytest.mark.parametrize(
"tool_config",
[
Expand Down Expand Up @@ -342,7 +352,7 @@ def test_specific_model_parameters_e2e(tool_config, delete_agents_and_team_agent
agent = AgentFactory.create(
name="Test Parameter Agent",
instructions="Test agent with parameterized tools. You MUST use a tool for the tasks. Do not directly answer the question.",
description = "Test agent with parameterized tools",
description="Test agent with parameterized tools",
tools=[tool],
llm_id="6646261c6eb563165658bbb1", # Using LLM ID from test data
)
Expand Down Expand Up @@ -395,7 +405,9 @@ def test_sql_tool(delete_agents_and_team_agents, AgentFactory):
)
assert agent is not None

response = agent.run("Create a table called Person with the following columns: id, name, age, salary, department")
response = agent.run(
"Create a table called Person with the following columns: id, name, age, salary, department"
)
assert response is not None
assert response["completed"] is True
assert response["status"].lower() == "success"
Expand Down