| name | llm-call |
| description | Call external LLM APIs (DeepSeek, Qwen, OpenAI-compatible) from Claude Code without consuming Opus tokens. Use when user says: "use DeepSeek to translate", "summarize with a cheap model", "batch translate files", "use qwen to polish", or any request to call their own model APIs for translation, summarization, polishing, or explanation tasks. Also triggers on first use for interactive setup.
|
LLM Call
Call your own LLM APIs from Claude Code for tasks that don't need Opus.
First-time Setup
On first use, run the interactive init to configure providers:
python scripts/init.py
This creates ~/.config/llm-call/config.json with API endpoints and keys.
To view or export config:
python scripts/init.py --show
python scripts/init.py --env
python scripts/init.py --add qwen
Usage
Single call
python scripts/llm_call.py "What is RAG?"
python scripts/llm_call.py --task translate article.md
python scripts/llm_call.py -p qwen --task summarize article.md
python scripts/llm_call.py -s "You are a translator" -f article.md "Translate to Chinese"
python scripts/llm_call.py --stream "Explain transformers"
python scripts/llm_call.py --task translate article.md -o translated.md
cat article.md | python scripts/llm_call.py --task summarize
Batch processing
python scripts/llm_call.py --task translate --batch "articles/*.md" -o ./output/
Help
python scripts/llm_call.py --list-providers
python scripts/llm_call.py --list-tasks
Environment Variables
Provider config via env vars (overrides config.json):
| Variable | Description |
|---|
LLM_<PROVIDER>_BASE_URL | API base URL |
LLM_<PROVIDER>_API_KEY | API key |
LLM_<PROVIDER>_MODEL | Default model |
LLM_DEFAULT_PROVIDER | Default provider name |
Example: LLM_DEEPSEEK_BASE_URL=http://server:5001/v1
Preset Tasks
See references/tasks.md for detailed templates.
| Task | Description |
|---|
translate | EN -> CN, preserve Markdown |
translate-en | CN -> EN |
summarize | Structured summary |
polish | Chinese text polishing |
explain | Simple explanation for beginners |