Назад к моделям

Qwen3 Coder 30B

qwenqwen/qwen3-coder-30b

Гид по API

Chat completion

Используйте стандартный OpenAI-совместимый endpoint chat completions для code edits, тестов и объяснений. Делайте prompt конкретным: файл, падающий assertion или API contract.

cURL
curl https://api.therouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $THEROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen/qwen3-coder-30b",
    "messages": [
      {"role": "system", "content": "You are a senior software engineer. Return concise patches and tests."},
      {"role": "user", "content": "Write unit tests for this parser and cover edge cases: ..."}
    ],
    "temperature": 0.7,
    "max_tokens": 4096
  }'

Стриминг

Включайте streaming для IDE assistants и длинных code explanations, чтобы пользователь быстро видел прогресс.

cURL
curl https://api.therouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $THEROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen/qwen3-coder-30b",
    "messages": [{"role": "user", "content": "Explain why this CI job is flaky and propose a minimal fix."}],
    "stream": true
  }'

Tool calling

Используйте tools для repo search, lint/test execution и patch application вместо того, чтобы модель угадывала состояние проекта.

cURL
curl https://api.therouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $THEROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen/qwen3-coder-30b",
    "messages": [{"role": "user", "content": "Find the file that defines the retry policy."}],
    "tools": [{
      "type": "function",
      "function": {
        "name": "repo_search",
        "description": "Search repository files by query",
        "parameters": {"type": "object", "properties": {"query": {"type": "string"}}, "required": ["query"]}
      }
    }],
    "tool_choice": "auto"
  }'

Структурированный JSON

Используйте response_format для machine-readable review output, triage labels или test plans.

cURL
curl https://api.therouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $THEROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen/qwen3-coder-30b",
    "messages": [
      {"role": "system", "content": "Return JSON with keys risk, files, tests."},
      {"role": "user", "content": "Review this diff: ..."}
    ],
    "response_format": {"type": "json_object"}
  }'
Реестр фактов — каждая утверждаемая величина имеет источник
источникURLполучено
Архитектураhuggingface.co ↗2026-06-03проверено
Параметрыhuggingface.co ↗2026-06-03проверено
Слоиhuggingface.co ↗2026-06-03проверено
Экспертыhuggingface.co ↗2026-06-03проверено
Нативный контекстhuggingface.co ↗2026-06-03проверено
Режим выводаhuggingface.co ↗2026-06-03проверено
Agentic Coding / Browser-Use / Foundational Codinghuggingface.co/Qwen ↗2026-06-03проверено
SWE-Bench Verifiedqwenlm.github.io ↗2026-06-03неизвестно
Qwen выпускает Qwen3-Coder-30B-A3B-Instructhuggingface.co/Qwen ↗2026-06-03проверено
Qwen запускает семейство Qwen3-Coder и Qwen Codeqwenlm.github.io ↗2026-06-03проверено
Чем qwen/qwen3-coder-30b отличается от qwen/qwen3-coder-480b?huggingface.co ↗2026-06-03к проверке
Поддерживает ли Qwen3-Coder-30B tool calling?huggingface.co ↗2026-06-03к проверке
Возвращает ли она hidden reasoning или блоки <think>?huggingface.co ↗2026-06-03к проверке
Можно ли использовать её из Cursor, Cline или другого OpenAI-compatible клиента?qwenlm.github.io ↗2026-06-03к проверке
262K context — это гарантия TheRouter?huggingface.co ↗2026-06-03к проверке
Помощь и контакты