Developer Dashboard

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_effort accepts low, medium, and xhigh for 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 for qwen3.8-flash
  • Developer Capabilities: Function calling, tool choice, streaming, and reasoning-content support across endpoints
  • Best For: qwen3.8-flash for high-volume, cost-sensitive chat and agent workloads; qwen3.8-27b for dense-model deployments that need vision, coding, and long-horizon reliability

Benchmark Highlights Reported by Alibaba

Evaluationqwen3.8-flashqwen3.8-27b
GPQA Diamond91.789.2
LiveCodeBench v691.990.3
SWE-bench Pro62.561.7
CoWorkBench73.970.7
Toolathlon Verified73.567.1
OSWorld-Verified52.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

EndpointSupportNotes
v1/chat/completionsSupportedOpenAI-compatible Chat Completions
v1/messagesSupportedAnthropic-compatible Messages API
v1/responsesPartial supportVerify required parameters, tools, and modalities before production use

Pricing

Prices are in USD per 1 million tokens.

ModelInputCache CreationCached InputOutput
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

bash
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.

json
{
  "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

bash
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
    }
  }'
python
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="")
javascript
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-flash and qwen3.8-27b.
  • qwen3.8-flash is the managed production alias of qwen3.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 keep enable_thinking: true with stream: true when you want reasoning output.
  • Tune reasoning depth with reasoning_effort (low, medium, or xhigh) and preserve multi-turn reasoning context with preserve_thinking where the route supports it.
  • Confirm support for every required parameter, tool, and modality before using the partially supported v1/responses endpoint.