Skip to content

Qwen3.8 27B ​

Preview

Available in Preview since 29 September 2026. Qwen3.8 27B replaces Qwen3.6 35B A3B.

Overview ​

Qwen3.8 27B is a dense, 27-billion-parameter vision-language model from Qwen. It supports coding, visual understanding, research, and multi-step agentic workflows. Unlike the mixture-of-experts architecture of Qwen3.6 35B A3B, Qwen3.8 27B uses a dense architecture.

Supported languages: multilingual

Input documented on Swisscom Inference Endpoints: text and images

Output: text, code, and tool calls

Context length: 262,144 tokens, shared between input and generated output. The upstream model supports context extension, but the Swisscom deployment is configured for 262,144 tokens.

Model Card: Qwen/Qwen3.8-27B

Use Cases: coding assistance, visual question answering, document and chart understanding, tool-assisted workflows, and long-context analysis.

Multi-Token Prediction (MTP)

The Swisscom vLLM deployment is configured for MTP speculative decoding with --speculative-config '{"method":"mtp","num_speculative_tokens":2}'. MTP proposes two candidate tokens ahead for verification by the model, which can reduce decoding latency when those tokens are accepted. Actual gains depend on the workload and token acceptance rate. This is a server-side optimization; no API request changes are required.

Performance & Benchmarks ​

The Artificial Analysis leaderboard, filtered to open-weight, small, reasoning models and captured on 29 September 2026, reports the following Intelligence Index scores:

ModelReasoning EffortIntelligence Index Score
Qwen3.8 27Bxhigh34
Qwen3.8 27Bmedium28
Qwen3.8 27Blow26
Qwen3.6 35B A3BNot specified in the comparison18

All three Qwen3.8 reasoning settings score above Qwen3.6 in this comparison. These are third-party benchmark results, not measurements of Swisscom Inference Endpoints. They do not establish latency, throughput, or an overall ranking across all models.

Artificial Analysis comparison showing Qwen3.8 27B scores of 34 at xhigh, 28 at medium, and 26 at low reasoning effort, compared with 18 for Qwen3.6 35B A3B

Figure: Artificial Analysis Intelligence Index comparison for the selected leaderboard filters. Source: Artificial Analysis, captured on 29 September 2026.

Thinking Controls ​

Qwen3.8 generates reasoning before the final answer by default.

  • Set chat_template_kwargs.enable_thinking to false for a direct answer without thinking.
  • The upstream model supports reasoning_effort values xhigh (default), medium, and low to adjust reasoning depth.
  • Unlike Qwen3.6, the Qwen3.8 model card specifies that preserve_thinking is enabled by default. Set chat_template_kwargs.preserve_thinking to false to disable retention of thinking blocks from earlier conversation turns.

When using the OpenAI Python SDK, pass chat_template_kwargs through extra_body. In raw HTTP requests, send chat_template_kwargs directly in the JSON body, as shown below.

Reasoning and the final answer may be returned in separate response fields by the serving engine. Applications should read the final answer from choices[0].message.content and should not depend on literal <think> tags being present in that field.

Best Practices ​

The upstream model card recommends these sampling settings:

Modetemperaturetop_ptop_kmin_ppresence_penaltyrepetition_penalty
Thinking1.00.95200.00.01.0
Non-thinking0.70.8200.01.51.0
  • Place image content before the task instruction in multimodal requests.
  • Reserve enough output tokens for reasoning as well as the final answer. The examples below use short output budgets for illustration; complex tasks may need larger budgets within the deployed context limit.
  • Preserve the assistant message, including tool calls and any reasoning fields required by the serving engine, when continuing tool-assisted conversations.
  • Lower reasoning effort can reduce per-turn work but does not necessarily reduce total latency for multi-step tasks.
  • The upstream model also supports video understanding. This page documents text and image input; upstream capabilities do not by themselves establish availability through Swisscom Inference Endpoints.

Endpoints ​

MethodPathPurpose
POST/v1/chat/completionsText, image, and tool-calling conversations
GET/v1/modelsList model metadata
POST/v1/responsesOpenAI Responses API
POST/v1/messagesAnthropic-compatible Messages API

Use the model ID qwen/qwen3.8-27b. See Inference Endpoints for authentication and shared API request and response formats.

Chat Completion Request ​

