Qwen3-Coder-Next is an open-weight causal language model designed specifically for coding agents and local development. It uses an 80B sparse MoE architecture with only 3B activated parameters, aiming to deliver strong coding performance at much lower inference cost than larger active-parameter models. Qwen describes it as strong in long-horizon reasoning, complex tool usage, and recovery from execution failures, which makes it suitable for real-world agentic coding workflows.
How to get started
pip install requestsCode language: Bash (bash)
import requests
api_url = "https://api.regolo.ai/v1/chat/completions"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_REGOLO_KEY"
}
data = {
"model": "qwen3-coder-next",
"messages": [
{
"role": "user",
"content": "Write a Python function to calculate the factorial of a number using recursion."
}
]
}
response = requests.post(api_url, headers=headers, json=data)
print(response.json())Code language: Python (python)
Output
{
"id": "chatcmpl-a980f4607881191f",
"created": 1770292706,
"model": "hosted_vllm/Qwen/Qwen3-Coder-Next-FP8",
"object": "chat.completion",
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "Here's a Python function that calculates the factorial of a number using recursion:\n\n```python\ndef factorial(n):\n \"\"\"\n Calculate the factorial of a non-negative integer n using recursion.\n \n Args:\n n (int): A non-negative integer\n \n Returns:\n int: The factorial of n (n!)\n \n Raises:\n ValueError: If n is negative\n \"\"\"\n # Handle invalid input\n if n < 0:\n raise ValueError(\"Factorial is not defined for negative numbers\")\n \n # Base case: factorial of 0 or 1 is 1\n if n == 0 or n == 1:\n return 1\n \n # Recursive case: n! = n * (n-1)!\n return n * factorial(n - 1)\n```\n\n**How it works:**\n\n1. **Base case**: When `n` is 0 or 1, the function returns 1 (since 0! = 1 and 1! = 1)\n\n2. **Recursive case**: For `n > 1`, the function calls itself with `n-1` and multiplies the result by `n`\n\n**Example usage:**\n\n```python\nprint(factorial(5)) # Output: 120\nprint(factorial(0)) # Output: 1\nprint(factorial(3)) # Output: 6\n```\n\nThe recursion unfolds like this for `factorial(5)`:\n- `factorial(5)` = 5 × `factorial(4)`\n- `factorial(4)` = 4 × `factorial(3)`\n- `factorial(3)` = 3 × `factorial(2)`\n- `factorial(2)` = 2 × `factorial(1)`\n- `factorial(1)` = 1 (base case)\n\nThen it unwinds: 2×1=2, 3×2=6, 4×6=24, 5×24=120",
"role": "assistant"
},
"provider_specific_fields": {
"stop_reason": null,
"token_ids": null
}
}
],
"usage": {
"completion_tokens": 424,
"prompt_tokens": 22,
"total_tokens": 446
}
}Code language: JSON / JSON with Comments (json)
Applications & Use Cases
- AI coding agents for autonomous or semi-autonomous software tasks.
- Local development assistants for CLI and IDE-based workflows.
- Long-context code understanding across large repositories and multi-file projects.
- Tool-using developer copilots that need structured execution and feedback loops.
- Software engineering workflows that require recovery from failed runs or broken execution paths.
- Integration into coding environments such as Claude Code, Qwen Code, Qoder, Kilo, Trae, and Cline.