Hunyuan Text Generation Model Upgrade Guide
The AI Resource Pack included with the Mini Program Growth Plan supports the hy3 and hy3-preview models. Existing models will be automatically migrated to hy3.
To use models such as DeepSeek, Kimi, MiniMax, or GLM, you can switch to a Resource-Point Plan. View documentation
If you have previously modified the Base URL or API Key of the hunyuan-exp provider (i.e., integrated a custom provider), please contact that provider directly for upgrade guidance.
Affected Models
The following models are currently hosted under the hunyuan-exp provider and must be migrated:
| Old Model Name | New Model Name |
|---|---|
hunyuan-2.0-thinking-20251109 | hy3 or hy3-preview |
hunyuan-2.0-instruct-20251111 | hy3 or hy3-preview |
hunyuan-turbos-latest | hy3 or hy3-preview |
hunyuan-t1-latest | hy3 or hy3-preview |
Migration Guide by Platform
Mini Program (wx.cloud.extend.AI)
WeChat Mini Program base library version 3.15.1 or above is required.
Change the createModel argument from "hunyuan-exp" to "cloudbase", and update the model field to "hy3" or "hy3-preview":
Before:
const model = wx.cloud.extend.AI.createModel("hunyuan-exp");
const res = await model.streamText({
data: {
model: "hunyuan-2.0-instruct-20251111",
messages: [{ role: "user", content: "Hello" }],
},
});
After:
const model = wx.cloud.extend.AI.createModel("cloudbase");
const res = await model.streamText({
data: {
model: "hy3",
messages: [{ role: "user", content: "Hello" }],
},
});
Web SDK (@cloudbase/js-sdk)
Change the provider from "hunyuan-exp" to "cloudbase", and update model to "hy3" or "hy3-preview":
Before:
import cloudbase from "@cloudbase/js-sdk";
const app = cloudbase.init({ env: "<ENV_ID>" });
const ai = app.ai();
const res = await ai.streamText({
provider: "hunyuan-exp",
model: "hunyuan-2.0-instruct-20251111",
messages: [{ role: "user", content: "Hello" }],
});
After:
import cloudbase from "@cloudbase/js-sdk";
const app = cloudbase.init({ env: "<ENV_ID>" });
const ai = app.ai();
const res = await ai.streamText({
provider: "cloudbase",
model: "hy3",
messages: [{ role: "user", content: "Hello" }],
});
Node.js SDK (@cloudbase/node-sdk)
Change the provider from "hunyuan-exp" to "cloudbase", and update model to "hy3" or "hy3-preview":
Before:
const cloudbase = require("@cloudbase/node-sdk");
const app = cloudbase.init({ env: "<ENV_ID>" });
const ai = app.ai();
const res = await ai.streamText({
provider: "hunyuan-exp",
model: "hunyuan-2.0-instruct-20251111",
messages: [{ role: "user", content: "Hello" }],
});
After:
const cloudbase = require("@cloudbase/node-sdk");
const app = cloudbase.init({ env: "<ENV_ID>" });
const ai = app.ai();
const res = await ai.streamText({
provider: "cloudbase",
model: "hy3",
messages: [{ role: "user", content: "Hello" }],
});
OpenAI SDK (Compatible Mode)
Update the baseURL to replace hunyuan-exp with cloudbase, and update model to "hy3" or "hy3-preview":
Before:
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "<YOUR_API_KEY>",
baseURL: "https://<ENV_ID>.api.tcloudbasegateway.com/v1/ai/hunyuan-exp",
});
const res = await client.chat.completions.create({
model: "hunyuan-2.0-instruct-20251111",
messages: [{ role: "user", content: "Hello" }],
stream: true,
});
After:
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "<YOUR_API_KEY>",
baseURL: "https://<ENV_ID>.api.tcloudbasegateway.com/v1/ai/cloudbase",
});
const res = await client.chat.completions.create({
model: "hy3",
messages: [{ role: "user", content: "Hello" }],
stream: true,
});
Get your API Key from CloudBase Console → Environment → API Key Settings.
Getting Help
If you run into issues during migration, visit the CloudBase Community or submit a support ticket for 1-on-1 assistance.