Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🐛 fix(model-bank): enable Hy3 agent capabilities (#17669)

Yichen22e607b2bd46
diff --git a/locales/en-US/models.json b/locales/en-US/models.json
index 0f81e969a25..6615aa49306 100644
--- a/locales/en-US/models.json
+++ b/locales/en-US/models.json
@@ -735,6 +735,7 @@
"hy-image-v3.0.description": "Based on the Hunyuan large model, it is capable of reasoning about image layout, composition, and brushwork, using world knowledge to infer commonsense visual scenes. It can also interpret complex semantics at the scale of thousands of characters, generate long-form textual content, complex comics, memes, and produce vivid and engaging educational illustrations.",
"hy-video-1.5.description": "It supports multimodal inputs including text and images to generate high-quality videos, enabling scene transitions and multi-character interactions. It streamlines production workflows and reduces costs, making it suitable for enterprise advertising, marketing, and individual creative applications.",
"hy3-preview.description": "Hunyuan Hy3 Preview is designed for agent workloads, adopting a Mixture-of-Experts (MoE) architecture with 295B total parameters and 21B activated parameters. It offers three modes within a single model—**no_think** (ultra-fast response), **think_low** (quick reasoning), and **think_high** (deep reasoning)—to accommodate varying latency and depth requirements, from high-frequency interactions to complex engineering tasks. It achieves near state-of-the-art performance on coding benchmarks such as SWE-bench Verified, and supports a 256K context window for cross-file code refactoring and long-document analysis. This model is well-suited for developers who require reliable task completion while remaining sensitive to inference cost.",
+ "hy3.description": "Hunyuan Hy3 is optimized for production agent workloads, with improvements in coding agents, long-document understanding, multi-turn context retention, search question answering, and complex task execution. It provides more reliable task completion and engineering usability for cross-file development, office automation, and multi-step agent workflows.",
"image-01-live.description": "An image generation model with fine detail, supporting text-to-image and controllable style presets.",
"image-01.description": "A new image generation model with fine detail, supporting text-to-image and image-to-image.",
"imagen-4.0-fast-generate-001.description": "Imagen 4th generation text-to-image model series Fast version",
diff --git a/locales/zh-CN/models.json b/locales/zh-CN/models.json
index 4bf077c77ca..53407892cc3 100644
--- a/locales/zh-CN/models.json
+++ b/locales/zh-CN/models.json
@@ -735,6 +735,7 @@
"hy-image-v3.0.description": "基于混元大模型,能够理解图像布局、构图、笔触等视觉逻辑,结合世界知识推理常识性视觉场景。可解析复杂长文本语义、生成长篇图文、复杂漫画与表情包,并能创作生动的教育插画。",
"hy-video-1.5.description": "支持文本与图像输入,生成高质量视频,具备镜头切换与多角色互动能力。显著提升内容生产效率并降低成本,适用于企业广告、营销及个人创作。",
"hy3-preview.description": "混元 Hy3 Preview 专为 Agent 工作负载设计,采用 295B 总参数、21B 激活参数的 MoE 架构。模型具备三种模式:no_think(极速响应)、think_low(快速推理)、think_high(深度推理),可适应从高频交互到复杂工程的不同需求。在 SWE-bench Verified 等编码基准上接近 SOTA,同时支持 256K 上下文,用于跨文件代码重构与长文档分析。非常适合需要可靠任务完成且对推理成本敏感的开发者。",
+ "hy3.description": "混元 Hy3 针对生产级 Agent 工作负载进行了优化,重点提升 Coding Agent、长文档理解、多轮上下文保持、搜索问答与复杂任务执行能力。它在跨文件开发、办公自动化和多步骤 Agent 工作流中提供更可靠的任务完成度与工程可用性。",
"image-01-live.description": "一款细节精致的图像生成模型,支持文本生成图像与可控风格预设。",
"image-01.description": "一款全新图像生成模型,细节表现出色,支持文本生成图像与图像转图像。",
"imagen-4.0-fast-generate-001.description": "Imagen 第四代文本生成图像模型系列 Fast 版本",
diff --git a/packages/model-bank/src/aiModels/__tests__/index.test.ts b/packages/model-bank/src/aiModels/__tests__/index.test.ts
index 3b297c8b38c..718649788b4 100644
--- a/packages/model-bank/src/aiModels/__tests__/index.test.ts
+++ b/packages/model-bank/src/aiModels/__tests__/index.test.ts
@@ -123,6 +123,31 @@ describe('Moonshot models', () => {
});
});
+describe('Hunyuan models', () => {
+ it('registers Hy3 with agent capabilities', () => {
+ const hy3 = LOBE_DEFAULT_MODEL_LIST.find(
+ (model) => model.providerId === ModelProvider.Hunyuan && model.id === 'hy3',
+ );
+
+ expect(hy3).toEqual(
+ expect.objectContaining({
+ abilities: expect.objectContaining({
+ functionCall: true,
+ reasoning: true,
+ structuredOutput: true,
+ }),
+ contextWindowTokens: 256_000,
+ enabled: true,
+ maxOutput: 128_000,
+ settings: {
+ extendParams: ['hy3ReasoningEffort'],
+ },
+ type: 'chat',
+ }),
+ );
+ });
+});
+
describe('Google rolling model aliases', () => {
it('tracks the current Flash and Flash-Lite model versions', () => {
const googleModels = LOBE_DEFAULT_MODEL_LIST.filter((model) => model.providerId === 'google');
diff --git a/packages/model-bank/src/aiModels/hunyuan.ts b/packages/model-bank/src/aiModels/hunyuan.ts
index a4dc5531dcb..719bfbff0af 100644
--- a/packages/model-bank/src/aiModels/hunyuan.ts
+++ b/packages/model-bank/src/aiModels/hunyuan.ts
@@ -2,6 +2,50 @@ import type { AIChatModelCard, AIImageModelCard, AIVideoModelCard } from '../typ
// https://cloud.tencent.com/document/product/1823/130051
const hunyuanChatModels: AIChatModelCard[] = [
+ {
+ abilities: {
+ functionCall: true,
+ reasoning: true,
+ structuredOutput: true,
+ },
+ contextWindowTokens: 256_000,
+ description:
+ 'Hunyuan Hy3 is optimized for production agent workloads, with improvements in coding agents, long-document understanding, multi-turn context retention, search question answering, and complex task execution. It provides more reliable task completion and engineering usability for cross-file development, office automation, and multi-step agent workflows.',
+ displayName: 'Hy3',
+ enabled: true,
+ family: 'hunyuan',
+ generation: 'hunyuan-3',
+ id: 'hy3',
+ maxOutput: 128_000,
+ pricing: {
+ currency: 'CNY',
+ units: [
+ {
+ name: 'textInput_cacheRead',
+ rate: 0.25,
+ strategy: 'fixed',
+ unit: 'millionTokens',
+ },
+ {
+ name: 'textInput',
+ rate: 1,
+ strategy: 'fixed',
+ unit: 'millionTokens',
+ },
+ {
+ name: 'textOutput',
+ rate: 4,
+ strategy: 'fixed',
+ unit: 'millionTokens',
+ },
+ ],
+ },
+ releasedAt: '2026-07-06',
+ settings: {
+ extendParams: ['hy3ReasoningEffort'],
+ },
+ type: 'chat',
+ },
{
abilities: {
functionCall: true,
diff --git a/packages/model-runtime/src/providers/hunyuan/index.test.ts b/packages/model-runtime/src/providers/hunyuan/index.test.ts
index 4f5df5ee27e..65ae9a5f4f2 100644
--- a/packages/model-runtime/src/providers/hunyuan/index.test.ts
+++ b/packages/model-runtime/src/providers/hunyuan/index.test.ts
@@ -124,6 +124,48 @@ describe('LobeHunyuanAI - custom features', () => {
]);
});
+ it('should add empty reasoning_content for hy3 assistant tool-call history', () => {
+ const toolCall = {
+ function: {
+ arguments: '{"city":"Shenzhen"}',
+ name: 'get_weather',
+ },
+ id: 'call_1',
+ type: 'function',
+ };
+ const payload = {
+ model: 'hy3',
+ messages: [
+ {
+ content: null,
+ role: 'assistant',
+ tool_calls: [toolCall],
+ },
+ {
+ content: 'Sunny',
+ role: 'tool',
+ tool_call_id: 'call_1',
+ },
+ ],
+ } as any;
+
+ const result = handlePayload(payload);
+
+ expect(result.messages).toEqual([
+ {
+ content: null,
+ reasoning_content: '',
+ role: 'assistant',
+ tool_calls: [toolCall],
+ },
+ {
+ content: 'Sunny',
+ role: 'tool',
+ tool_call_id: 'call_1',
+ },
+ ]);
+ });
+
it('should add search fields when enabledSearch is true', () => {
const payload = {
model: 'hunyuan-2.0-thinking-20251109',
diff --git a/packages/model-runtime/src/providers/hunyuan/index.ts b/packages/model-runtime/src/providers/hunyuan/index.ts
index 95919458367..b26579602a3 100644
--- a/packages/model-runtime/src/providers/hunyuan/index.ts
+++ b/packages/model-runtime/src/providers/hunyuan/index.ts
@@ -22,7 +22,7 @@ export const params = {
? reasoning.content
: undefined;
- if (message.role === 'assistant' && model === 'hy3-preview') {
+ if (message.role === 'assistant' && (model === 'hy3-preview' || model === 'hy3')) {
return {
...rest,
reasoning_content: reasoningContent ?? '',