From b06bcdb99fffe4a1cd9a507cd4d0e22dec0f5ea6 Mon Sep 17 00:00:00 2001 From: gauri nigam Date: Sat, 30 May 2026 14:39:11 +0530 Subject: [PATCH] fix(docs): remove inaccurate backwards compatibility notes in Google provider docs - Remove confusing backwards compat note in genai.md that referenced duplicate/wrong mode names - Remove same misleading note from google.md - Fix self-contradictory streaming limitation note in genai.md - Fix syntax error in vertex.md deprecated code example --- docs/integrations/genai.md | 4 +--- docs/integrations/google.md | 2 -- docs/integrations/vertex.md | 4 +++- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/integrations/genai.md b/docs/integrations/genai.md index 3cb312497..d4091fc6c 100644 --- a/docs/integrations/genai.md +++ b/docs/integrations/genai.md @@ -29,9 +29,7 @@ We currently have two modes for Gemini This filtering happens automatically and requires no additional configuration. For more information about Gemini's thinking feature, see the [official documentation](https://ai.google.dev/gemini-api/docs/thinking). -!!! note "Backwards Compatibility" - The provider-specific modes (`Mode.TOOLS`, `Mode.JSON`, `Mode.JSON`) are still supported but emit deprecation warnings and map to the generic modes (`Mode.TOOLS`, `Mode.JSON`). ## Installation @@ -550,7 +548,7 @@ print(response) **As of July 11, 2025, Google GenAI does not support streaming with tool/function calling or structured outputs for regular models.** - `Mode.TOOLS` and `Mode.JSON` do not support streaming with regular models - - To use streaming, you must use `Partial[YourModel]` explicitly or switch to other modes like `Mode.JSON` + - To use streaming, you must use `Partial[YourModel]` explicitly - Alternatively, set `stream=False` to disable streaming Streaming allows you to process responses incrementally rather than waiting for the complete result. This is extremely useful for making UI changes feel instant and responsive. diff --git a/docs/integrations/google.md b/docs/integrations/google.md index e008ead78..078613b7f 100644 --- a/docs/integrations/google.md +++ b/docs/integrations/google.md @@ -338,9 +338,7 @@ We provide several modes to make it easy to work with the different response mod 1. `instructor.Mode.TOOLS` : This uses Gemini's tool calling API to return structured outputs (default) 2. `instructor.Mode.JSON` : This uses Gemini's JSON schema mode for structured outputs -!!! note "Backwards Compatibility" - Legacy provider-specific modes (for example `Mode.TOOLS`, `Mode.JSON`, `Mode.JSON`, `Mode.TOOLS`) are deprecated. They emit warnings and map to the generic modes. !!! info "Mode Selection" When using `from_provider`, the appropriate mode is automatically selected based on the provider and model capabilities. diff --git a/docs/integrations/vertex.md b/docs/integrations/vertex.md index 7934082cb..2813e780e 100644 --- a/docs/integrations/vertex.md +++ b/docs/integrations/vertex.md @@ -242,7 +242,9 @@ from vertexai.generative_models import GenerativeModel vertexai.init(project="your-project", location="us-central1") -client = instructor.from_provider("google/gemini-2.5-flash", vertexai=True), +client = instructor.from_provider( + "google/gemini-2.5-flash", + vertexai=True, mode=instructor.Mode.TOOLS, ) ```