Model comparison · 2026-10-26
Nanbeige4.2 3B vs Qwen 3.8 27B: two Turkey-hosted models
Compare the Turkey-hosted Nanbeige4.2 3B and Qwen 3.8 27B on LLMTR: price, context window, JSON schema output, tool calling and thinking.
Short answer: Nanbeige4.2 3B for short jobs, Qwen 3.8 27B for JSON schema and long documents
LLMTR is a gateway that gives access to language models from different providers through one OpenAI-compatible API. Nanbeige4.2 3B (llmtr/nanbeige4-2-3b) and Qwen 3.8 27B (llmtr/qwen3-8-27b) are called on the /v1/chat/completions endpoint at https://llmtr.com/v1 with the same API key from your llmtr.com account. To run short summaries, classification and tool-calling flows with few steps on a low budget, use the llmtr/nanbeige4-2-3b id on LLMTR. When you need JSON output with fixed fields and types, have to force a specific tool, or have a long document that does not fit in 32,768 tokens, call Qwen 3.8 27B with the llmtr/qwen3-8-27b id.
Nanbeige4.2 3B and Qwen 3.8 27B are both hosted in Turkey on LLMTR; on both rows requests are never forwarded to a third-party provider. So hosting does not change the choice in this comparison; price, context window and request shape do. Nanbeige4.2 3B is an Apache 2.0 open-weight model from Nanbeige LLM Lab, and according to its model card it has 3 billion parameters excluding embeddings. The model card describes a longer context; on LLMTR the row's window is 32,768 tokens.
Nanbeige4.2 3B or Qwen 3.8 27B?
Four questions decide it: does the prompt fit in 32,768 tokens, must the output follow a JSON schema, do you need to force a specific tool in an agent step, and what is the budget? We make no claim about quality; compare the two models on your own examples.
The table shows both rows with the values in the LLMTR catalog and documentation as of 26 October 2026; prices are per 1M tokens.
| Property | Nanbeige4.2 3B | Qwen 3.8 27B |
|---|---|---|
| Model id | llmtr/nanbeige4-2-3b | llmtr/qwen3-8-27b |
| Price (input / output) | $1.00 / $3.00 | $5.00 / $7.00 |
| Cache read | $0.25 | $1.25 |
| Context window | 32,768 tokens, shared by the prompt and the answer | 262,144 tokens, shared by the prompt and the answer |
| Input | text only | text only |
| JSON output | no; response_format returns 400, use tool calling | json_object and json_schema |
| tool_choice | auto only | auto, required, none or a function chosen by name |
| Thinking on a tool request | switched on when you send tools | stays off unless you turn it on |
| Thinking | off by default; :think or "reasoning": true | off by default; :think or "reasoning": true, with thinking on max_tokens at least 4,096 |
| reasoning_effort | not supported, returns 400 | not supported, returns 400 |
| Hosting | Turkey | Turkey |
What does the same extraction job cost on each model?
Say you extract the company name, the date and the grand total from a 6,000-token batch of invoices and the output is 500 tokens. On Qwen 3.8 27B this request costs $0.0335 and the result follows the JSON schema you pass in response_format. On Nanbeige4.2 3B the same job runs through tool calling; because you send tools, thinking is switched on for that request and the thinking tokens also count as output. If the 500 output tokens include the thinking, the request costs $0.0075. Over 1,000 requests the total is $33.50 on Qwen 3.8 27B and $7.50 on Nanbeige4.2 3B. A 100,000-token contract does not fit in Nanbeige4.2 3B's window; on Qwen 3.8 27B its input alone costs $0.50.
The Python example below sends the same invoice to both models: a JSON schema through response_format to Qwen 3.8 27B, and a function carrying the same schema to Nanbeige4.2 3B. No tool_choice is sent to Nanbeige4.2 3B, so it stays at auto; if no tool call comes back, the example prints finish_reason and the answer. Token counts differ from model to model; compare the results on your own documents.
OpenAI Python SDK example that extracts fields from the same invoice with json_schema on Qwen 3.8 27B and with tool calling on Nanbeige4.2 3B, both through https://llmtr.com/v1/chat/completions.
import json
import os
from openai import OpenAI
# Nanbeige4.2 3B answers slowly: keep the client timeout at 300 seconds or more.
client = OpenAI(base_url="https://llmtr.com/v1", api_key=os.environ["LLMTR_API_KEY"], timeout=300.0)
FIELDS = {
"type": "object",
"additionalProperties": False,
"required": ["firma", "tarih", "genel_toplam"],
"properties": {
"firma": {"type": "string"},
"tarih": {"type": "string"},
"genel_toplam": {"type": "number"},
},
}
invoice = "Fatura: Örnek Lojistik, 14.10.2026, ara toplam 1250,00 TL, KDV 250,00 TL, genel toplam 1500,00 TL."
# Qwen 3.8 27B: JSON Schema output through response_format.
qwen = client.chat.completions.create(
model="llmtr/qwen3-8-27b",
messages=[
{"role": "system", "content": "Faturadaki firma adını, tarihi ve genel toplamı çıkar."},
{"role": "user", "content": invoice},
],
response_format={"type": "json_schema", "json_schema": {"name": "fatura", "strict": True, "schema": FIELDS}},
max_tokens=1024,
)
print("llmtr/qwen3-8-27b", json.loads(qwen.choices[0].message.content), qwen.usage.prompt_tokens, qwen.usage.completion_tokens)
# Nanbeige4.2 3B: no response_format; the same schema as a tool, tool_choice left at auto.
tools = [{"type": "function", "function": {"name": "fatura_kaydet", "description": "Faturadan çıkarılan alanları kaydeder.", "parameters": FIELDS}}]
nanbeige = client.chat.completions.create(
model="llmtr/nanbeige4-2-3b",
messages=[
{"role": "system", "content": "Faturadaki firma adını, tarihi ve genel toplamı fatura_kaydet aracıyla kaydet."},
{"role": "user", "content": invoice},
],
tools=tools,
max_tokens=2048,
)
calls = nanbeige.choices[0].message.tool_calls or []
for call in calls:
print("llmtr/nanbeige4-2-3b", json.loads(call.function.arguments), nanbeige.usage.prompt_tokens, nanbeige.usage.completion_tokens)
if not calls:
print("llmtr/nanbeige4-2-3b", nanbeige.choices[0].finish_reason, nanbeige.choices[0].message.content)
Tool calling and thinking: what changes when you move?
On Qwen 3.8 27B tool_choice accepts auto, required, none and a single function chosen by name, and sending tools does not switch thinking on. On Nanbeige4.2 3B tool calls are reliable only with thinking on, so thinking is switched on for any request that carries tools. That changes two things: on Nanbeige4.2 3B tool_choice is auto only, and required or a function chosen by name returns 400; to switch tools off you remove the tools field instead of sending none. A request that turns thinking off with :fast or "reasoning": false while sending tools also returns 400.
On both models thinking is off by default and turned on with :think or "reasoning": true; with thinking on, the reasoning comes back in the reasoning_content field and is spent from the max_tokens budget. Qwen 3.8 27B's card tells you to give max_tokens at least 4,096 with thinking on. On Nanbeige4.2 3B, without max_tokens the answer stops at 4,096 tokens. Nanbeige4.2 3B generates answers slowly: use streaming and set the client timeout to at least 300 seconds.
Which one when?
The choices below follow from the differences in price, context window and request shape; both models are hosted in Turkey, so hosting does not change the choice. Compare output quality on your own examples.
- Short summaries, classification and tool-calling flows with few steps on a low budget: Nanbeige4.2 3B on LLMTR, llmtr/nanbeige4-2-3b, at $1.00 input and $3.00 output per 1M tokens.
- Extraction that needs JSON with fixed field names and types: Qwen 3.8 27B, llmtr/qwen3-8-27b, with json_schema in response_format.
- A long document or long conversation that does not fit in 32,768 tokens: Qwen 3.8 27B, with a 262,144-token context window.
- An agent step where you must force a specific tool from the request: Qwen 3.8 27B, with tool_choice set to required or a function chosen by name; Nanbeige4.2 3B takes auto only.
- High-volume short jobs that repeat the same long system message: Nanbeige4.2 3B; tokens reported as cached_tokens cost $0.25 per 1M tokens, against $1.25 on Qwen 3.8 27B.
Moving from Nanbeige4.2 3B to Qwen 3.8 27B
Set the model id to llmtr/qwen3-8-27b; the tool definitions you wrote for Nanbeige4.2 3B work as they are. If you only want structured data rather than a tool call, turn the function into a json_schema inside response_format. In the other direction, from Qwen 3.8 27B to Nanbeige4.2 3B, remove response_format, move the schema into a function's parameters field, leave tool_choice at auto and check that the prompt fits in 32,768 tokens.
Comparing Nanbeige4.2 3B and Qwen 3.8 27B on the same extraction job
Send the same document to both models, json_schema to Qwen 3.8 27B and a function carrying the same schema to Nanbeige4.2 3B, then compare the result, token usage and cost.
- Key. Create an API key on llmtr.com and top up your balance under Dashboard > Billing.
- Same document. Send your own documents with both model ids to the https://llmtr.com/v1/chat/completions endpoint; on Nanbeige4.2 3B use a tool instead of response_format.
- Choice. Compare the results, token counts, cost and prompt length, then choose the model id.
Frequently asked questions
Are both models hosted in Turkey?
Yes. Nanbeige4.2 3B and Qwen 3.8 27B are both hosted in Turkey on LLMTR, and requests are never forwarded to a third-party provider. The choice comes down to price, context window, JSON output and tool_choice.
Can a JSON schema be used on Nanbeige4.2 3B?
Not through response_format; the request returns 400 invalid_request. Put the schema in a function's parameters field and use tool calling. To get JSON that follows a schema through response_format, use Qwen 3.8 27B.
What does a request with 6,000 input and 500 output tokens cost?
$0.0335 on Qwen 3.8 27B and $0.0075 on Nanbeige4.2 3B. On Nanbeige4.2 3B, when tools are sent, the thinking tokens also count as output.