Artificial Intelligence 8 min read

deepseek4j 1.3: Java SDK adds web search, streaming & multi‑channel AI

deepseek4j 1.3 introduces web‑search capability, streaming responses, system prompts, expanded multi‑platform support, enhanced SSE debugging, and upcoming features like API‑key rotation and resilience, enabling Java developers to integrate DeepSeek models effortlessly while focusing on business logic.

Java Architecture Diary
Java Architecture Diary
Java Architecture Diary
deepseek4j 1.3: Java SDK adds web search, streaming & multi‑channel AI
deepseek4j 1.3 version released, bringing online search, multi‑channel support and other important updates.

What is deepseek4j

deepseek4j ( https://github.com/pig-mesh/deepseek4j ) is a Java‑focused integration framework for DeepSeek models. With an elegant API, a single line of code can connect to DeepSeek and provide the following core capabilities:

Complete chain‑of‑thought retention : perfectly preserves the model's reasoning process for traceable AI thinking.

Streaming output experience : built on Reactor to deliver a ChatGPT‑like typewriter effect.

<code>@GetMapping(value = "/chat", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
public Flux&lt;ChatCompletionResponse&gt; chat(String prompt) {
    return deepSeekClient.chatFluxCompletion(prompt);
}</code>

Using deepseek4j lets you focus on business‑logic development without worrying about low‑level details.

1. v1.3 Updates

1.1 Online Search Support

1739118403
1739118403

The most important update is the addition of online search capability, which brings three key advantages:

Break time boundaries : the model is no longer limited by the pre‑training data’s time range and can fetch and process the latest information.

Real‑time information acquisition : high‑quality sources provide up‑to‑date news for more accurate Q&A.

Differentiated competition : in an era of homogeneous large models, online search becomes a critical differentiator.

<code>@GetMapping(value = "/chat", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
public Flux&lt;ChatCompletionResponse&gt; chat(String prompt) {
    // Specify online search parameters
    SearchRequest searchRequest = SearchRequest.builder()
        .enable(true)
        .freshness(FreshnessEnums.ONE_DAY) // data within one day
        .summary(true) // return summary
        .count(10) // return 10 items
        .page(1) // first page
        .build();
    return deepSeekClient.chatSearchCompletion(prompt, searchRequest);
}</code>

1.2 Intelligent System Prompt

1739118117
1739118117

The system prompt is a built‑in instruction that determines the model’s behavior, answer style, and functional scope in a specific context.

To address instability in some channel deployments, the new version introduces system prompts consistent with DeepSeek R1 official version:

Carefully designed prompt templates ensure consistent and reliable model output.

Built‑in multi‑level prompt optimization significantly improves inference quality.

1.3 Multi‑Channel Integration

The new version greatly expands the supported channel range:

Deepseek4j local R1 – based on Ollama local deployment.

Deepseek4j Tencent R1 – Tencent Cloud AI platform.

Deepseek4j Silicon Flow R1 – Silicon Flow AI platform.

Deepseek4j Volcano Engine R1 – ByteDance Volcano Engine.

Deepseek4j GiteeAI R1 – Gitee AI platform.

Deepseek4j Alibaba R1 – Alibaba Cloud Tongyi Qianwen.

For each platform’s parameter acquisition and configuration, refer to: https://javaai.pig4cloud.com/deepseek

1.4 Enhanced SSE Debugging

For non‑standard platforms, new intelligent debugging features are added:

Automatic handling of

&lt;think&gt;

tag content.

Smart extraction of

reason_content

.

Optimized token usage for multi‑turn conversations.

1738864340
1738864340

2. Documentation Page Launched

Detailed usage documentation is now online: DeepSeek4j Official Documentation https://javaai.pig4cloud.com/deepseek

1739117249
1739117249

3. Future Plans

1739119336
1739119336

In rapidly deploying large‑model applications, traditional solutions face a dilemma: AI gateways like Higress or Kong provide API gateway capabilities but bring heavy architecture and operational costs, while frameworks like LangChain or Spring AI focus on SDK layers without deep stability mechanisms.

Given the popularity yet instability of DeepSeek‑R1 in China, the roadmap includes:

Lightweight multi‑API‑Key rotation mechanism that automatically switches to available nodes at the SDK level.

Request‑level circuit‑breaker and fallback using Resilience4j to ensure single‑user fault isolation.

Intelligent traffic scheduling that dynamically adjusts routing based on token consumption rate.

This approach avoids the heavyweight architecture of traditional gateways while addressing the stability gaps of existing AI SDKs.

JavaSDKAIStreamingDeepSeekWeb Search
Java Architecture Diary
Written by

Java Architecture Diary

Committed to sharing original, high‑quality technical articles; no fluff or promotional content.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.