[KongchangAI]
· 2 min read· 1,278 words

Tencent Hy4 Launches on AI Gateway: First Vision-Capable Hy Model with 1M Token Context

Tencent Hy4 Launches on AI Gateway: First Vision-Capable Hy Model with 1M Token Context

Tencent Hy4 lands on AI Gateway, first to support vision and 1M token context.

Tencent's Hy4 model is now available on AI Gateway via a unified API under the name tencent/hy4. It supports reasoning, tool calling, and structured output, and is the Hy series' first vision-capable model, reading image details and complex charts. With a 1M token context, it suits cross-codebase tasks and multi-document analysis, and also supports computer use. AI Gateway passes through provider pricing with no platform fee, and a 50% discount runs until Dec 31, 2026.

Tencent's Hy4 model is now available on AI Gateway, allowing developers to access it through a unified API. According to official information, Hy4 not only offers complete capabilities in reasoning, tool calling, and structured output, but is also the first model in the Hy series to support vision, with a context window of 1 million tokens.

Tencent Hy4 launches on AI Gateway

One Model for Long Documents and Codebases

Hy4's core parameters point to a clear use case: large context. A 1 million token window means it can handle engineering tasks spanning an entire codebase at once, or digest multiple long documents simultaneously. For developers who frequently need to establish connections across multiple files, this reduces reliance on chunked retrieval strategies.

In addition to reasoning and tool calling, Hy4 also supports structured output, which saves considerable parsing overhead for applications that need to feed model results directly into downstream systems.

Context Window and Chunked Retrieval

A context window refers to the maximum number of tokens a model can process in a single call (think of it as the length limit for input and output text combined). Traditionally, when task content exceeds the model's window, developers need to adopt chunked retrieval strategies from retrieval-augmented generation (RAG): splitting long documents or codebases into small chunks, retrieving relevant segments on demand, and splicing them into the prompt. This approach depends on chunking granularity and retrieval quality, and easily loses cross-chunk relational information. A 1 million token window allows an entire codebase or multiple long documents to be placed into context at once, enabling the model to establish cross-file and cross-chapter connections with complete information, thereby reducing dependence on chunked retrieval pipelines.

Structured Output

Structured output means the model generates results according to a pre-agreed schema (such as JSON Schema), making return value fields fixed and types controllable, directly parseable and verifiable by downstream programs without relying on regex or fault-tolerant parsing. For applications that need to feed model output into databases, workflows, or frontend components, this can significantly reduce parsing costs and failure retries.

Vision Capabilities Enter the Hy Series for the First Time

Hy4 is the first model in the Hy family with vision capabilities. Official descriptions mention that it can recognize details in images and also read complex charts. Combined with the 1 million token context, this means users can upload technical documents containing numerous charts and have the model perform cross-page analysis within the full context.

Another noteworthy capability is computer use—supporting both command line and graphical interfaces. This gives Hy4 the potential to operate computer environments, not just generate text.

Multimodality and Visual Understanding

Vision capabilities mean the model can accept image inputs and understand them alongside text—in other words, a multimodal model. Such models typically encode images as visual tokens, which are fed into context processing together with text tokens, so visual input also consumes the context window. When the context is large enough, the model can receive numerous chart-containing pages simultaneously and perform cross-page, cross-chart comparative analysis—for example, comparing performance curves across different chapters of technical documentation, or extracting numerical relationships from complex tables.

Computer Use

Computer use refers to the model's ability to observe screen or terminal states and output operation instructions (clicks, inputs, command execution, etc.) to complete tasks, typically running in a "perceive—decide—execute" loop. The command-line mode focuses on scripts and system operations, while the graphical interface mode relies on visual understanding of screenshots to locate controls. This capability advances the model from "generating text" to "operating environments," but also places higher demands on long-task stability, error recovery, and operational safety.

Improvements Over Hy4 Preview

Tencent compared Hy4 with Hy4 Preview. The improvements concentrate in three areas: tighter instruction following, better long-context performance, and greater stability in long-running tasks and deep research scenarios. These improvements target reliability in practical use rather than mere capability expansion.

For developers already using the Preview version, the upgrade path is straightforward—simply switch the model name to tencent/hy4.

Preview Versions and Model Naming

In the model release process, Preview versions are typically used to open capabilities early and collect real-world feedback, with interfaces and behavior potentially adjusted in the official release; official versions are further tuned for stability, instruction following, and other aspects. Therefore, upgrading from Preview to the official version often only requires replacing the model identifier, but behavioral details (such as output format preferences or interruption tendencies in long tasks) may change, so regression testing with existing tasks is recommended during migration.

How to Get Started

Calling Hy4 through AI Gateway requires very concise code. Using AI SDK as an example, the core is simply specifying the model name:

import { streamText } from 'ai';
const result = streamText({
  model: 'tencent/hy4',
  prompt: 'Outline a database migration in three brief steps.',
});
for await (const text of result.textStream) {
  process.stdout.write(text);
}

If using coding agents like Claude Code, Codex, or Cursor, the official recommendation is to first install the latest version of Vercel CLI and run npx vercel ai-gateway setup, then select tencent/hy4 in the agent. Developers can also try it directly in the model playground.

The Added Value of AI Gateway

AI Gateway itself provides a layer of unified calling capability: tracking usage and costs, configuring retries and failover, and performance optimization, with the goal of achieving higher availability than direct connections to a single provider. It also includes built-in custom reports, zero data retention support, API key budgets, and routing rules.

On pricing, AI Gateway passes through provider pricing without charging an inference platform fee, and BYOK requests are equally applicable. This means developers calling Hy4 through this gateway layer incur no additional intermediary costs.

Hy4 is currently offered at 50% off on AI Gateway until December 31, 2026.

Unified Gateway and BYOK

AI Gateway is a proxy layer above model providers: developers use the same set of interfaces and keys to call models from different vendors, and the gateway handles forwarding requests and adds capabilities like usage tracking, retries, failover, and routing. BYOK (Bring Your Own Key) means developers use their own API keys at the provider to make requests, with the gateway only handling forwarding and governance without charging an additional inference platform fee. This model facilitates switching and comparing between multiple models and makes cost accounting more transparent; however, strategies like failover and retries introduce additional latency, requiring trade-offs based on the scenario.

Points Worth Noting

Hy4's positioning is clear: using large context and vision capabilities to enter codebase understanding, document analysis, and computer operation scenarios. But actual performance still needs verification by developers with their own tasks, especially stability in long-running tasks—such capabilities often only become clear under real workloads. The addition of vision and computer use significantly expands the capability boundaries of the Hy series, and subsequent performance in agent-type tools is worth continued observation.

One-line Summary

Tencent Hy4 lands on AI Gateway, first to support vision and 1M token context.

Paragraph Summary

Tencent's Hy4 model is now available on AI Gateway, accessible through a unified API with the model name tencent/hy4. Hy4 supports reasoning, tool calling, and structured output, and is the first model in the Hy series with vision capabilities, able to recognize image details and read complex charts, with a context window of 1 million tokens, suitable for cross-codebase engineering tasks and multi-document analysis. It also supports computer use via command line and graphical interfaces. Compared to Hy4 Preview, the new version improves instruction following, long-context performance, and stability in long-running tasks. AI Gateway passes through provider pricing without platform fees, BYOK is equally applicable, and a 50% discount is currently available until December 31, 2026.

#Tencent Hy4#AI Gateway#Hy model#1M token context#vision model#structured output#computer use#BYOK
Share:

Related articles