Skip to content

Commit 4966452

Browse files
authored
add workflow for cerebras (#3142)
## Summary Describe key changes, mention related issues or motivation for the changes. (If applicable, issue number: #____) ## Type of change - [ ] Bug fix - [ ] New feature - [ ] Breaking change - [ ] Improvement - [ ] Model update - [ ] Other: --- ## Checklist - [ ] Code complies with style guidelines - [ ] Ran format/validation scripts (`./scripts/format.sh` and `./scripts/validate.sh`) - [ ] Self-review completed - [ ] Documentation updated (comments, docstrings) - [ ] Examples and guides: Relevant cookbook examples have been included or updated (if applicable) - [ ] Tested in clean environment - [ ] Tests added/updated (if applicable) --- ## Additional Notes Add any important context (deployment instructions, screenshots, security considerations, etc.)
1 parent 214cb05 commit 4966452

File tree

2 files changed

+35
-6
lines changed

2 files changed

+35
-6
lines changed

.github/workflows/test_on_release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,35 @@ jobs:
528528
source .venv/bin/activate
529529
python -m pytest ./libs/agno/tests/integration/models/ibm/watsonx
530530
531+
# Run tests for Cerebras
532+
test-cerebras:
533+
runs-on: ubuntu-latest
534+
strategy:
535+
matrix:
536+
python-version: ["3.12"]
537+
fail-fast: true # Stop all matrix jobs if one fails
538+
env:
539+
CEREBRAS_API_KEY: ${{ secrets.CEREBRAS_API_KEY }}
540+
steps:
541+
- uses: actions/checkout@v3
542+
- name: Set up Python ${{ matrix.python-version }}
543+
uses: actions/setup-python@v4
544+
with:
545+
python-version: ${{ matrix.python-version }}
546+
- name: Install uv
547+
run: |
548+
curl -LsSf https://astral.sh/uv/install.sh | sh
549+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
550+
- name: Run dev setup
551+
working-directory: .
552+
run: |
553+
./scripts/dev_setup.sh
554+
- name: Run Cerebras tests
555+
working-directory: .
556+
run: |
557+
source .venv/bin/activate
558+
python -m pytest ./libs/agno/tests/integration/models/cerebras
559+
531560
test-deepinfra:
532561
runs-on: ubuntu-latest
533562
strategy:

libs/agno/tests/integration/models/cerebras/test_tool_use.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
from agno.agent import Agent, RunResponse # noqa
44
from agno.models.cerebras import Cerebras
5-
from agno.tools.googlesearch import GoogleSearchTools
5+
from agno.tools.duckduckgo import DuckDuckGoTools
66

77

88
def test_tool_use():
99
agent = Agent(
1010
model=Cerebras(id="llama-4-scout-17b-16e-instruct"),
11-
tools=[GoogleSearchTools(cache_results=True)],
11+
tools=[DuckDuckGoTools(cache_results=True)],
1212
show_tool_calls=True,
1313
telemetry=False,
1414
monitoring=False,
@@ -25,7 +25,7 @@ def test_tool_use():
2525
def test_tool_use_stream():
2626
agent = Agent(
2727
model=Cerebras(id="llama-4-scout-17b-16e-instruct"),
28-
tools=[GoogleSearchTools(cache_results=True)],
28+
tools=[DuckDuckGoTools(cache_results=True)],
2929
show_tool_calls=True,
3030
telemetry=False,
3131
monitoring=False,
@@ -52,7 +52,7 @@ def test_tool_use_stream():
5252
async def test_async_tool_use():
5353
agent = Agent(
5454
model=Cerebras(id="llama-4-scout-17b-16e-instruct"),
55-
tools=[GoogleSearchTools(cache_results=True)],
55+
tools=[DuckDuckGoTools(cache_results=True)],
5656
show_tool_calls=True,
5757
telemetry=False,
5858
monitoring=False,
@@ -70,7 +70,7 @@ async def test_async_tool_use():
7070
async def test_async_tool_use_stream():
7171
agent = Agent(
7272
model=Cerebras(id="llama-4-scout-17b-16e-instruct"),
73-
tools=[GoogleSearchTools(cache_results=True)],
73+
tools=[DuckDuckGoTools(cache_results=True)],
7474
show_tool_calls=True,
7575
telemetry=False,
7676
monitoring=False,
@@ -96,7 +96,7 @@ async def test_async_tool_use_stream():
9696
def test_tool_use_with_content():
9797
agent = Agent(
9898
model=Cerebras(id="llama-4-scout-17b-16e-instruct"),
99-
tools=[GoogleSearchTools(cache_results=True)],
99+
tools=[DuckDuckGoTools(cache_results=True)],
100100
show_tool_calls=True,
101101
telemetry=False,
102102
monitoring=False,

0 commit comments

Comments
 (0)