Qwen3.8-Max Added and DeepSeek-V4-Flash Upgraded
Date: 2026-08-03 / (1405-05-12)
Summary
Alibaba's new qwen3.8-max flagship is now available on AvalAI for long-horizon coding, professional work, multimodal understanding, and agentic workflows. The existing deepseek-v4-flash model ID now automatically routes to DeepSeek-V4-Flash-0731, the official release with stronger agentic capabilities; no application changes are required and pricing is unchanged.
Details
Alibaba: Qwen3.8-Max
We announce access to Qwen3.8-Max (qwen3.8-max), Alibaba's new 2.4-trillion-parameter mixture-of-experts flagship. It is designed to plan, execute, and verify long-running coding and professional workflows while understanding text, images, video, and very large documents. Alibaba models documentation
Key Features:
- Long-Horizon Coding: Designed to autonomously implement and deliver multi-stage projects that can span more than 10 days
- Professional Work: Supports end-to-end tasks across legal, financial, design, and other specialist domains
- Native Multimodality: Accepts text, image, and video input and returns text
- 1M-Token Context: Up to 991,000 input tokens for large repositories, document collections, and extended video analysis
- 128K Output Capacity: Up to 128,000 output tokens for substantial code, analysis, and deliverables
- Deep Thinking and Tools: Supports reasoning, function calling, tool choice, structured output, prompt caching, and web search
- Endpoint Support: Full support on
v1/chat/completionsandv1/messages; partial support onv1/responses
DeepSeek: Automatic V4 Flash Upgrade
The AvalAI model ID deepseek-v4-flash now resolves to DeepSeek-V4-Flash-0731, DeepSeek's official V4 Flash release. This release supersedes the preview and substantially improves long-horizon coding, terminal work, tool use, automation, and other agentic workloads.
- No code change required: Continue sending
"model": "deepseek-v4-flash" - Pricing unchanged: Input, cached-input, and output rates remain the same
- Model structure: 284B total parameters with 13B active parameters and an attached DSpark speculative-decoding module
- Reasoning effort: Supports
low,high, andmax - Context window: 1 million tokens
- Official release: The 0731 checkpoint replaces the earlier preview behind the stable AvalAI model ID
Endpoint Availability
| Model | v1/chat/completions | v1/messages | v1/responses |
|---|---|---|---|
qwen3.8-max | Full | Full | Partial |
deepseek-v4-flash | Full | — | — |
Pricing
Prices are in USD per 1 million tokens.
| Model | Input | Cached Input | Cache Creation Input | Output |
|---|---|---|---|---|
qwen3.8-max | $2.00 | $0.25 | $2.50 | $6.00 |
deepseek-v4-flash | $0.14 | $0.0028 | — | $0.28 |
The DeepSeek upgrade does not change the existing deepseek-v4-flash rates.
API Request and Response Example
Request
curl https://api.avalai.ir/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AVALAI_API_KEY" \
-d '{
"model": "qwen3.8-max",
"messages": [
{
"role": "user",
"content": "Review this platform architecture and propose a staged implementation plan with verification gates."
}
],
"extra_body": {"enable_thinking": false}
}'Response
The following shortened response illustrates the standard Chat Completions structure:
{
"id": "chatcmpl-qwen38-example",
"created": 1785744000,
"model": "qwen3.8-max",
"object": "chat.completion",
"system_fingerprint": null,
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "Start by defining stable service boundaries and measurable rollback criteria. Introduce observability and contract tests before migrating one low-risk workflow behind a feature flag, then expand traffic only after each verification gate passes.",
"role": "assistant",
"thinking_blocks": [],
"annotations": []
}
}
],
"usage": {
"completion_tokens": 55,
"prompt_tokens": 23,
"total_tokens": 78,
"completion_tokens_details": null,
"prompt_tokens_details": {
"audio_tokens": null,
"cached_tokens": 0,
"text_tokens": 23,
"image_tokens": null
}
},
"estimated_cost": {
"unit": "0.0003760000",
"irt": 57.6,
"exchange_rate": 153200
}
}SDK Usage Examples
curl https://api.avalai.ir/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AVALAI_API_KEY" \
-d '{
"model": "qwen3.8-max",
"messages": [
{
"role": "user",
"content": "Design a reliable implementation plan for this multi-service platform."
}
],
"extra_body": {"enable_thinking": false}
}'from openai import OpenAI
client = OpenAI(
api_key="your-avalai-api-key",
base_url="https://api.avalai.ir/v1",
)
response = client.chat.completions.create(
model="qwen3.8-max",
messages=[
{
"role": "user",
"content": "Design a reliable implementation plan for this multi-service platform.",
}
],
extra_body={"enable_thinking": False},
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.AVALAI_API_KEY,
baseURL: "https://api.avalai.ir/v1",
});
const response = await client.chat.completions.create({
model: "qwen3.8-max",
messages: [
{
role: "user",
content: "Design a reliable implementation plan for this multi-service platform.",
},
],
extra_body: { enable_thinking: false },
});
console.log(response.choices[0].message.content);Continue Using DeepSeek-V4-Flash Without Changes
curl https://api.avalai.ir/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AVALAI_API_KEY" \
-d '{
"model": "deepseek-v4-flash",
"messages": [
{
"role": "user",
"content": "Find the root cause of this failing deployment and propose the safest fix."
}
],
"reasoning_effort": "high"
}'The same stable model ID now uses DeepSeek-V4-Flash-0731 automatically.