Use TeamoRouter with TradingAgents
TradingAgents is TauricResearch's open-source multi-agent research framework. It can use any OpenAI-compatible server as its model source: point it at TeamoRouter, add your TeamoRouter API key, and run analyses on GPT, Claude and other models with one key and one balance.
Checked on 2026-11-25 against the docs and source of the current TradingAgents release (1.0, the single-binary CLI). Market data still comes from TradingAgents' own data sources. Only model requests go through TeamoRouter.
New accounts start with a $0 balance — top up before your first request. Top up from $5 with a card, Alipay or WeChat Pay, or USDT. If a request returns 402 (400 on the OpenAI format) with "wallet balance is insufficient", your balance is empty — your base URL and key are fine. Top up and retry.
1. Before you start
- Create an API key in the TeamoRouter console.
- Install TradingAgents (macOS or Linux):
curl -fsSL https://tauric.ai/tradingagents/install.sh | sh
# or with npm
npm i -g @tauric/tradingagents
2. Config file (recommended)
Edit ~/.tauric/tradingagents/config.json:
{
"model": "openai-compatible/gpt-6.1-sol",
"providers": {
"openai-compatible": {
"baseURL": "https://api.teamorouter.com/v1",
"contextWindow": 200000
}
}
}
Then store the key. Paste it at the hidden prompt. It is kept in credentials.json on your machine and only sent to the address above:
tradingagents key model
Start tradingagents and ask a question, or run one question and exit:
tradingagents -p "Full analysis of AAPL"
- Write
modelasopenai-compatible/<TeamoRouter model ID>. Use--model openai-compatible/claude-sonnet-5-5for a single run, or/modelinside a session. - Keep
/v1at the end ofbaseURL. Don't append/chat/completions. contextWindow: TradingAgents keeps each request within this window by eliding older tool results. 200000 keeps request size and cost in check. Raise it if you want the agent to read more material at once.
3. Environment variables (scripts and CI)
export TRADINGAGENTS_BASE_URL=https://api.teamorouter.com/v1
export TRADINGAGENTS_MODEL=gpt-6.1-sol
export TRADINGAGENTS_MODEL_API_KEY=sk-teamo-xxxxxx
tradingagents -p "Full analysis of AAPL"
With TRADINGAGENTS_BASE_URL set, TRADINGAGENTS_MODEL takes the plain TeamoRouter model ID, without the openai-compatible/ prefix. Precedence: command line, then environment, then config.json.
4. Which model for which job
| Job | Model ID | Official price (input / output per 1M tokens) |
|---|---|---|
| Main model: research, tool calls, reports | gpt-6.1-sol |
$2 / $10 |
| Claude as the main model | claude-sonnet-5-5 |
$2 / $10 |
| Hardest analysis | claude-opus-5-5 |
$4 / $20 |
| Cheap quick questions | gpt-6-luna |
$0.1 / $0.5 |
These are the vendors' official list prices. TeamoRouter's current prices are in the model list. This route uses the OpenAI-compatible format (/v1/chat/completions). On that format, Claude doesn't get prompt caching automatically, so long sessions cost more than on the native protocol. If cost matters, use a GPT model as the main model.
5. Common errors
| What you see | Cause | Fix |
|---|---|---|
| 401, API key incomplete | Key copied with missing characters | Copy the full sk-teamo- key and run tradingagents key model again |
| 402 (400 on the OpenAI format), wallet balance is insufficient | Balance is $0 | Top up, from $5 |
OPENAI_BASE_URL or ANTHROPIC_BASE_URL is set, but requests still go to the vendor and the key is rejected |
TradingAgents' built-in OpenAI, Anthropic and other providers use fixed addresses and ignore *_BASE_URL |
Use openai-compatible (section 2 or 3) |
| Model not found | Typo in the model ID, or the wrong prefix | config.json takes openai-compatible/<ID>; environment variables take the plain ID. Check IDs in the model list |
| An HTML page or 405 instead of a model reply | Base URL missing /v1 |
Use https://api.teamorouter.com/v1 |