Before you start
The same Calculator agent from Track 1 runs on a hosted provider. Provider,
model, and API key all live in .env so switching providers is a config change,
not a code change.
1. Configure
Copy the template and fill in your key:
cp .env.example .env.env sets which provider and model to use, plus the matching API key:
LLM_PROVIDER=fireworks
LLM_MODEL=accounts/fireworks/models/gpt-oss-120b
FIREWORKS_API_KEY=fw_...main.py reads all three from the environment. The calculator.py agent and
its primitives are unchanged from Track 1.
2. Run it
uv run main.pyOutput:
533. Switch providers
Edit .env. To use OpenAI instead of Fireworks:
- LLM_PROVIDER=fireworks
- LLM_MODEL=accounts/fireworks/models/gpt-oss-120b
+ LLM_PROVIDER=openai
+ LLM_MODEL=gpt-4.1-nano| Provider | LLM_PROVIDER | Example LLM_MODEL | Key env var |
|---|---|---|---|
| OpenAI | openai | gpt-4.1-nano | OPENAI_API_KEY |
| Anthropic | anthropic | claude-haiku-4-5 | ANTHROPIC_API_KEY |
| Groq | groq | llama-3.3-70b-versatile | GROQ_API_KEY |
| Fireworks | fireworks | accounts/fireworks/models/gpt-oss-120b | FIREWORKS_API_KEY |
Model names change over time, so check the provider's own docs for current options.
Takeaway
Local or cloud, Fireworks or OpenAI, the choice is configuration. Your primitives, plan logic, and task stay put.