From 30a1896d7dfe30bfa498b8f76a63d97ad1c62a4f Mon Sep 17 00:00:00 2001 From: Luis Tomas Bolivar Date: Fri, 10 Jul 2026 12:05:58 +0200 Subject: [PATCH 1/3] feat: bump default Gemini model from 2.5-flash to 3.5-flash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Gemini 3.5 Flash (GA, May 2026) offers significantly better agentic and coding performance — 83.6% on MCP Atlas (vs 62% for 3 Flash), beats 3.1 Pro on Terminal-Bench and Finance Agent benchmarks, and runs ~4x faster than other frontier models. Updated across config, deployment manifests (Cloud Run, OpenShift, Podman), and documentation. Co-Authored-By: Claude Opus 4.6 (1M context) --- .env.example | 6 +++--- CLAUDE.md | 4 ++-- EXTERNAL_SERVICES.md | 2 +- deploy/cloudrun/README.md | 2 +- deploy/cloudrun/service.yaml | 2 +- deploy/openshift/README.md | 4 ++-- deploy/openshift/values.yaml | 4 ++-- deploy/podman/lightspeed-agent-configmap.yaml | 2 +- docs/api.md | 2 +- docs/configuration.md | 8 ++++---- docs/troubleshooting.md | 2 +- src/lightspeed_agent/config/settings.py | 2 +- src/lightspeed_agent/core/agent.py | 2 +- 13 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.env.example b/.env.example index e4453134..4263c9ac 100644 --- a/.env.example +++ b/.env.example @@ -10,7 +10,7 @@ # LLM_PROVIDER=gemini # Model name (works with both providers). For litellm, use "provider/model" format -# (e.g., "openai/gpt-4o", "vertex_ai/gemini-2.5-flash"). For gemini, any provider/ +# (e.g., "openai/gpt-4o", "vertex_ai/gemini-3.5-flash"). For gemini, any provider/ # prefix is stripped automatically. Falls back to GEMINI_MODEL when not set. # LLM_MODEL= @@ -39,8 +39,8 @@ GOOGLE_CLOUD_LOCATION=global # Path to a service account JSON key file. Uses Application Default Credentials (ADC). # GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json -# Model to use (default: gemini-2.5-flash) -GEMINI_MODEL=gemini-2.5-flash +# Model to use (default: gemini-3.5-flash) +GEMINI_MODEL=gemini-3.5-flash # Gemini HTTP retries (google-genai SDK: exponential backoff + jitter for 429/408/5xx) # See: https://cloud.google.com/vertex-ai/generative-ai/docs/retry-strategy diff --git a/CLAUDE.md b/CLAUDE.md index 38241234..06c6c128 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ## Project Overview -Red Hat Lightspeed Agent for Google Cloud — an A2A-ready (Agent-to-Agent protocol) AI agent providing access to Red Hat Insights, built on Google Agent Development Kit (ADK), Gemini 2.5 Flash, and a Red Hat Lightspeed MCP server sidecar. Integrates with Google Cloud Marketplace for provisioning, billing, and metering. +Red Hat Lightspeed Agent for Google Cloud — an A2A-ready (Agent-to-Agent protocol) AI agent providing access to Red Hat Insights, built on Google Agent Development Kit (ADK), Gemini 3.5 Flash, and a Red Hat Lightspeed MCP server sidecar. Integrates with Google Cloud Marketplace for provisioning, billing, and metering. ## Common Commands @@ -140,5 +140,5 @@ CORS → body size limits → security headers → rate limiting (60 req/min, 10 All configuration is via environment variables, managed through Pydantic settings in `config/settings.py`. See `.env.example` for the complete list (30+ vars) and `docs/configuration.md` for detailed documentation. -Key variables: `GOOGLE_API_KEY` (or Vertex AI), `GEMINI_MODEL` (default: `gemini-2.5-flash`), `DATABASE_URL`, `SESSION_DATABASE_URL`, `MCP_TRANSPORT_MODE`, `MCP_SERVER_URL`, `RED_HAT_SSO_CLIENT_ID`/`SECRET`. Dev-only bypasses: `SKIP_JWT_VALIDATION`, `SKIP_DCR_JWT_VALIDATION`, `SKIP_ORDER_VALIDATION`. +Key variables: `GOOGLE_API_KEY` (or Vertex AI), `GEMINI_MODEL` (default: `gemini-3.5-flash`), `DATABASE_URL`, `SESSION_DATABASE_URL`, `MCP_TRANSPORT_MODE`, `MCP_SERVER_URL`, `RED_HAT_SSO_CLIENT_ID`/`SECRET`. Dev-only bypasses: `SKIP_JWT_VALIDATION`, `SKIP_DCR_JWT_VALIDATION`, `SKIP_ORDER_VALIDATION`. diff --git a/EXTERNAL_SERVICES.md b/EXTERNAL_SERVICES.md index 96c1dfbe..fd49c31e 100644 --- a/EXTERNAL_SERVICES.md +++ b/EXTERNAL_SERVICES.md @@ -13,7 +13,7 @@ The agent uses Google Gemini models by default, but Vertex AI supports deploying | Setting | Default | Description | |---------|---------|-------------| -| `GEMINI_MODEL` | `gemini-2.5-flash` | Model used for agent responses | +| `GEMINI_MODEL` | `gemini-3.5-flash` | Model used for agent responses | | `GOOGLE_GENAI_USE_VERTEXAI` | `false` | Switch between AI Studio and Vertex AI | | `GOOGLE_CLOUD_LOCATION` | `us-central1` | Region for Vertex AI | diff --git a/deploy/cloudrun/README.md b/deploy/cloudrun/README.md index 9d610448..72d4fdca 100644 --- a/deploy/cloudrun/README.md +++ b/deploy/cloudrun/README.md @@ -1259,7 +1259,7 @@ gcloud run services update lightspeed-agent \ **Tuning tips:** - **51,200 characters** (default, 50 KiB) is a conservative limit that keeps input tokens well within - Vertex AI TPM quotas for `gemini-2.5-flash` + Vertex AI TPM quotas for `gemini-3.5-flash` - If you have higher TPM quotas, increase the limit to allow richer responses - The optimal limit depends on the model's context window and expected session length — longer multi-turn sessions accumulate more context, leaving less room for individual tool results. diff --git a/deploy/cloudrun/service.yaml b/deploy/cloudrun/service.yaml index 6de8e79a..64a0c1c1 100644 --- a/deploy/cloudrun/service.yaml +++ b/deploy/cloudrun/service.yaml @@ -64,7 +64,7 @@ spec: - name: GOOGLE_CLOUD_LOCATION value: "${VERTEXAI_LOCATION}" - name: GEMINI_MODEL - value: "gemini-2.5-flash" + value: "gemini-3.5-flash" # Agent Configuration - name: AGENT_HOST value: "0.0.0.0" diff --git a/deploy/openshift/README.md b/deploy/openshift/README.md index d9189980..e051f9d3 100644 --- a/deploy/openshift/README.md +++ b/deploy/openshift/README.md @@ -587,7 +587,7 @@ The MCP server runs as a sidecar container in the agent pod. | Value | Description | Default | |---|---|---| -| `google.geminiModel` | Default Gemini model (used when `llm.model` is not set) | `gemini-2.5-flash` | +| `google.geminiModel` | Default Gemini model (used when `llm.model` is not set) | `gemini-3.5-flash` | | `google.useVertexAI` | Use Vertex AI instead of AI Studio | `false` | | `google.cloudLocation` | Vertex AI region (use `global` for pay-as-you-go) | `global` | | `secrets.gcpServiceAccountKey` | GCP service account key JSON for Vertex AI authentication via ADC (alternative to `secrets.googleApiKey`) | `""` | @@ -624,7 +624,7 @@ To use Vertex AI with service account authentication, set in `my-values.yaml`: ```yaml llm: - model: "vertex_ai/gemini-2.5-flash" + model: "vertex_ai/gemini-3.5-flash" google: useVertexAI: true diff --git a/deploy/openshift/values.yaml b/deploy/openshift/values.yaml index e8eb2e25..48f0c690 100644 --- a/deploy/openshift/values.yaml +++ b/deploy/openshift/values.yaml @@ -97,7 +97,7 @@ google: # Set to true to use Vertex AI instead of Google AI Studio useVertexAI: false cloudLocation: global - geminiModel: gemini-2.5-flash + geminiModel: gemini-3.5-flash httpRetry: attempts: 5 initialDelay: 1.0 @@ -113,7 +113,7 @@ llm: # "litellm" — use any provider supported by LiteLLM (OpenAI, Anthropic, etc.). provider: "gemini" # Model name (works with both providers). For litellm, use "provider/model" - # format (e.g., "vertex_ai/gemini-2.5-flash"). For gemini, any provider/ + # format (e.g., "vertex_ai/gemini-3.5-flash"). For gemini, any provider/ # prefix is stripped automatically. Falls back to google.geminiModel when empty. model: "" # Custom API endpoint URL (litellm only, for self-hosted models). diff --git a/deploy/podman/lightspeed-agent-configmap.yaml b/deploy/podman/lightspeed-agent-configmap.yaml index 8642f325..602e3db9 100644 --- a/deploy/podman/lightspeed-agent-configmap.yaml +++ b/deploy/podman/lightspeed-agent-configmap.yaml @@ -11,7 +11,7 @@ data: # Google AI Configuration GOOGLE_GENAI_USE_VERTEXAI: "FALSE" GOOGLE_CLOUD_LOCATION: "global" - GEMINI_MODEL: "gemini-2.5-flash" + GEMINI_MODEL: "gemini-3.5-flash" # Red Hat SSO Configuration RED_HAT_SSO_ISSUER: "https://sso.redhat.com/auth/realms/redhat-external" diff --git a/docs/api.md b/docs/api.md index 69b9295d..a0f0a40f 100644 --- a/docs/api.md +++ b/docs/api.md @@ -241,7 +241,7 @@ with the [A2A protocol](https://google.github.io/A2A/) (Agent-to-Agent) for inte │ │ (agents/llm_agent.py) │ │ │ │ │ │ │ │ + name: str │ │ -│ │ + model: str (e.g., "gemini-2.5-flash") │ │ +│ │ + model: str (e.g., "gemini-3.5-flash") │ │ │ │ + instruction: str │ │ │ │ + tools: list[BaseTool | McpToolset] │ │ │ └───────────────────────────────────┬──────────────────────────────────┘ │ diff --git a/docs/configuration.md b/docs/configuration.md index 2b046dbd..10ce8042 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -13,7 +13,7 @@ The agent supports multiple LLM backends via Google ADK. By default it uses Gemi | Variable | Default | Description | |----------|---------|-------------| | `LLM_PROVIDER` | `gemini` | LLM provider backend: `gemini` (Google AI Studio or Vertex AI) or `litellm` (100+ providers via LiteLLM) | -| `LLM_MODEL` | - | Model name (works with both providers). For `litellm`: uses `provider/model` format (e.g., `openai/gpt-4o`, `vertex_ai/gemini-2.5-flash`). For `gemini`: any `provider/` prefix is stripped automatically. Falls back to `GEMINI_MODEL` when not set | +| `LLM_MODEL` | - | Model name (works with both providers). For `litellm`: uses `provider/model` format (e.g., `openai/gpt-4o`, `vertex_ai/gemini-3.5-flash`). For `gemini`: any `provider/` prefix is stripped automatically. Falls back to `GEMINI_MODEL` when not set | | `LLM_API_KEY` | - | API key for non-Google LLM providers (`litellm` only). Some providers also accept their own env vars (`OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, etc.) | | `LLM_API_BASE` | - | Custom API endpoint URL (`litellm` only). For self-hosted models or proxy endpoints | @@ -22,13 +22,13 @@ The agent supports multiple LLM backends via Google ADK. By default it uses Gemi ```bash # These are the defaults; no LLM_* variables required LLM_PROVIDER=gemini -GEMINI_MODEL=gemini-2.5-flash +GEMINI_MODEL=gemini-3.5-flash ``` **Different Gemini model:** ```bash -LLM_MODEL=gemini-2.0-flash +LLM_MODEL=gemini-2.5-flash ``` **OpenAI:** @@ -80,7 +80,7 @@ These settings apply when `LLM_PROVIDER=gemini` (the default). | `GOOGLE_API_KEY` | - | Google AI Studio API key (required if not using Vertex AI) | | `GOOGLE_CLOUD_PROJECT` | - | GCP project ID (required for Vertex AI) | | `GOOGLE_CLOUD_LOCATION` | `global` | Vertex AI model location (use `global` for pay-as-you-go) | -| `GEMINI_MODEL` | `gemini-2.5-flash` | Default Gemini model (used when `LLM_MODEL` is not set) | +| `GEMINI_MODEL` | `gemini-3.5-flash` | Default Gemini model (used when `LLM_MODEL` is not set) | | `GOOGLE_APPLICATION_CREDENTIALS` | - | Path to GCP service account key JSON file for Vertex AI authentication (ADC) | | `GEMINI_HTTP_RETRY_ATTEMPTS` | `5` | Max HTTP attempts per model call (including the first). Use `1` to disable SDK retries. Aligns with [google-genai defaults](https://cloud.google.com/vertex-ai/generative-ai/docs/retry-strategy). | | `GEMINI_HTTP_RETRY_INITIAL_DELAY` | `1.0` | Initial backoff delay in seconds (exponential backoff with jitter). | diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index ec3ac67e..6ba19f9b 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -180,7 +180,7 @@ curl -s -o /dev/null -w "%{http_code}" \ ```bash # Test Gemini API directly -curl -X POST "https://generativelanguage.googleapis.com/v1/models/gemini-2.5-flash:generateContent?key=$GOOGLE_API_KEY" \ +curl -X POST "https://generativelanguage.googleapis.com/v1/models/gemini-3.5-flash:generateContent?key=$GOOGLE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"contents":[{"parts":[{"text":"Hello"}]}]}' ``` diff --git a/src/lightspeed_agent/config/settings.py b/src/lightspeed_agent/config/settings.py index cea14a8c..0489ac1e 100644 --- a/src/lightspeed_agent/config/settings.py +++ b/src/lightspeed_agent/config/settings.py @@ -72,7 +72,7 @@ class Settings(BaseSettings): description="Google Cloud location for Vertex AI (use 'global' for pay-as-you-go)", ) gemini_model: str = Field( - default="gemini-2.5-flash", + default="gemini-3.5-flash", description="Gemini model to use", ) google_application_credentials: str | None = Field( diff --git a/src/lightspeed_agent/core/agent.py b/src/lightspeed_agent/core/agent.py index 203dc403..7a7ec142 100644 --- a/src/lightspeed_agent/core/agent.py +++ b/src/lightspeed_agent/core/agent.py @@ -251,7 +251,7 @@ def _create_model(settings: Settings) -> BaseLlm: return LiteLlm(**kwargs) model_name = settings.llm_model or settings.gemini_model - # Strip LiteLLM provider prefix (e.g. "vertex_ai/gemini-2.5-flash" -> "gemini-2.5-flash") + # Strip LiteLLM provider prefix (e.g. "vertex_ai/gemini-3.5-flash" -> "gemini-3.5-flash") if "/" in model_name: model_name = model_name.split("/", 1)[1] retry_opts = http_retry_options_from_settings(settings) From 6117fad36e23e3aef7741c660778cd5fc0e4fb98 Mon Sep 17 00:00:00 2001 From: Yuval Kashtan Date: Fri, 10 Jul 2026 12:14:12 +0000 Subject: [PATCH 2/3] test: lock in default gemini_model value The default bump to gemini-3.5-flash had no test asserting it, unlike llm_provider's default which is covered by test_default_provider_is_gemini. Without this, a future accidental revert of the default would go unnoticed. --- tests/test_llm_provider.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_llm_provider.py b/tests/test_llm_provider.py index 210f5986..fd9f4632 100644 --- a/tests/test_llm_provider.py +++ b/tests/test_llm_provider.py @@ -20,6 +20,11 @@ def test_default_provider_is_gemini(): assert s.llm_provider == "gemini" +def test_default_gemini_model(): + s = Settings(google_api_key="test-key") + assert s.gemini_model == "gemini-3.5-flash" + + def test_llm_model_defaults_to_none(): s = Settings(google_api_key="test-key") assert s.llm_model is None From 3e037daefbe88bce9cbc5d39df2b20ee9fe3b1dd Mon Sep 17 00:00:00 2001 From: Yuval Kashtan Date: Fri, 10 Jul 2026 12:14:42 +0000 Subject: [PATCH 3/3] docs: de-couple TOOL_RESULT_MAX_CHARS tuning tip from a specific model The tip was mechanically relabeled from gemini-2.5-flash to gemini-3.5-flash without re-verifying the TPM-quota claim for the new model. Phrase it in terms of whatever model is actually configured so it doesn't silently go stale on the next model bump. --- deploy/cloudrun/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deploy/cloudrun/README.md b/deploy/cloudrun/README.md index 72d4fdca..96afec95 100644 --- a/deploy/cloudrun/README.md +++ b/deploy/cloudrun/README.md @@ -1258,8 +1258,9 @@ gcloud run services update lightspeed-agent \ **Tuning tips:** -- **51,200 characters** (default, 50 KiB) is a conservative limit that keeps input tokens well within - Vertex AI TPM quotas for `gemini-3.5-flash` +- **51,200 characters** (default, 50 KiB) is a conservative starting point meant to keep input + tokens well within your Vertex AI TPM quota — verify against the quota for whichever model + you configure via `GEMINI_MODEL`, since quotas and context windows vary by model - If you have higher TPM quotas, increase the limit to allow richer responses - The optimal limit depends on the model's context window and expected session length — longer multi-turn sessions accumulate more context, leaving less room for individual tool results.