A programming framework for agentic AI
Add gemini 2.5 fash compatibility (#6574)
Damien Menigauxc6c8693b2c7e
diff --git a/python/packages/autogen-core/src/autogen_core/models/_model_client.py b/python/packages/autogen-core/src/autogen_core/models/_model_client.pyindex 7c8519ddf..1c1abaea1 100644--- a/python/packages/autogen-core/src/autogen_core/models/_model_client.py+++ b/python/packages/autogen-core/src/autogen_core/models/_model_client.py@@ -31,6 +31,7 @@ class ModelFamily:GEMINI_1_5_PRO = "gemini-1.5-pro"GEMINI_2_0_FLASH = "gemini-2.0-flash"GEMINI_2_5_PRO = "gemini-2.5-pro"+ GEMINI_2_5_FLASH = "gemini-2.5-flash"CLAUDE_3_HAIKU = "claude-3-haiku"CLAUDE_3_SONNET = "claude-3-sonnet"CLAUDE_3_OPUS = "claude-3-opus"@@ -64,6 +65,7 @@ class ModelFamily:"gemini-1.5-pro","gemini-2.0-flash","gemini-2.5-pro",+ "gemini-2.5-flash"# anthropic_models"claude-3-haiku","claude-3-sonnet",@@ -107,6 +109,7 @@ class ModelFamily:ModelFamily.GEMINI_1_5_PRO,ModelFamily.GEMINI_2_0_FLASH,ModelFamily.GEMINI_2_5_PRO,+ ModelFamily.GEMINI_2_5_FLASH,)@staticmethoddiff --git a/python/packages/autogen-ext/src/autogen_ext/models/openai/_model_info.py b/python/packages/autogen-ext/src/autogen_ext/models/openai/_model_info.pyindex c5b8b0495..4be15ae08 100644--- a/python/packages/autogen-ext/src/autogen_ext/models/openai/_model_info.py+++ b/python/packages/autogen-ext/src/autogen_ext/models/openai/_model_info.py@@ -308,6 +308,14 @@ _MODEL_INFO: Dict[str, ModelInfo] = {"structured_output": True,"multiple_system_messages": False,},+ "gemini-2.5-flash-preview-05-20": {+ "vision": True,+ "function_calling": True,+ "json_output": True,+ "family": ModelFamily.GEMINI_2_5_FLASH,+ "structured_output": True,+ "multiple_system_messages": False,+ },"claude-3-haiku-20240307": {"vision": True,"function_calling": True,@@ -422,6 +430,7 @@ _MODEL_TOKEN_LIMITS: Dict[str, int] = {"gemini-2.0-flash": 1048576,"gemini-2.0-flash-lite-preview-02-05": 1048576,"gemini-2.5-pro-preview-03-25": 2097152,+ "gemini-2.5-flash-preview-05-20": 1048576,"claude-3-haiku-20240307": 50000,"claude-3-sonnet-20240229": 40000,"claude-3-opus-20240229": 20000,