Skip to content

A programming framework for agentic AI

feat: add qwen3 support (#6528)

Miroslav Pokrovskiiaa22b622d013
diff --git a/python/packages/autogen-ext/src/autogen_ext/models/ollama/_model_info.py b/python/packages/autogen-ext/src/autogen_ext/models/ollama/_model_info.py
index 158a0008f..6ab239c95 100644
--- a/python/packages/autogen-ext/src/autogen_ext/models/ollama/_model_info.py
+++ b/python/packages/autogen-ext/src/autogen_ext/models/ollama/_model_info.py
@@ -258,6 +258,13 @@ _MODEL_INFO: Dict[str, ModelInfo] = {
"family": ModelFamily.UNKNOWN,
"structured_output": True,
},
+ "qwen3": {
+ "vision": False,
+ "function_calling": True,
+ "json_output": True,
+ "family": ModelFamily.UNKNOWN,
+ "structured_output": True,
+ },
"snowflake-arctic-embed": {
"vision": False,
"function_calling": False,
@@ -351,6 +358,15 @@ _MODEL_TOKEN_LIMITS: Dict[str, int] = {
"qwen2.5-coder:0.5b": 32768,
"qwen2.5-coder:1.5b": 32768,
"qwen2.5-coder:3b": 32768,
+ "qwen3": 40960,
+ "qwen3:0.6b": 40960,
+ "qwen3:1.7b": 40960,
+ "qwen3:4b": 40960,
+ "qwen3:8b": 40960,
+ "qwen3:14b": 40960,
+ "qwen3:30b": 40960,
+ "qwen3:32b": 40960,
+ "qwen3:235b": 40960,
"snowflake-arctic-embed": 512,
"starcoder2": 16384,
"tinyllama": 2048,
diff --git a/python/packages/autogen-ext/tests/models/test_ollama_chat_completion_client.py b/python/packages/autogen-ext/tests/models/test_ollama_chat_completion_client.py
index c020c6f93..de2db33dd 100644
--- a/python/packages/autogen-ext/tests/models/test_ollama_chat_completion_client.py
+++ b/python/packages/autogen-ext/tests/models/test_ollama_chat_completion_client.py
@@ -570,7 +570,7 @@ async def test_ollama_create_structured_output(model: str, ollama_client: Ollama
@pytest.mark.asyncio
[email protected]("model", ["qwen2.5:0.5b", "llama3.2:1b"])
[email protected]("model", ["qwen2.5:0.5b", "llama3.2:1b", "qwen3:0.6b"])
async def test_ollama_create_tools(model: str, ollama_client: OllamaChatCompletionClient) -> None:
def add(x: int, y: int) -> str:
return str(x + y)
@@ -653,7 +653,7 @@ async def test_ollama_create_structured_output_with_tools(
@pytest.mark.asyncio
[email protected]("model", ["qwen2.5:0.5b", "llama3.2:1b"])
[email protected]("model", ["qwen2.5:0.5b", "llama3.2:1b", "qwen3:0.6b"])
async def test_ollama_create_stream_tools(model: str, ollama_client: OllamaChatCompletionClient) -> None:
def add(x: int, y: int) -> str:
return str(x + y)