ai-model-wechat

Run billing and model group preflight checks before WeChat Mini Program AI text generation.

Updated May 14, 2026
One-click install
npx skills add https://github.com/williamwang25/ams-admin --skill ai-model-wechat-williamwang25
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-model-wechat
Source: https://github.com/williamwang25/ams-admin/tree/main/.windsurf/skills/cloudbase/references/ai-model-wechat
Command: npx skills add https://github.com/williamwang25/ams-admin --skill ai-model-wechat-williamwang25

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It prevents WeChat Mini Program AI integration failures by ensuring correct billing eligibility and model group readiness before using wx.cloud.extend.AI for text generation and streaming.

Core Features & Use Cases

  • Two-step preflight guardrails: validates 小程序成长计划 eligibility first, then checks group/model readiness via DescribeAIModels, with catalog lookup and enabling via DescribeManagedAIModelList + UpdateAIModel when needed.
  • Correct provider vs model separation: uses only legal GroupName values for createModel(provider) (hunyuan-exp / cloudbase / custom-*), while passing the concrete model id only in the request data.model field.
  • Streaming with callbacks: supports streamText with onText, onEvent, and onFinish, plus safe termination via [DONE].
  • Scope: focused on Mini Program AI text generation (generateText, streamText) and explicitly not for browser/Web apps, Node.js backends, or image generation.

Quick Start

Tell the agent: "Integrate wx.cloud.extend.AI in my WeChat Mini Program to stream chat responses with streamText, and include the required eligibility and group readiness preflight before calling createModel."

Frequently Asked Questions about ai-model-wechat

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use wx.cloud.extend.AI for text generation in a WeChat Mini Program?

To use wx.cloud.extend.AI for text generation in a WeChat Mini Program, you must pass a two-step preflight checking billing eligibility and model readiness, then call createModel with a valid GroupName before requesting generateText.

Why does wx.cloud.extend.AI createModel fail in my WeChat Mini Program?

Calling wx.cloud.extend.AI createModel fails when the 小程序成长计划 billing eligibility is unverified or the model group is unready, requiring a mandatory preflight via DescribeActivityInfo and DescribeAIModels before execution.

How do I stream chat responses with streamText in WeChat Mini Programs?

To stream chat responses in WeChat Mini Programs, use the streamText function with onText, onEvent, and onFinish callbacks for incremental updates, ensuring safe termination via the [DONE] signal after completing preflight checks.

Can I use wx.cloud.extend.AI for Node.js backends or browser web apps?

No, wx.cloud.extend.AI is explicitly scoped for WeChat Mini Program text generation only and does not support Node.js backends, browser web apps, or image generation tasks.

What GroupName values are valid for wx.cloud.extend.AI createModel?

Valid GroupName values for wx.cloud.extend.AI createModel are hunyuan-exp, cloudbase, or custom-* prefixes, while the concrete model id must be passed separately within the request data.model field.

Do I need to enable AI models before calling generateText in a WeChat Mini Program?

Yes, you must verify and enable AI models before calling generateText by running DescribeAIModels, and optionally using DescribeManagedAIModelList and UpdateAIModel to configure group readiness successfully.