Use TeamoRouter with daily_stock_analysis
daily_stock_analysis calls models through LiteLLM, and the project recommends its "Channels" config for model providers. TeamoRouter is OpenAI-compatible, so one channel gives you DeepSeek, GPT, Claude, Gemini and other models for the daily reports and stock Q&A, with one key and one balance.
Checked on 2026-11-25 against the project's docs/llm-providers.md, .env.example and daily analysis workflow on the main branch.
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 the connection test or a report says the balance is insufficient (insufficient_balance, or a 402 / 400 "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.
2. Local or Docker: .env
LLM_CHANNELS=teamorouter
LLM_TEAMOROUTER_PROTOCOL=openai
LLM_TEAMOROUTER_BASE_URL=https://api.teamorouter.com/v1
LLM_TEAMOROUTER_API_KEY=sk-teamo-xxxxxx
LLM_TEAMOROUTER_MODELS=deepseek-v4-flash,gpt-6.1-sol,claude-sonnet-5-5
LITELLM_MODEL=openai/deepseek-v4-flash
LITELLM_FALLBACK_MODELS=openai/gpt-6.1-sol
AGENT_LITELLM_MODEL=openai/gpt-6.1-sol
teamorouteris a channel name you choose. The variable prefix follows it in upper case:LLM_TEAMOROUTER_*.- The base URL ends at
/v1. Don't append/chat/completions. The API surface defaults tochat_completions, which is what you want. LLM_TEAMOROUTER_MODELStakes plain model IDs. The runtime model namesLITELLM_MODEL(main),LITELLM_FALLBACK_MODELS(fallback) andAGENT_LITELLM_MODEL(the stock Q&A agent) need theopenai/prefix.- Don't set
LITELLM_CONFIGat the same time. It takes priority, and Channels stop applying.
3. Web settings page
- Open AI 模型配置 (AI model settings) and pick the OpenAI preset under 快速添加渠道 (quick add channel).
- Change the address to
https://api.teamorouter.com/v1, paste your TeamoRouter API key and click 获取模型 (fetch models). - Pick the main model, the agent model and fallbacks, then save.
- Click 测试连接 (test connection) to confirm the key, model names and balance.
The settings page saves the same Channels config as the .env in section 2.
4. GitHub Actions
The bundled daily analysis workflow only passes through the variables it lists, so variables for a custom channel name such as teamorouter never reach the job. The simplest fix is to name the channel openai, which the workflow already passes through, and point it at TeamoRouter:
| Name | Where | Value |
|---|---|---|
LLM_CHANNELS |
Variables | openai |
LLM_OPENAI_PROTOCOL |
Variables | openai |
LLM_OPENAI_BASE_URL |
Variables | https://api.teamorouter.com/v1 |
LLM_OPENAI_MODELS |
Variables | deepseek-v4-flash,gpt-6.1-sol |
LITELLM_MODEL |
Variables | openai/deepseek-v4-flash |
LLM_OPENAI_API_KEY |
Secrets | your sk-teamo- key |
The key must be a repository secret. The workflow doesn't read a variable with the same name.
5. Which model for which job
| Job | Model ID | Official price (input / output per 1M tokens) |
|---|---|---|
| Main model for daily reports (many stocks, frequent runs) | deepseek-v4-flash |
$0.44 / $1.32 |
| Fallback and the stock Q&A agent | gpt-6.1-sol |
$2 / $10 |
| More detailed analysis writing | claude-sonnet-5-5 |
$2 / $10 |
| Cheapest | gpt-6-luna |
$0.1 / $0.5 |
These are the vendors' official list prices. TeamoRouter's current prices are in the model list. All models here go through the OpenAI-compatible format. Claude doesn't get prompt caching automatically on that format, which matters little for one-shot daily reports.
6. Common errors
The details.reason values shown by the connection test and in reports:
| What you see | Cause | Fix |
|---|---|---|
api_key_rejected (401) |
Key copied with missing characters, or the wrong key | Copy the full sk-teamo- key again |
insufficient_balance, or 402 / 400 wallet balance is insufficient |
Balance is $0 | Top up, from $5 |
provider_prefix_mismatch |
Runtime model name without the openai/ prefix |
LITELLM_MODEL=openai/<model ID> |
endpoint_not_found / non_json |
Base URL missing /v1, or /chat/completions appended |
Use exactly https://api.teamorouter.com/v1 |
model_access_denied, or model not found |
Typo in the model ID | Click 获取模型 (fetch models) to check, or see the model list |
| Works locally, but Actions says no model is configured | The workflow doesn't pass through a custom channel's variables | Name the channel openai as in section 4 |