diff --git a/docs/edge/en/concepts/files.mdx b/docs/edge/en/concepts/files.mdx index af86baabe2..b052bdaed8 100644 --- a/docs/edge/en/concepts/files.mdx +++ b/docs/edge/en/concepts/files.mdx @@ -174,7 +174,7 @@ Different providers support different file types. CrewAI automatically formats f | **OpenAI** (completions API) | ✓ | | | | | | **OpenAI** (responses API) | ✓ | ✓ | ✓ | | | | **Anthropic** (claude-3.x) | ✓ | ✓ | | | | -| **Google Gemini** (gemini-1.5, 2.0, 2.5) | ✓ | ✓ | ✓ | ✓ | ✓ | +| **Google Gemini** (gemini-2.5, 3.x) | ✓ | ✓ | ✓ | ✓ | ✓ | | **AWS Bedrock** (claude-3) | ✓ | ✓ | | | | | **Azure OpenAI** (gpt-4o) | ✓ | | ✓ | | | diff --git a/docs/edge/en/concepts/llms.mdx b/docs/edge/en/concepts/llms.mdx index 02fb973140..9d674e3941 100644 --- a/docs/edge/en/concepts/llms.mdx +++ b/docs/edge/en/concepts/llms.mdx @@ -79,7 +79,7 @@ There are different places in CrewAI code where you can specify the model to use from crewai import LLM # Basic configuration - llm = LLM(model="provider/model-id") # e.g. gemini/gemini-3.6-flash + llm = LLM(model="provider/model-id") # e.g. gemini/gemini-3.7-flash # Advanced configuration with detailed parameters llm = LLM( @@ -481,7 +481,7 @@ In this section, you'll find detailed examples that help you select, configure, from crewai import LLM llm = LLM( - model="gemini/gemini-3.6-flash", + model="gemini/gemini-3.7-flash", api_key="your-api-key", # Or set GOOGLE_API_KEY/GEMINI_API_KEY ) ``` @@ -491,7 +491,7 @@ In this section, you'll find detailed examples that help you select, configure, from crewai import LLM llm = LLM( - model="gemini/gemini-3.6-flash", + model="gemini/gemini-3.7-flash", api_key="your-api-key", max_output_tokens=8192, stop_sequences=["END", "STOP"], @@ -518,7 +518,7 @@ In this section, you'll find detailed examples that help you select, configure, from crewai import LLM llm = LLM( - model="gemini/gemini-3.6-flash" + model="gemini/gemini-3.7-flash" ) ``` @@ -535,7 +535,7 @@ In this section, you'll find detailed examples that help you select, configure, from crewai import LLM llm = LLM( - model="gemini/gemini-3.6-flash", + model="gemini/gemini-3.7-flash", project="your-gcp-project-id", location="us-central1" # GCP region ) @@ -581,7 +581,7 @@ In this section, you'll find detailed examples that help you select, configure, from crewai import LLM llm = LLM( - model="gemini/gemini-3.6-flash" + model="gemini/gemini-3.7-flash" ) ``` diff --git a/docs/edge/en/concepts/memory.mdx b/docs/edge/en/concepts/memory.mdx index 349546d1c0..d23b478429 100644 --- a/docs/edge/en/concepts/memory.mdx +++ b/docs/edge/en/concepts/memory.mdx @@ -740,7 +740,7 @@ memory = Memory(llm="anthropic/claude-3-haiku-20240307") memory = Memory(llm="ollama/llama3.2") # Use Google Gemini -memory = Memory(llm="gemini/gemini-2.0-flash") +memory = Memory(llm="gemini/gemini-3.7-flash") # Pass a pre-configured LLM instance with custom settings llm = LLM(model="gpt-4o", temperature=0) diff --git a/docs/edge/en/guides/crews/first-crew.mdx b/docs/edge/en/guides/crews/first-crew.mdx index 9665a293aa..d2aeca846b 100644 --- a/docs/edge/en/guides/crews/first-crew.mdx +++ b/docs/edge/en/guides/crews/first-crew.mdx @@ -77,7 +77,7 @@ Replace the generated `agents/researcher.jsonc` file and add `agents/analyst.jso } ``` -Replace `provider/model-id` with the model you use, for example `openai/gpt-4o`, `anthropic/claude-sonnet-4-6`, or `gemini/gemini-2.0-flash-001`. +Replace `provider/model-id` with the model you use, for example `openai/gpt-4o`, `anthropic/claude-sonnet-4-6`, or `gemini/gemini-3.7-flash`. ## Step 3: Define Tasks and Crew Settings diff --git a/docs/edge/en/guides/flows/first-flow.mdx b/docs/edge/en/guides/flows/first-flow.mdx index d26a1eb2d5..702fca2bfd 100644 --- a/docs/edge/en/guides/flows/first-flow.mdx +++ b/docs/edge/en/guides/flows/first-flow.mdx @@ -136,7 +136,7 @@ Now, let's configure the content writer crew with JSONC. We'll set up two specia } ``` -Replace `provider/model-id` with the model you use, for example `openai/gpt-4o`, `gemini/gemini-2.0-flash-001`, or `anthropic/claude-sonnet-4-6`. +Replace `provider/model-id` with the model you use, for example `openai/gpt-4o`, `gemini/gemini-3.7-flash`, or `anthropic/claude-sonnet-4-6`. 3. Create `src/guide_creator_flow/crews/content_crew/crew.jsonc`: @@ -483,7 +483,7 @@ Flows allow you to make direct calls to language models when you need simple, st ```python llm = LLM( - model="model-id-here", # gpt-4o, gemini-2.0-flash, anthropic/claude... + model="model-id-here", # gpt-4o, gemini-3.7-flash, anthropic/claude... response_format=GuideOutline ) response = llm.call(messages=messages) diff --git a/docs/edge/en/learn/litellm-removal-guide.mdx b/docs/edge/en/learn/litellm-removal-guide.mdx index a4fe1de1e8..099ba684c0 100644 --- a/docs/edge/en/learn/litellm-removal-guide.mdx +++ b/docs/edge/en/learn/litellm-removal-guide.mdx @@ -176,7 +176,7 @@ grep -r "llm:" --include="*.yaml" . # llm = LLM(model="mistral/mistral-large-latest") # After (Native): - llm = LLM(model="gemini/gemini-2.0-flash") + llm = LLM(model="gemini/gemini-3.7-flash") ``` ```bash @@ -399,7 +399,7 @@ llm = LLM(model="anthropic/claude-haiku-3-5") # Fast & affordable # Together AI → OpenAI or Gemini # llm = LLM(model="together_ai/meta-llama/Meta-Llama-3.1-70B") llm = LLM(model="openai/gpt-4o") # High quality -llm = LLM(model="gemini/gemini-2.0-flash") # Fast & capable +llm = LLM(model="gemini/gemini-3.7-flash") # Fast & capable # Mistral → Anthropic or OpenAI # llm = LLM(model="mistral/mistral-large-latest") diff --git a/docs/edge/en/learn/llm-connections.mdx b/docs/edge/en/learn/llm-connections.mdx index 2b7a5d278b..b24995c015 100644 --- a/docs/edge/en/learn/llm-connections.mdx +++ b/docs/edge/en/learn/llm-connections.mdx @@ -141,7 +141,7 @@ You can connect to OpenAI-compatible LLMs using either environment variables or # Example using Gemini's OpenAI-compatible API. os.environ["OPENAI_API_KEY"] = "your-gemini-key" # Should start with AIza... os.environ["OPENAI_API_BASE"] = "https://generativelanguage.googleapis.com/v1beta/openai/" - os.environ["OPENAI_MODEL_NAME"] = "openai/gemini-2.0-flash" # Add your Gemini model here, under openai/ + os.environ["OPENAI_MODEL_NAME"] = "openai/gemini-3.7-flash" # Add your Gemini model here, under openai/ ``` @@ -159,7 +159,7 @@ You can connect to OpenAI-compatible LLMs using either environment variables or ```python Google # Example using Gemini's OpenAI-compatible API llm = LLM( - model="openai/gemini-2.0-flash", + model="openai/gemini-3.7-flash", base_url="https://generativelanguage.googleapis.com/v1beta/openai/", api_key="your-gemini-key", # Should start with AIza... ) diff --git a/docs/edge/en/learn/llm-selection-guide.mdx b/docs/edge/en/learn/llm-selection-guide.mdx index 30a85462b8..1c66ff0d39 100644 --- a/docs/edge/en/learn/llm-selection-guide.mdx +++ b/docs/edge/en/learn/llm-selection-guide.mdx @@ -147,7 +147,7 @@ Planning agents benefit from reasoning models that can handle complex strategic from crewai import Agent, Task, Crew, LLM # High-capability reasoning model for strategic planning -manager_llm = LLM(model="gemini-2.5-flash-preview-05-20", temperature=0.1) +manager_llm = LLM(model="gemini-3.7-flash") # Creative model for content generation content_llm = LLM(model="claude-3-5-sonnet-20241022", temperature=0.7) @@ -412,7 +412,7 @@ Rather than repeating the strategic framework, here's a tactical checklist for i # Manager or coordination agents manager_agent = Agent( role="Project Manager", - llm=LLM(model="gemini-2.5-flash-preview-05-20"), # Premium for coordination + llm=LLM(model="gemini-3.7-flash"), # Premium for coordination # ... rest of config ) diff --git a/lib/cli/src/crewai_cli/constants.py b/lib/cli/src/crewai_cli/constants.py index c587147b3f..e7ab664bb2 100644 --- a/lib/cli/src/crewai_cli/constants.py +++ b/lib/cli/src/crewai_cli/constants.py @@ -177,20 +177,17 @@ "claude-haiku-4-5-20251001", ], "gemini": [ - "gemini/gemini-3-pro-preview", - "gemini/gemini-1.5-flash", - "gemini/gemini-1.5-pro", - "gemini/gemini-2.0-flash-lite-001", - "gemini/gemini-2.0-flash-001", - "gemini/gemini-2.0-flash-thinking-exp-01-21", - "gemini/gemini-2.5-flash-preview-04-17", - "gemini/gemini-2.5-pro-exp-03-25", - "gemini/gemini-gemma-2-9b-it", - "gemini/gemini-gemma-2-27b-it", - "gemini/gemma-3-1b-it", - "gemini/gemma-3-4b-it", - "gemini/gemma-3-12b-it", - "gemini/gemma-3-27b-it", + # https://ai.google.dev/gemini-api/docs/models + "gemini/gemini-3.7-flash", + "gemini/gemini-3.6-flash", + "gemini/gemini-3.1-pro-preview", + "gemini/gemini-3.5-flash-lite", + "gemini/gemini-3.1-flash-lite", + "gemini/gemini-2.5-flash", + "gemini/gemini-2.5-pro", + # https://ai.google.dev/gemma/docs/core/gemma_on_gemini_api + "gemma-4-31b-it", + "gemma-4-26b-a4b-it", ], "nvidia_nim": [ "nvidia_nim/nvidia/mistral-nemo-minitron-8b-8k-instruct", diff --git a/lib/crewai/src/crewai/llms/constants.py b/lib/crewai/src/crewai/llms/constants.py index 20697f6a53..41aec7074b 100644 --- a/lib/crewai/src/crewai/llms/constants.py +++ b/lib/crewai/src/crewai/llms/constants.py @@ -213,8 +213,19 @@ ] GeminiModels: TypeAlias = Literal[ + "gemini-3.7-flash", + "gemini-3.6-flash", + "gemini-3.5-flash", + "gemini-3.1-pro-preview", "gemini-3-pro-preview", "gemini-3-flash-preview", + "gemini-3.5-flash-lite", + "gemini-3.1-flash-lite", + "gemini-3-pro-image", + "gemini-3.1-flash-image", + "gemini-3.1-flash-lite-image", + "gemini-3.1-flash-live-preview", + "gemini-3.1-flash-tts-preview", "gemini-2.5-pro", "gemini-2.5-pro-preview-03-25", "gemini-2.5-pro-preview-05-06", @@ -259,6 +270,8 @@ "gemini-robotics-er-1.5-preview", "gemini-gemma-2-27b-it", "gemini-gemma-2-9b-it", + "gemma-4-31b-it", + "gemma-4-26b-a4b-it", "gemma-3-1b-it", "gemma-3-4b-it", "gemma-3-12b-it", @@ -268,8 +281,18 @@ "learnlm-2.0-flash-experimental", ] GEMINI_MODELS: list[GeminiModels] = [ + "gemini-3.7-flash", + "gemini-3.6-flash", + "gemini-3.5-flash", + "gemini-3.1-pro-preview", "gemini-3-pro-preview", "gemini-3-flash-preview", + "gemini-3.5-flash-lite", + "gemini-3.1-flash-lite", + "gemini-3-pro-image", + "gemini-3.1-flash-image", + "gemini-3.1-flash-live-preview", + "gemini-3.1-flash-tts-preview", "gemini-2.5-pro", "gemini-2.5-pro-preview-03-25", "gemini-2.5-pro-preview-05-06", @@ -314,6 +337,8 @@ "gemini-robotics-er-1.5-preview", "gemini-gemma-2-27b-it", "gemini-gemma-2-9b-it", + "gemma-4-31b-it", + "gemma-4-26b-a4b-it", "gemma-3-1b-it", "gemma-3-4b-it", "gemma-3-12b-it",