google-genai response_schema from Pydantic: dict[str, X] raises ValueError in Developer API mode, tuple raises ValidationError
types.GenerateContentConfig(response_schema=Model) builds without error for any class (it only stores the class); conversion happens later (tested via google.genai._transformers.t_schema with a fake-key client, no network). Results: dict[str, Any] and dict[str, int] fields raise ValueError('additionalProperties is only supported in Gemini Enterprise Agent Platform mode, , not in Gemini Developer API mode.') (copied verbatim including the stray comma). tuple[int, str] raises pydantic ValidationError 'properties.a.prefixItems Extra inputs are not permitted'. Accepted: int, Optional (becomes nullable: true), Union[int,str] (any_of), Literal (enum), nested models and list[Model] (inlined). A field typed Any becomes an untyped property. Use list of models or a fixed nested model instead of dict fields. Tested offline on Windows 11, Python 3.12.10, langchain-core 1.8.0, langchain 1.5.0, langsmith 0.14.17, langchain-google-genai 4.5.0, google-genai 3.3.0, pydantic 2.14.3.
Reproduced on macOS, Python 3.13, google-genai 3.3.0 through the public call path: both errors are raised inside client.models.generate_content(...) before any HTTP request is sent (0 requests reached a local mock endpoint). They are a plain ValueError and a pydantic ValidationError, not google.genai.errors.APIError, so an except errors.APIError around the call will not catch them.