json
{
  "model": "qwen/qwen3.8-27b",
  "messages": [
    {
      "role": "user",
      "content": "Compare retrieval-augmented generation and fine-tuning."
    }
  ],
  "temperature": 1.0,
  "top_p": 0.95,
  "max_completion_tokens": 4096,
  "stream": false
}
FieldTypeRequiredDescription
modelstringYesqwen/qwen3.8-27b
messagesarrayYesConversation messages with text or image content blocks
temperaturenumberNoSampling temperature
top_pnumberNoNucleus sampling parameter
max_completion_tokensintegerNoOutput token budget, including reasoning
streambooleanNoReturn incremental output when true
toolsarrayNoFunction definitions available to the model
tool_choicestring or objectNoTool-selection behavior
reasoning_effortstringNoUpstream reasoning levels: xhigh, medium, low
chat_template_kwargsobjectNoThinking controls; pass inside extra_body when using the OpenAI Python SDK

Example Code Snippets ​

The production URL is available in the Digital Marketplace, under Documentation, in the plan associated with Qwen3.8 27B. Set API_URL to that URL and API_KEY to your API key in your local environment. Do not include /v1 twice when constructing request URLs.

How to retrieve the production URL

1. Text Reasoning ​

bash
curl "${API_URL}/v1/chat/completions" \
  -H "Authorization: Bearer ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen/qwen3.8-27b",
    "messages": [{"role": "user", "content": "Compare vector search and SQL search in three bullet points."}],
    "temperature": 1.0,
    "top_p": 0.95,
    "max_completion_tokens": 4096
  }'

2. Image Input ​

Replace IMAGE_URL with an accessible image URL or a base64 data URL such as data:image/jpeg;base64,....

bash
curl "${API_URL}/v1/chat/completions" \
  -H "Authorization: Bearer ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen/qwen3.8-27b",
    "messages": [{
      "role": "user",
      "content": [
        {"type": "image_url", "image_url": {"url": "IMAGE_URL"}},
        {"type": "text", "text": "Extract the key information from this chart."}
      ]
    }],
    "max_completion_tokens": 4096
  }'

3. Tool Calling ​

bash
curl "${API_URL}/v1/chat/completions" \
  -H "Authorization: Bearer ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen/qwen3.8-27b",
    "messages": [{"role": "user", "content": "What is the weather in Bern today?"}],
    "tools": [{
      "type": "function",
      "function": {
        "name": "get_weather",
        "description": "Get the current weather for a location.",
        "parameters": {
          "type": "object",
          "properties": {"location": {"type": "string"}},
          "required": ["location"]
        }
      }
    }],
    "tool_choice": "auto",
    "max_completion_tokens": 4096
  }'

If the response contains tool_calls, validate the requested function and arguments before executing it in your application. Append the assistant message to the conversation, then append a tool message containing the result and the matching tool_call_id. Submit the updated conversation to obtain the final answer. The model requests tool execution; it does not run the function itself.

4. Non-Thinking Mode ​

bash
curl "${API_URL}/v1/chat/completions" \
  -H "Authorization: Bearer ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen/qwen3.8-27b",
    "messages": [{"role": "user", "content": "Summarize retrieval-augmented generation in one sentence."}],
    "temperature": 0.7,
    "top_p": 0.8,
    "presence_penalty": 1.5,
    "top_k": 20,
    "max_completion_tokens": 512,
    "chat_template_kwargs": {"enable_thinking": false}
  }'

5. Responses API ​

The Responses API uses input instead of messages and max_output_tokens instead of max_completion_tokens. This example uses the same API_URL and API_KEY environment variables as the Chat Completions examples above.

bash
curl "${API_URL}/v1/responses" \
  -H "Authorization: Bearer ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen/qwen3.8-27b",
    "instructions": "Answer concisely in three bullet points.",
    "input": "Compare retrieval-augmented generation and fine-tuning.",
    "temperature": 1.0,
    "top_p": 0.95,
    "max_output_tokens": 4096,
    "stream": false
  }'

The JSON response contains an output array. Read the final answer from content blocks with type output_text within message items; reasoning items may precede the message. When using the OpenAI Python SDK, response.output_text collects the returned text without assuming a particular output item order.

Thinking is enabled by default, and max_output_tokens must accommodate both reasoning and the final answer. Increase the example's budget for complex tasks. Requests are stateless: include the full conversation context in input for follow-up requests; previous_response_id is not supported.

For streaming, multimodal input, and tool-calling examples, see the Responses API guide.

Migrating from Qwen3.6 ​

Qwen3.6 35B A3B reached end of life on 26 September 2026. Qwen3.8 27B is available in Preview from 29 September 2026.

Select the Qwen3.8 27B plan in the Digital Marketplace and use its production URL. Change the model ID from qwen/qwen3.6-35b-a3b to qwen/qwen3.8-27b in requests and client configuration.

Review sampling settings and reasoning-history handling when migrating. Qwen3.8 enables preserved thinking by default, and its recommended thinking-mode sampling settings differ from Qwen3.6. Revalidate prompts, tool workflows, and output budgets against the new model.