
Qianwen Text
Call Qwen models for chat, coding, reasoning, and function calling through the OpenAI-compatible API from agent workflows.
Overview
Qianwen Text is an agent skill for the Build phase that generates text, runs Qwen conversations and code tasks, and performs function calling via the OpenAI-compatible Qwen API.
Install
npx skills add https://github.com/qianwen-ai/qianwen-ai --skill qianwen-textWhat is this skill?
- OpenAI-compatible chat/completions path for Qwen text models
- Supports conversation, code generation, reasoning, and function calling per SKILL.md
- Default execution via scripts/text.py with streaming request handling
- Explicit DO NOT TRIGGER rules for non-Qwen models and for vision/generation siblings
- Agent compatibility notes for Cursor auto-load and Claude Code manual SKILL.md read
- Requires Python 3.9+ and curl per compatibility frontmatter
Adoption & trust: 1k installs on skills.sh; 28 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your agent workflow needs Qwen specifically but you lack a consistent OpenAI-compatible invocation path and clear boundaries versus other QianWen skills.
Who is it for?
Solo builders standardizing on Qwen for text and tool calls inside Cursor, Claude Code, or custom Python agents.
Skip if: General LLM questions without Qwen, OpenAI/Gemini-only stacks, or multimodal image/video/audio tasks that require qianwen-vision or generation skills.
When should I use this skill?
User asks to chat with Qwen, generate text, write code with Qwen, use Qwen function calling, or explicitly invokes qianwen-text by name.
What do I get? / Deliverables
Your agent runs scripted chat/completions against Qwen with streaming and function calling without accidentally routing to vision or non-Qwen providers.
- Chat/completion responses from Qwen
- Function-call rounds when tools are defined in the request
Recommended Skills
Journey fit
Build/integrations is the canonical shelf because the skill wires an external LLM provider into the agent toolchain during product construction, not distribution or ops. Subphase integrations matches scripted OpenAI-compatible requests (text.py) and explicit Qwen-specific triggers rather than generic prompt authoring.
How it compares
Provider-specific text integration—not a model-agnostic prompt library or MCP server.
Common Questions / FAQ
Who is qianwen-text for?
Developers building agent or API workflows who standardize on Qwen for text, code, reasoning, and function calling via OpenAI-compatible endpoints.
When should I use qianwen-text?
During build/integrations when implementing chat, completions, or tool calls that must hit Qwen models, including explicit skill-by-name invocation.
Is qianwen-text safe to install?
It runs Python scripts and network calls to the Qwen API; store API keys securely and review the Security Audits panel on this catalog page before installing.
SKILL.md
READMESKILL.md - Qianwen Text
> **Agent setup**: If your agent doesn't auto-load skills (e.g. Claude Code), > see [agent-compatibility.md](references/agent-compatibility.md) once per session. # Qwen Text Chat (OpenAI-Compatible) Generate text, conduct conversations, write code, and invoke tools using Qwen models through the OpenAI-compatible API. This skill is part of **QianWen-AI/qianwen-ai**. ## Skill directory Use this skill's internal files to execute and learn. Load reference files on demand when the default path fails or you need details. | Location | Purpose | |-------------------------------------|-------------------------------------------------------------------------------------| | `scripts/text.py` | Default execution — chat/completions request, streaming, output save | | `references/execution-guide.md` | Fallback: curl, Python SDK, function calling, thinking mode | | `references/api-guide.md` | API supplement and full code examples | | `references/prompt-guide.md` | Prompt engineering: CO-STAR framework, CoT, few-shot, task steps | | `references/sources.md` | Official documentation URLs (manual lookup only) | | `references/agent-compatibility.md` | Agent self-check: register skills in project config for agents that don't auto-load | ## Security **NEVER output any API key or credential in plaintext.** Always use variable references (`$DASHSCOPE_API_KEY` in shell, `os.environ["DASHSCOPE_API_KEY"]` in Python). Any check or detection of credentials must be **non-plaintext**: report only status (e.g. "set" / "not set", "valid" / "invalid"), never the value. Never display contents of `.env` or config files that may contain secrets. **When the API key is not configured, NEVER ask the user to provide it directly.** Instead, help create a `.env` file with a placeholder (`DASHSCOPE_API_KEY=sk-your-key-here`) and instruct the user to replace it with their actual key from the [QianWen Console](https://platform.qianwenai.com/home/api-keys). Only write the actual key value if the user explicitly requests it. ## Key Compatibility Scripts require a **standard QianWen API key** (`sk-...`). Token Plan 团队版 keys (`sk-sp-...`) target a different endpoint (`token-plan.cn-beijing.maas.aliyuncs.com`) and are designed exclusively for interactive AI tools (Cursor, Claude Code, Qwen Code, OpenClaw, OpenCode, Codex, Kilo Code/CLI, Hermes Agent). They cannot be used by these scripts. Standard `sk-` key required. The script detects `sk-sp-` keys at startup and prints a warning. If qianwen-ops-auth is installed, see its `references/tokenplan.md` for details on key types, endpoint mapping, supported models, and error codes. ## Model Selection | Model | Use Case | |--------------------|-------------------------------------------------------------------------| | `qwen3.6-plus` | **Recommended default** — latest flagship, balanced performance/cost/speed, 1M context, thinking on by default, multimodal (text+image+video) | | `qwen3.5-plus` | Balanced performance, cost, speed, 1M