New Models Added: Qwen3.8-27B and Qwen3.8-Flash
Date: 2026-08-29 / (1405-06-07)
Summary
Alibaba's new Qwen3.8 models, qwen3.8-27b and qwen3.8-flash, are now available through AvalAI for coding, agentic work, reasoning, and multimodal understanding. Both models support v1/chat/completions and v1/messages, with partial support for v1/responses.
Details
Alibaba Qwen3.8
qwen3.8-27b is a compact, dense 27-billion-parameter model that carries the Qwen3.8 generation into deployment-friendly form. It is a native vision-language model that understands images and videos, and it offers flexible thinking control with reasoning_effort tuning and preserve_thinking support for multi-turn workflows.
qwen3.8-flash is the managed alias of qwen3.8-flash-next, a 125-billion-parameter mixture-of-experts model that activates 6 billion parameters per token. Its hybrid Gated DeltaNet plus Qwen Sparse Attention architecture reduces long-context serving cost, and an additional 51 billion N-gram embedding parameters expand capacity at negligible per-token computation. On AvalAI it serves up to 262,144 input tokens and 65,536 output tokens.
Key Features:
- Vision-Language Understanding: Both models accept image and video input, from STEM diagrams and documents to hour-scale videos
- Flexible Thinking Control: Thinking mode is on by default;
reasoning_effortacceptslow,medium, andxhighfor depth and cost tuning - Long Context: 262,144-token input context window on AvalAI for both models
- Agentic Strengths: Provider-reported results include 73.0 Terminal Bench 2.1, 61.7 SWE-bench Pro, and 84.3 OSWorld-Verified for
qwen3.8-27b; 73.5 Toolathlon Verified and 91.7 GPQA Diamond forqwen3.8-flash - Developer Capabilities: Function calling, tool choice, streaming, and reasoning-content support across endpoints
- Best For:
qwen3.8-flashfor high-volume, cost-sensitive chat and agent workloads;qwen3.8-27bfor dense-model deployments that need vision, coding, and long-horizon reliability
Benchmark Highlights Reported by Alibaba
| Evaluation | qwen3.8-flash | qwen3.8-27b |
|---|---|---|
| GPQA Diamond | 91.7 | 89.2 |
| LiveCodeBench v6 | 91.9 | 90.3 |
| SWE-bench Pro | 62.5 | 61.7 |
| CoWorkBench | 73.9 | 70.7 |
| Toolathlon Verified | 73.5 | 67.1 |
| OSWorld-Verified | 52.3 (partial) | 84.3 |
These provider-reported benchmark results are directional evidence. Evaluate the models with representative prompts, tools, media, and acceptance criteria before routing production traffic.
Endpoint Availability
| Endpoint | Support | Notes |
|---|---|---|
v1/chat/completions | Supported | OpenAI-compatible Chat Completions |
v1/messages | Supported | Anthropic-compatible Messages API |
v1/responses | Partial support | Verify required parameters, tools, and modalities before production use |
Pricing
Prices are in USD per 1 million tokens.
| Model | Input | Cache Creation | Cached Input | Output |
|---|---|---|---|---|
qwen3.8-flash | $0.15 | $0.20 | $0.016 | $0.47 |
qwen3.8-27b | $0.50 | $0.625 | $0.10 | $2.00 |
Review the pricing page for the full rate-limit breakdown by account tier.
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-flash",
"messages": [
{
"role": "user",
"content": "Review this migration plan and identify the three highest-risk assumptions."
}
]
}'Response
The shortened example below illustrates the standard Chat Completions structure. Token counts and cost vary with the request and generated output.
{
"id": "chatcmpl-qwen38flash-example",
"created": 1788000000,
"model": "qwen3.8-flash",
"object": "chat.completion",
"system_fingerprint": null,
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "The three highest-risk assumptions are the rollback window, the data-dual-write guarantee during cutover, and unchanged client contracts. Verify each with a rehearsal before switching traffic.",
"role": "assistant",
"thinking_blocks": [],
"annotations": []
}
}
],
"usage": {
"completion_tokens": 46,
"prompt_tokens": 24,
"total_tokens": 70,
"completion_tokens_details": null,
"prompt_tokens_details": {
"audio_tokens": null,
"cached_tokens": null,
"text_tokens": 24,
"image_tokens": null
}
},
"estimated_cost": {
"unit": "0.0000258200",
"irt": 2.96,
"exchange_rate": 114600
}
}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-27b",
"messages": [
{
"role": "user",
"content": "Plan a staged refactor of this service with tests and rollback criteria."
}
],
"extra_body": {
"enable_thinking": true
}
}'import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["AVALAI_API_KEY"],
base_url="https://api.avalai.ir/v1",
)
response = client.chat.completions.create(
model="qwen3.8-27b",
messages=[
{
"role": "user",
"content": "Plan a staged refactor of this service with tests and rollback criteria.",
}
],
stream=True,
extra_body={"enable_thinking": True, "reasoning_effort": "medium"},
)
for chunk in response:
if chunk.choices:
print(chunk.choices[0].delta.content or "", end="")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-27b",
messages: [
{
role: "user",
content: "Plan a staged refactor of this service with tests and rollback criteria.",
},
],
stream: true,
});
for await (const chunk of response) {
process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}Adoption Guidance
- Use the exact model IDs
qwen3.8-flashandqwen3.8-27b. qwen3.8-flashis the managed production alias ofqwen3.8-flash-next; it includes official built-in tooling upstream and defaults to a production-grade configuration.- Thinking is enabled by default. Send
extra_body={"enable_thinking": false}for non-streaming requests when you need a direct answer, and keepenable_thinking: truewithstream: truewhen you want reasoning output. - Tune reasoning depth with
reasoning_effort(low,medium, orxhigh) and preserve multi-turn reasoning context withpreserve_thinkingwhere the route supports it. - Confirm support for every required parameter, tool, and modality before using the partially supported
v1/responsesendpoint.