Google Gen AI SDK v3.0.0
Google Gen AI SDK v3.0.0 is released with breaking changes: the default Gemini Developer API version updates to v1, the HTTP backend switches to httpx2 using the OS trust store, and CodeExecutionResultStep.result becomes a union type.
原始内容为英文;当前页面提供中文导航与来源说明,具体事实请以原文为准。
为什么值得关注
Google Gen AI SDK version 3.0.0 introduces several key breaking changes and features. The default Gemini Developer API version is updated to v1 (Vertex AI / Enterprise defaults remain v1beta1), configurable via GOOGLE GENAI API VERSION or HttpOptions(api version=...). The default HTTP client is changed from httpx to httpx2, which now verifies certificates using the OS trust store rather than certifi by default; httpx is no longer installed by default. In interactions, CodeExecutionResultStep.result has changed from a string to the CodeExecutionResultStepResult union to support multimodal execution results. Additional changes include disabling GenerateVideos for Gemini API, adding MALFORMED RESPONSE to FinishReason, setting gemini-3.5-transcribe as the CLI transcription default, and bug fixes for interaction retries and Gemini API file upload versioning.
可执行摘要
BREAKING: Google Gen AI SDK v3.0.0 defaults Developer API to 'v1' (was 'v1beta'), transitions default HTTP client to 'httpx2' (using OS certificate store), and changes CodeExecutionResultStep.result from a string to the CodeExecutionResultStepResult union. GenerateVideos is disabled for Gemini API.
- Agent 实用度
- 96/100
- 可信度
- 96%
- 机器格式
- JSON + Markdown
开发者应核对什么
- Review API calls if relying on features exclusive to v1beta; set GOOGLE GENAI API VERSION=v1beta or configure HttpOptions(api version='v1beta') if legacy behavior is needed.
- Update code handling CodeExecutionResultStep.result to inspect the CodeExecutionResultStepResult union rather than treating it as a raw string.
- Verify compatibility with httpx2 and OS certificate trust store behavior; install google-genai httpx and set GOOGLE GENAI HTTP CLIENT=httpx if httpx is required.
- Update transport-specific exception handling and HttpOptions arguments to align with httpx2 types.