fix the code execution test in sdk tests (#794)

# What does this PR do?

remove hardcoded model id for the code execution tests


Tests:

LLAMA_STACK_CONFIG="/Users/dineshyv/.llama/distributions/llamastack-fireworks/fireworks-run.yaml"
pytest -v tests/client-sdk/agents/test_agents.py -k
"test_code_execution"
This commit is contained in:
Dinesh Yeduguru 2025-01-16 16:42:25 -08:00 committed by GitHub
parent 35bf6ea75a
commit e88faa91e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -206,18 +206,13 @@ def test_builtin_tool_code_execution(llama_stack_client, agent_config):
assert "Tool:code_interpreter Response" in logs_str assert "Tool:code_interpreter Response" in logs_str
def test_code_execution(llama_stack_client): def test_code_execution(llama_stack_client, agent_config):
agent_config = AgentConfig( agent_config = {
model="meta-llama/Llama-3.1-8B-Instruct", **agent_config,
instructions="You are a helpful assistant", "toolgroups": [
toolgroups=[
"builtin::code_interpreter", "builtin::code_interpreter",
], ],
tool_choice="required", }
input_shields=[],
output_shields=[],
enable_session_persistence=False,
)
codex_agent = Agent(llama_stack_client, agent_config) codex_agent = Agent(llama_stack_client, agent_config)
session_id = codex_agent.create_session("test-session") session_id = codex_agent.create_session("test-session")