@@ -15,19 +15,36 @@ the [Gemini Developer API](https://aistudio.google.com/docs) and
1515APIs.
1616
1717> [ !WARNING]
18- > ** Updates to Automatic Function Calling (AFC) in upcoming SDK version:**
19- > We are changing AFC behavior in the next major version.
20- > Specifically, users will not be able to
21- > invoke AFC from direct calls to ` Models.generate_content ` or its stream and
22- > async variants. Instead, users should invoke AFC from ` Chats ` modules.
2318>
24- > | Methods/fields to be removed | migration guide |
25- > | --- | --- |
26- > | ` Live.send ` | Use ` send_client_content ` , ` send_realtime_input ` , or ` send_tool_response ` instead |
27- > | ` Live.start_stream ` | Use ` receive ` and ` send_realtime_input ` instead |
28- > | ` LiveConnectConfig.generation_config ` | Set fields on ` LiveConnectConfig ` directly |
29- > | ` prompt ` /` text ` /` image ` arguments in ` Models.generate_videos ` (and async variants) | Use ` source ` argument instead |
30- > | ` GenerationConfigThinkingConfig ` | Use ` ThinkingConfig ` instead |
19+ > Major version 3 changes:
20+ >
21+ > * ** Default Gemini Developer API version is now ` v1 ` (was ` v1beta ` ).**
22+ > Enterprise (Vertex AI) clients are unaffected and still default to
23+ > ` v1beta1 ` .
24+ > * The ` gemini-flash-latest ` , ` gemini-flash-lite-latest ` and
25+ > ` gemini-pro-latest ` aliases exist only on ` v1beta ` . Use a specific
26+ > model version, or switch back to ` v1beta ` .
27+ > * To restore the previous default, set ` GOOGLE_GENAI_API_VERSION=beta `
28+ > (or an explicit version such as ` v1beta ` ), or pass
29+ > ` types.HttpOptions(api_version='v1beta') ` , which takes precedence.
30+ > * ** Default HTTP client is now ` httpx2 ` (was ` httpx ` ), and ` httpx ` is no
31+ > longer installed by default.**
32+ > * To restore ` httpx ` as the default, do both: install
33+ > ` google-genai[httpx] ` and set ` GOOGLE_GENAI_HTTP_CLIENT=httpx ` .
34+ > Alternatively, pass ` httpx_client ` / ` httpx_async_client ` in
35+ > ` HttpOptions ` .
36+ > * To migrate to ` httpx2 ` , ` import httpx2 as httpx ` is sufficient in most
37+ > cases.
38+ > * ` httpx2 ` verifies SSL certificates against the OS trust store instead
39+ > of ` certifi ` when ` SSL_CERT_FILE ` and ` SSL_CERT_DIR ` are not set.
40+ > * Objects passed in ` HttpOptions(client_args=..., async_client_args=...) `
41+ > (such as ` Timeout ` , ` Limits ` , transports, ` Auth ` subclasses) and
42+ > transport exceptions you catch (` TimeoutException ` , ` ConnectError ` ,
43+ > ` HTTPError ` ) must come from the active HTTP client package.
44+ > * ** interactions:** ` CodeExecutionResultStep.result ` changes from ` string `
45+ > to the ` CodeExecutionResultStepResult ` union. Check which variant is
46+ > present and read the string from it. The JSON for text-only results is
47+ > unchanged.
3148>
3249> To avoid unexpected updates, pin the SDK version to ` < 3.0.0 ` .
3350
0 commit comments