google-genai 1.58.0__tar.gz → 1.60.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (364) hide show
  1. {google_genai-1.58.0/google_genai.egg-info → google_genai-1.60.0}/PKG-INFO +1 -1
  2. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_api_client.py +7 -2
  3. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/_base_client.py +134 -11
  4. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/_models.py +16 -1
  5. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/_types.py +9 -0
  6. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/resources/interactions.py +10 -10
  7. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/image_config.py +1 -1
  8. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/image_config_param.py +1 -1
  9. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/interaction_create_params.py +2 -2
  10. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/batches.py +5 -0
  11. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/models.py +12 -0
  12. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/models/test_generate_content.py +16 -0
  13. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/types.py +43 -0
  14. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/version.py +1 -1
  15. {google_genai-1.58.0 → google_genai-1.60.0/google_genai.egg-info}/PKG-INFO +1 -1
  16. {google_genai-1.58.0 → google_genai-1.60.0}/pyproject.toml +1 -1
  17. {google_genai-1.58.0 → google_genai-1.60.0}/LICENSE +0 -0
  18. {google_genai-1.58.0 → google_genai-1.60.0}/MANIFEST.in +0 -0
  19. {google_genai-1.58.0 → google_genai-1.60.0}/README.md +0 -0
  20. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/__init__.py +0 -0
  21. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_adapters.py +0 -0
  22. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_api_module.py +0 -0
  23. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_automatic_function_calling_util.py +0 -0
  24. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_base_transformers.py +0 -0
  25. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_base_url.py +0 -0
  26. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_common.py +0 -0
  27. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_extra_utils.py +0 -0
  28. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/__init__.py +0 -0
  29. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/_client.py +0 -0
  30. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/_client_adapter.py +0 -0
  31. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/_compat.py +0 -0
  32. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/_constants.py +0 -0
  33. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/_exceptions.py +0 -0
  34. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/_files.py +0 -0
  35. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/_qs.py +0 -0
  36. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/_resource.py +0 -0
  37. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/_response.py +0 -0
  38. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/_streaming.py +0 -0
  39. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/_utils/__init__.py +0 -0
  40. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/_utils/_compat.py +0 -0
  41. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/_utils/_datetime_parse.py +0 -0
  42. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/_utils/_logs.py +0 -0
  43. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/_utils/_proxy.py +0 -0
  44. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/_utils/_reflection.py +0 -0
  45. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/_utils/_resources_proxy.py +0 -0
  46. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/_utils/_streams.py +0 -0
  47. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/_utils/_sync.py +0 -0
  48. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/_utils/_transform.py +0 -0
  49. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/_utils/_typing.py +0 -0
  50. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/_utils/_utils.py +0 -0
  51. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/_version.py +0 -0
  52. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/resources/__init__.py +0 -0
  53. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/__init__.py +0 -0
  54. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/allowed_tools.py +0 -0
  55. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/allowed_tools_param.py +0 -0
  56. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/annotation.py +0 -0
  57. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/annotation_param.py +0 -0
  58. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/audio_content.py +0 -0
  59. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/audio_content_param.py +0 -0
  60. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/audio_mime_type.py +0 -0
  61. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/audio_mime_type_param.py +0 -0
  62. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/code_execution_call_arguments.py +0 -0
  63. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/code_execution_call_arguments_param.py +0 -0
  64. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/code_execution_call_content.py +0 -0
  65. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/code_execution_call_content_param.py +0 -0
  66. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/code_execution_result_content.py +0 -0
  67. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/code_execution_result_content_param.py +0 -0
  68. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/content.py +0 -0
  69. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/content_delta.py +0 -0
  70. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/content_param.py +0 -0
  71. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/content_start.py +0 -0
  72. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/content_stop.py +0 -0
  73. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/deep_research_agent_config.py +0 -0
  74. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/deep_research_agent_config_param.py +0 -0
  75. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/document_content.py +0 -0
  76. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/document_content_param.py +0 -0
  77. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/document_mime_type.py +0 -0
  78. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/document_mime_type_param.py +0 -0
  79. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/dynamic_agent_config.py +0 -0
  80. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/dynamic_agent_config_param.py +0 -0
  81. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/error_event.py +0 -0
  82. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/file_search_call_content.py +0 -0
  83. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/file_search_call_content_param.py +0 -0
  84. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/file_search_result_content.py +0 -0
  85. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/file_search_result_content_param.py +0 -0
  86. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/function.py +0 -0
  87. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/function_call_content.py +0 -0
  88. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/function_call_content_param.py +0 -0
  89. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/function_param.py +0 -0
  90. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/function_result_content.py +0 -0
  91. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/function_result_content_param.py +0 -0
  92. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/generation_config.py +0 -0
  93. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/generation_config_param.py +0 -0
  94. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/google_search_call_arguments.py +0 -0
  95. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/google_search_call_arguments_param.py +0 -0
  96. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/google_search_call_content.py +0 -0
  97. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/google_search_call_content_param.py +0 -0
  98. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/google_search_result.py +0 -0
  99. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/google_search_result_content.py +0 -0
  100. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/google_search_result_content_param.py +0 -0
  101. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/google_search_result_param.py +0 -0
  102. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/image_content.py +0 -0
  103. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/image_content_param.py +0 -0
  104. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/image_mime_type.py +0 -0
  105. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/image_mime_type_param.py +0 -0
  106. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/interaction.py +0 -0
  107. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/interaction_event.py +0 -0
  108. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/interaction_get_params.py +0 -0
  109. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/interaction_sse_event.py +0 -0
  110. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/interaction_status_update.py +0 -0
  111. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/mcp_server_tool_call_content.py +0 -0
  112. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/mcp_server_tool_call_content_param.py +0 -0
  113. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/mcp_server_tool_result_content.py +0 -0
  114. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/mcp_server_tool_result_content_param.py +0 -0
  115. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/model.py +0 -0
  116. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/model_param.py +0 -0
  117. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/speech_config.py +0 -0
  118. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/speech_config_param.py +0 -0
  119. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/text_content.py +0 -0
  120. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/text_content_param.py +0 -0
  121. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/thinking_level.py +0 -0
  122. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/thought_content.py +0 -0
  123. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/thought_content_param.py +0 -0
  124. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/tool.py +0 -0
  125. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/tool_choice.py +0 -0
  126. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/tool_choice_config.py +0 -0
  127. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/tool_choice_config_param.py +0 -0
  128. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/tool_choice_param.py +0 -0
  129. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/tool_choice_type.py +0 -0
  130. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/tool_param.py +0 -0
  131. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/turn.py +0 -0
  132. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/turn_param.py +0 -0
  133. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/url_context_call_arguments.py +0 -0
  134. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/url_context_call_arguments_param.py +0 -0
  135. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/url_context_call_content.py +0 -0
  136. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/url_context_call_content_param.py +0 -0
  137. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/url_context_result.py +0 -0
  138. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/url_context_result_content.py +0 -0
  139. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/url_context_result_content_param.py +0 -0
  140. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/url_context_result_param.py +0 -0
  141. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/usage.py +0 -0
  142. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/usage_param.py +0 -0
  143. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/video_content.py +0 -0
  144. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/video_content_param.py +0 -0
  145. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/video_mime_type.py +0 -0
  146. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_interactions/types/video_mime_type_param.py +0 -0
  147. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_live_converters.py +0 -0
  148. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_local_tokenizer_loader.py +0 -0
  149. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_mcp_utils.py +0 -0
  150. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_operations_converters.py +0 -0
  151. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_replay_api_client.py +0 -0
  152. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_test_api_client.py +0 -0
  153. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_tokens_converters.py +0 -0
  154. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/_transformers.py +0 -0
  155. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/caches.py +0 -0
  156. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/chats.py +0 -0
  157. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/client.py +0 -0
  158. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/documents.py +0 -0
  159. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/errors.py +0 -0
  160. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/file_search_stores.py +0 -0
  161. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/files.py +0 -0
  162. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/interactions.py +0 -0
  163. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/live.py +0 -0
  164. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/live_music.py +0 -0
  165. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/local_tokenizer.py +0 -0
  166. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/operations.py +0 -0
  167. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/pagers.py +0 -0
  168. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/py.typed +0 -0
  169. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/__init__.py +0 -0
  170. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/afc/__init__.py +0 -0
  171. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/afc/test_convert_if_exist_pydantic_model.py +0 -0
  172. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/afc/test_convert_number_values_for_function_call_args.py +0 -0
  173. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/afc/test_find_afc_incompatible_tool_indexes.py +0 -0
  174. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/afc/test_generate_content_stream_afc.py +0 -0
  175. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/afc/test_generate_content_stream_afc_thoughts.py +0 -0
  176. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/afc/test_get_function_map.py +0 -0
  177. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/afc/test_get_function_response_parts.py +0 -0
  178. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/afc/test_get_max_remote_calls_for_afc.py +0 -0
  179. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/afc/test_invoke_function_from_dict_args.py +0 -0
  180. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/afc/test_raise_error_for_afc_incompatible_config.py +0 -0
  181. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/afc/test_should_append_afc_history.py +0 -0
  182. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/afc/test_should_disable_afc.py +0 -0
  183. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/batches/__init__.py +0 -0
  184. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/batches/test_cancel.py +0 -0
  185. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/batches/test_create.py +0 -0
  186. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/batches/test_create_with_bigquery.py +0 -0
  187. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/batches/test_create_with_file.py +0 -0
  188. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/batches/test_create_with_gcs.py +0 -0
  189. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/batches/test_create_with_inlined_requests.py +0 -0
  190. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/batches/test_delete.py +0 -0
  191. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/batches/test_embedding.py +0 -0
  192. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/batches/test_get.py +0 -0
  193. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/batches/test_list.py +0 -0
  194. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/caches/__init__.py +0 -0
  195. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/caches/constants.py +0 -0
  196. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/caches/test_create.py +0 -0
  197. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/caches/test_create_custom_url.py +0 -0
  198. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/caches/test_delete.py +0 -0
  199. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/caches/test_delete_custom_url.py +0 -0
  200. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/caches/test_get.py +0 -0
  201. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/caches/test_get_custom_url.py +0 -0
  202. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/caches/test_list.py +0 -0
  203. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/caches/test_update.py +0 -0
  204. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/caches/test_update_custom_url.py +0 -0
  205. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/chats/__init__.py +0 -0
  206. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/chats/test_get_history.py +0 -0
  207. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/chats/test_send_message.py +0 -0
  208. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/chats/test_validate_response.py +0 -0
  209. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/client/__init__.py +0 -0
  210. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/client/test_async_stream.py +0 -0
  211. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/client/test_client_close.py +0 -0
  212. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/client/test_client_initialization.py +0 -0
  213. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/client/test_client_requests.py +0 -0
  214. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/client/test_custom_client.py +0 -0
  215. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/client/test_http_options.py +0 -0
  216. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/client/test_replay_client_equality.py +0 -0
  217. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/client/test_retries.py +0 -0
  218. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/client/test_upload_errors.py +0 -0
  219. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/common/__init__.py +0 -0
  220. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/common/test_common.py +0 -0
  221. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/conftest.py +0 -0
  222. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/documents/__init__.py +0 -0
  223. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/documents/test_delete.py +0 -0
  224. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/documents/test_get.py +0 -0
  225. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/documents/test_list.py +0 -0
  226. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/errors/__init__.py +0 -0
  227. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/errors/test_api_error.py +0 -0
  228. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/file_search_stores/__init__.py +0 -0
  229. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/file_search_stores/test_create.py +0 -0
  230. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/file_search_stores/test_delete.py +0 -0
  231. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/file_search_stores/test_get.py +0 -0
  232. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/file_search_stores/test_import_file.py +0 -0
  233. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/file_search_stores/test_list.py +0 -0
  234. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/file_search_stores/test_upload_to_file_search_store.py +0 -0
  235. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/files/__init__.py +0 -0
  236. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/files/test_delete.py +0 -0
  237. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/files/test_download.py +0 -0
  238. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/files/test_get.py +0 -0
  239. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/files/test_list.py +0 -0
  240. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/files/test_register.py +0 -0
  241. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/files/test_register_table.py +0 -0
  242. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/files/test_upload.py +0 -0
  243. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/imports/test_no_optional_imports.py +0 -0
  244. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/interactions/__init__.py +0 -0
  245. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/interactions/test_auth.py +0 -0
  246. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/interactions/test_integration.py +0 -0
  247. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/interactions/test_paths.py +0 -0
  248. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/live/__init__.py +0 -0
  249. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/live/test_live.py +0 -0
  250. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/live/test_live_music.py +0 -0
  251. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/live/test_live_response.py +0 -0
  252. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/live/test_send_client_content.py +0 -0
  253. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/live/test_send_realtime_input.py +0 -0
  254. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/live/test_send_tool_response.py +0 -0
  255. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/local_tokenizer/__init__.py +0 -0
  256. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/local_tokenizer/test_local_tokenizer.py +0 -0
  257. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/local_tokenizer/test_local_tokenizer_loader.py +0 -0
  258. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/mcp/__init__.py +0 -0
  259. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/mcp/test_has_mcp_tool_usage.py +0 -0
  260. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/mcp/test_mcp_to_gemini_tools.py +0 -0
  261. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/mcp/test_parse_config_for_mcp_sessions.py +0 -0
  262. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/mcp/test_parse_config_for_mcp_usage.py +0 -0
  263. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/mcp/test_set_mcp_usage_header.py +0 -0
  264. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/models/__init__.py +0 -0
  265. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/models/constants.py +0 -0
  266. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/models/test_compute_tokens.py +0 -0
  267. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/models/test_count_tokens.py +0 -0
  268. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/models/test_delete.py +0 -0
  269. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/models/test_edit_image.py +0 -0
  270. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/models/test_embed_content.py +0 -0
  271. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/models/test_function_call_streaming.py +0 -0
  272. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/models/test_generate_content_cached_content.py +0 -0
  273. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/models/test_generate_content_config_zero_value.py +0 -0
  274. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/models/test_generate_content_from_apikey.py +0 -0
  275. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/models/test_generate_content_http_options.py +0 -0
  276. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/models/test_generate_content_image_generation.py +0 -0
  277. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/models/test_generate_content_mcp.py +0 -0
  278. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/models/test_generate_content_media_resolution.py +0 -0
  279. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/models/test_generate_content_model.py +0 -0
  280. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/models/test_generate_content_part.py +0 -0
  281. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/models/test_generate_content_thought.py +0 -0
  282. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/models/test_generate_content_tools.py +0 -0
  283. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/models/test_generate_images.py +0 -0
  284. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/models/test_generate_videos.py +0 -0
  285. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/models/test_get.py +0 -0
  286. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/models/test_list.py +0 -0
  287. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/models/test_recontext_image.py +0 -0
  288. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/models/test_segment_image.py +0 -0
  289. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/models/test_update.py +0 -0
  290. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/models/test_upscale_image.py +0 -0
  291. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/operations/__init__.py +0 -0
  292. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/operations/test_get.py +0 -0
  293. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/public_samples/__init__.py +0 -0
  294. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/public_samples/test_gemini_text_only.py +0 -0
  295. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/pytest_helper.py +0 -0
  296. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/__init__.py +0 -0
  297. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/batches/__init__.py +0 -0
  298. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/batches/test_create_delete.py +0 -0
  299. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/batches/test_create_get_cancel.py +0 -0
  300. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/batches/test_list.py +0 -0
  301. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/caches/__init__.py +0 -0
  302. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/caches/test_create_get_delete.py +0 -0
  303. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/caches/test_create_update_get.py +0 -0
  304. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/caches/test_list.py +0 -0
  305. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/chats/__init__.py +0 -0
  306. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/chats/test_send_message.py +0 -0
  307. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/chats/test_send_message_stream.py +0 -0
  308. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/files/__init__.py +0 -0
  309. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/files/test_list.py +0 -0
  310. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/files/test_upload_get_delete.py +0 -0
  311. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/models/__init__.py +0 -0
  312. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/models/test_compute_tokens.py +0 -0
  313. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/models/test_count_tokens.py +0 -0
  314. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/models/test_edit_image.py +0 -0
  315. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/models/test_embed.py +0 -0
  316. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/models/test_generate_content.py +0 -0
  317. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/models/test_generate_content_stream.py +0 -0
  318. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/models/test_generate_images.py +0 -0
  319. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/models/test_generate_videos.py +0 -0
  320. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/models/test_list.py +0 -0
  321. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/models/test_recontext_image.py +0 -0
  322. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/models/test_segment_image.py +0 -0
  323. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/models/test_upscale_image.py +0 -0
  324. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/tunings/__init__.py +0 -0
  325. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/tunings/test_create.py +0 -0
  326. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/tunings/test_create_get_cancel.py +0 -0
  327. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/shared/tunings/test_list.py +0 -0
  328. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/tokens/__init__.py +0 -0
  329. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/tokens/test_create.py +0 -0
  330. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/transformers/__init__.py +0 -0
  331. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/transformers/test_blobs.py +0 -0
  332. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/transformers/test_bytes.py +0 -0
  333. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/transformers/test_duck_type.py +0 -0
  334. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/transformers/test_function_responses.py +0 -0
  335. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/transformers/test_schema.py +0 -0
  336. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/transformers/test_t_batch.py +0 -0
  337. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/transformers/test_t_content.py +0 -0
  338. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/transformers/test_t_contents.py +0 -0
  339. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/transformers/test_t_part.py +0 -0
  340. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/transformers/test_t_parts.py +0 -0
  341. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/transformers/test_t_tool.py +0 -0
  342. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/transformers/test_t_tools.py +0 -0
  343. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/tunings/__init__.py +0 -0
  344. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/tunings/test_cancel.py +0 -0
  345. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/tunings/test_end_to_end.py +0 -0
  346. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/tunings/test_get.py +0 -0
  347. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/tunings/test_list.py +0 -0
  348. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/tunings/test_tune.py +0 -0
  349. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/types/__init__.py +0 -0
  350. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/types/test_bytes_internal.py +0 -0
  351. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/types/test_bytes_type.py +0 -0
  352. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/types/test_future.py +0 -0
  353. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/types/test_optional_types.py +0 -0
  354. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/types/test_part_type.py +0 -0
  355. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/types/test_schema_from_json_schema.py +0 -0
  356. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/types/test_schema_json_schema.py +0 -0
  357. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tests/types/test_types.py +0 -0
  358. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tokens.py +0 -0
  359. {google_genai-1.58.0 → google_genai-1.60.0}/google/genai/tunings.py +0 -0
  360. {google_genai-1.58.0 → google_genai-1.60.0}/google_genai.egg-info/SOURCES.txt +0 -0
  361. {google_genai-1.58.0 → google_genai-1.60.0}/google_genai.egg-info/dependency_links.txt +0 -0
  362. {google_genai-1.58.0 → google_genai-1.60.0}/google_genai.egg-info/requires.txt +0 -0
  363. {google_genai-1.58.0 → google_genai-1.60.0}/google_genai.egg-info/top_level.txt +0 -0
  364. {google_genai-1.58.0 → google_genai-1.60.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: google-genai
3
- Version: 1.58.0
3
+ Version: 1.60.0
4
4
  Summary: GenAI Python SDK
5
5
  Author-email: Google LLC <googleapis-packages@google.com>
6
6
  License-Expression: Apache-2.0
@@ -181,6 +181,13 @@ def join_url_path(base_url: str, path: str) -> str:
181
181
 
182
182
  def load_auth(*, project: Union[str, None]) -> Tuple[Credentials, str]:
183
183
  """Loads google auth credentials and project id."""
184
+
185
+ ## Set GOOGLE_API_PREVENT_AGENT_TOKEN_SHARING_FOR_GCP_SERVICES to false
186
+ ## to disable bound token sharing. Tracking on
187
+ ## https://github.com/googleapis/python-genai/issues/1956
188
+ os.environ['GOOGLE_API_PREVENT_AGENT_TOKEN_SHARING_FOR_GCP_SERVICES'] = (
189
+ 'false'
190
+ )
184
191
  credentials, loaded_project_id = google.auth.default( # type: ignore[no-untyped-call]
185
192
  scopes=['https://www.googleapis.com/auth/cloud-platform'],
186
193
  )
@@ -1946,5 +1953,3 @@ async def async_get_token_from_credentials(
1946
1953
  raise RuntimeError('Could not resolve API token from the environment')
1947
1954
 
1948
1955
  return credentials.token # type: ignore[no-any-return]
1949
-
1950
-
@@ -24,6 +24,7 @@ import asyncio
24
24
  import inspect
25
25
  import logging
26
26
  import platform
27
+ import warnings
27
28
  import email.utils
28
29
  from types import TracebackType
29
30
  from random import random
@@ -66,9 +67,11 @@ from ._types import (
66
67
  ResponseT,
67
68
  AnyMapping,
68
69
  PostParser,
70
+ BinaryTypes,
69
71
  RequestFiles,
70
72
  HttpxSendArgs,
71
73
  RequestOptions,
74
+ AsyncBinaryTypes,
72
75
  HttpxRequestFiles,
73
76
  ModelBuilderProtocol,
74
77
  not_given,
@@ -501,8 +504,19 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
501
504
  retries_taken: int = 0,
502
505
  ) -> httpx.Request:
503
506
  if log.isEnabledFor(logging.DEBUG):
504
- log.debug("Request options: %s", model_dump(options, exclude_unset=True))
505
-
507
+ log.debug(
508
+ "Request options: %s",
509
+ model_dump(
510
+ options,
511
+ exclude_unset=True,
512
+ # Pydantic v1 can't dump every type we support in content, so we exclude it for now.
513
+ exclude={
514
+ "content",
515
+ }
516
+ if PYDANTIC_V1
517
+ else {},
518
+ ),
519
+ )
506
520
  kwargs: dict[str, Any] = {}
507
521
 
508
522
  json_data = options.json_data
@@ -556,7 +570,13 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
556
570
  is_body_allowed = options.method.lower() != "get"
557
571
 
558
572
  if is_body_allowed:
559
- if isinstance(json_data, bytes):
573
+ if options.content is not None and json_data is not None:
574
+ raise TypeError("Passing both `content` and `json_data` is not supported")
575
+ if options.content is not None and files is not None:
576
+ raise TypeError("Passing both `content` and `files` is not supported")
577
+ if options.content is not None:
578
+ kwargs["content"] = options.content
579
+ elif isinstance(json_data, bytes):
560
580
  kwargs["content"] = json_data
561
581
  else:
562
582
  kwargs["json"] = json_data if is_given(json_data) else None
@@ -1218,6 +1238,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
1218
1238
  *,
1219
1239
  cast_to: Type[ResponseT],
1220
1240
  body: Body | None = None,
1241
+ content: BinaryTypes | None = None,
1221
1242
  options: RequestOptions = {},
1222
1243
  files: RequestFiles | None = None,
1223
1244
  stream: Literal[False] = False,
@@ -1230,6 +1251,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
1230
1251
  *,
1231
1252
  cast_to: Type[ResponseT],
1232
1253
  body: Body | None = None,
1254
+ content: BinaryTypes | None = None,
1233
1255
  options: RequestOptions = {},
1234
1256
  files: RequestFiles | None = None,
1235
1257
  stream: Literal[True],
@@ -1243,6 +1265,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
1243
1265
  *,
1244
1266
  cast_to: Type[ResponseT],
1245
1267
  body: Body | None = None,
1268
+ content: BinaryTypes | None = None,
1246
1269
  options: RequestOptions = {},
1247
1270
  files: RequestFiles | None = None,
1248
1271
  stream: bool,
@@ -1255,13 +1278,25 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
1255
1278
  *,
1256
1279
  cast_to: Type[ResponseT],
1257
1280
  body: Body | None = None,
1281
+ content: BinaryTypes | None = None,
1258
1282
  options: RequestOptions = {},
1259
1283
  files: RequestFiles | None = None,
1260
1284
  stream: bool = False,
1261
1285
  stream_cls: type[_StreamT] | None = None,
1262
1286
  ) -> ResponseT | _StreamT:
1287
+ if body is not None and content is not None:
1288
+ raise TypeError("Passing both `body` and `content` is not supported")
1289
+ if files is not None and content is not None:
1290
+ raise TypeError("Passing both `files` and `content` is not supported")
1291
+ if isinstance(body, bytes):
1292
+ warnings.warn(
1293
+ "Passing raw bytes as `body` is deprecated and will be removed in a future version. "
1294
+ "Please pass raw bytes via the `content` parameter instead.",
1295
+ DeprecationWarning,
1296
+ stacklevel=2,
1297
+ )
1263
1298
  opts = FinalRequestOptions.construct(
1264
- method="post", url=path, json_data=body, files=to_httpx_files(files), **options
1299
+ method="post", url=path, json_data=body, content=content, files=to_httpx_files(files), **options
1265
1300
  )
1266
1301
  return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
1267
1302
 
@@ -1271,11 +1306,23 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
1271
1306
  *,
1272
1307
  cast_to: Type[ResponseT],
1273
1308
  body: Body | None = None,
1309
+ content: BinaryTypes | None = None,
1274
1310
  files: RequestFiles | None = None,
1275
1311
  options: RequestOptions = {},
1276
1312
  ) -> ResponseT:
1313
+ if body is not None and content is not None:
1314
+ raise TypeError("Passing both `body` and `content` is not supported")
1315
+ if files is not None and content is not None:
1316
+ raise TypeError("Passing both `files` and `content` is not supported")
1317
+ if isinstance(body, bytes):
1318
+ warnings.warn(
1319
+ "Passing raw bytes as `body` is deprecated and will be removed in a future version. "
1320
+ "Please pass raw bytes via the `content` parameter instead.",
1321
+ DeprecationWarning,
1322
+ stacklevel=2,
1323
+ )
1277
1324
  opts = FinalRequestOptions.construct(
1278
- method="patch", url=path, json_data=body, files=to_httpx_files(files), **options
1325
+ method="patch", url=path, json_data=body, content=content, files=to_httpx_files(files), **options
1279
1326
  )
1280
1327
  return self.request(cast_to, opts)
1281
1328
 
@@ -1285,11 +1332,23 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
1285
1332
  *,
1286
1333
  cast_to: Type[ResponseT],
1287
1334
  body: Body | None = None,
1335
+ content: BinaryTypes | None = None,
1288
1336
  files: RequestFiles | None = None,
1289
1337
  options: RequestOptions = {},
1290
1338
  ) -> ResponseT:
1339
+ if body is not None and content is not None:
1340
+ raise TypeError("Passing both `body` and `content` is not supported")
1341
+ if files is not None and content is not None:
1342
+ raise TypeError("Passing both `files` and `content` is not supported")
1343
+ if isinstance(body, bytes):
1344
+ warnings.warn(
1345
+ "Passing raw bytes as `body` is deprecated and will be removed in a future version. "
1346
+ "Please pass raw bytes via the `content` parameter instead.",
1347
+ DeprecationWarning,
1348
+ stacklevel=2,
1349
+ )
1291
1350
  opts = FinalRequestOptions.construct(
1292
- method="put", url=path, json_data=body, files=to_httpx_files(files), **options
1351
+ method="put", url=path, json_data=body, content=content, files=to_httpx_files(files), **options
1293
1352
  )
1294
1353
  return self.request(cast_to, opts)
1295
1354
 
@@ -1299,9 +1358,19 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
1299
1358
  *,
1300
1359
  cast_to: Type[ResponseT],
1301
1360
  body: Body | None = None,
1361
+ content: BinaryTypes | None = None,
1302
1362
  options: RequestOptions = {},
1303
1363
  ) -> ResponseT:
1304
- opts = FinalRequestOptions.construct(method="delete", url=path, json_data=body, **options)
1364
+ if body is not None and content is not None:
1365
+ raise TypeError("Passing both `body` and `content` is not supported")
1366
+ if isinstance(body, bytes):
1367
+ warnings.warn(
1368
+ "Passing raw bytes as `body` is deprecated and will be removed in a future version. "
1369
+ "Please pass raw bytes via the `content` parameter instead.",
1370
+ DeprecationWarning,
1371
+ stacklevel=2,
1372
+ )
1373
+ opts = FinalRequestOptions.construct(method="delete", url=path, json_data=body, content=content, **options)
1305
1374
  return self.request(cast_to, opts)
1306
1375
 
1307
1376
  def get_api_list(
@@ -1741,6 +1810,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
1741
1810
  *,
1742
1811
  cast_to: Type[ResponseT],
1743
1812
  body: Body | None = None,
1813
+ content: AsyncBinaryTypes | None = None,
1744
1814
  files: RequestFiles | None = None,
1745
1815
  options: RequestOptions = {},
1746
1816
  stream: Literal[False] = False,
@@ -1753,6 +1823,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
1753
1823
  *,
1754
1824
  cast_to: Type[ResponseT],
1755
1825
  body: Body | None = None,
1826
+ content: AsyncBinaryTypes | None = None,
1756
1827
  files: RequestFiles | None = None,
1757
1828
  options: RequestOptions = {},
1758
1829
  stream: Literal[True],
@@ -1766,6 +1837,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
1766
1837
  *,
1767
1838
  cast_to: Type[ResponseT],
1768
1839
  body: Body | None = None,
1840
+ content: AsyncBinaryTypes | None = None,
1769
1841
  files: RequestFiles | None = None,
1770
1842
  options: RequestOptions = {},
1771
1843
  stream: bool,
@@ -1778,13 +1850,25 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
1778
1850
  *,
1779
1851
  cast_to: Type[ResponseT],
1780
1852
  body: Body | None = None,
1853
+ content: AsyncBinaryTypes | None = None,
1781
1854
  files: RequestFiles | None = None,
1782
1855
  options: RequestOptions = {},
1783
1856
  stream: bool = False,
1784
1857
  stream_cls: type[_AsyncStreamT] | None = None,
1785
1858
  ) -> ResponseT | _AsyncStreamT:
1859
+ if body is not None and content is not None:
1860
+ raise TypeError("Passing both `body` and `content` is not supported")
1861
+ if files is not None and content is not None:
1862
+ raise TypeError("Passing both `files` and `content` is not supported")
1863
+ if isinstance(body, bytes):
1864
+ warnings.warn(
1865
+ "Passing raw bytes as `body` is deprecated and will be removed in a future version. "
1866
+ "Please pass raw bytes via the `content` parameter instead.",
1867
+ DeprecationWarning,
1868
+ stacklevel=2,
1869
+ )
1786
1870
  opts = FinalRequestOptions.construct(
1787
- method="post", url=path, json_data=body, files=await async_to_httpx_files(files), **options
1871
+ method="post", url=path, json_data=body, content=content, files=await async_to_httpx_files(files), **options
1788
1872
  )
1789
1873
  return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)
1790
1874
 
@@ -1794,11 +1878,28 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
1794
1878
  *,
1795
1879
  cast_to: Type[ResponseT],
1796
1880
  body: Body | None = None,
1881
+ content: AsyncBinaryTypes | None = None,
1797
1882
  files: RequestFiles | None = None,
1798
1883
  options: RequestOptions = {},
1799
1884
  ) -> ResponseT:
1885
+ if body is not None and content is not None:
1886
+ raise TypeError("Passing both `body` and `content` is not supported")
1887
+ if files is not None and content is not None:
1888
+ raise TypeError("Passing both `files` and `content` is not supported")
1889
+ if isinstance(body, bytes):
1890
+ warnings.warn(
1891
+ "Passing raw bytes as `body` is deprecated and will be removed in a future version. "
1892
+ "Please pass raw bytes via the `content` parameter instead.",
1893
+ DeprecationWarning,
1894
+ stacklevel=2,
1895
+ )
1800
1896
  opts = FinalRequestOptions.construct(
1801
- method="patch", url=path, json_data=body, files=await async_to_httpx_files(files), **options
1897
+ method="patch",
1898
+ url=path,
1899
+ json_data=body,
1900
+ content=content,
1901
+ files=await async_to_httpx_files(files),
1902
+ **options,
1802
1903
  )
1803
1904
  return await self.request(cast_to, opts)
1804
1905
 
@@ -1808,11 +1909,23 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
1808
1909
  *,
1809
1910
  cast_to: Type[ResponseT],
1810
1911
  body: Body | None = None,
1912
+ content: AsyncBinaryTypes | None = None,
1811
1913
  files: RequestFiles | None = None,
1812
1914
  options: RequestOptions = {},
1813
1915
  ) -> ResponseT:
1916
+ if body is not None and content is not None:
1917
+ raise TypeError("Passing both `body` and `content` is not supported")
1918
+ if files is not None and content is not None:
1919
+ raise TypeError("Passing both `files` and `content` is not supported")
1920
+ if isinstance(body, bytes):
1921
+ warnings.warn(
1922
+ "Passing raw bytes as `body` is deprecated and will be removed in a future version. "
1923
+ "Please pass raw bytes via the `content` parameter instead.",
1924
+ DeprecationWarning,
1925
+ stacklevel=2,
1926
+ )
1814
1927
  opts = FinalRequestOptions.construct(
1815
- method="put", url=path, json_data=body, files=await async_to_httpx_files(files), **options
1928
+ method="put", url=path, json_data=body, content=content, files=await async_to_httpx_files(files), **options
1816
1929
  )
1817
1930
  return await self.request(cast_to, opts)
1818
1931
 
@@ -1822,9 +1935,19 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
1822
1935
  *,
1823
1936
  cast_to: Type[ResponseT],
1824
1937
  body: Body | None = None,
1938
+ content: AsyncBinaryTypes | None = None,
1825
1939
  options: RequestOptions = {},
1826
1940
  ) -> ResponseT:
1827
- opts = FinalRequestOptions.construct(method="delete", url=path, json_data=body, **options)
1941
+ if body is not None and content is not None:
1942
+ raise TypeError("Passing both `body` and `content` is not supported")
1943
+ if isinstance(body, bytes):
1944
+ warnings.warn(
1945
+ "Passing raw bytes as `body` is deprecated and will be removed in a future version. "
1946
+ "Please pass raw bytes via the `content` parameter instead.",
1947
+ DeprecationWarning,
1948
+ stacklevel=2,
1949
+ )
1950
+ opts = FinalRequestOptions.construct(method="delete", url=path, json_data=body, content=content, **options)
1828
1951
  return await self.request(cast_to, opts)
1829
1952
 
1830
1953
  def get_api_list(
@@ -19,7 +19,20 @@ from __future__ import annotations
19
19
  import os
20
20
  import inspect
21
21
  import weakref
22
- from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, Optional, cast
22
+ from typing import (
23
+ IO,
24
+ TYPE_CHECKING,
25
+ Any,
26
+ Type,
27
+ Union,
28
+ Generic,
29
+ TypeVar,
30
+ Callable,
31
+ Iterable,
32
+ Optional,
33
+ AsyncIterable,
34
+ cast,
35
+ )
23
36
  from datetime import date, datetime
24
37
  from typing_extensions import (
25
38
  List,
@@ -803,6 +816,7 @@ class FinalRequestOptionsInput(TypedDict, total=False):
803
816
  timeout: float | Timeout | None
804
817
  files: HttpxRequestFiles | None
805
818
  idempotency_key: str
819
+ content: Union[bytes, bytearray, IO[bytes], Iterable[bytes], AsyncIterable[bytes], None]
806
820
  json_data: Body
807
821
  extra_json: AnyMapping
808
822
  follow_redirects: bool
@@ -821,6 +835,7 @@ class FinalRequestOptions(pydantic.BaseModel):
821
835
  post_parser: Union[Callable[[Any], Any], NotGiven] = NotGiven()
822
836
  follow_redirects: Union[bool, None] = None
823
837
 
838
+ content: Union[bytes, bytearray, IO[bytes], Iterable[bytes], AsyncIterable[bytes], None] = None
824
839
  # It should be noted that we cannot use `json` here as that would override
825
840
  # a BaseModel method in an incompatible fashion.
826
841
  json_data: Union[Body, None] = None
@@ -28,9 +28,11 @@ from typing import (
28
28
  Mapping,
29
29
  TypeVar,
30
30
  Callable,
31
+ Iterable,
31
32
  Iterator,
32
33
  Optional,
33
34
  Sequence,
35
+ AsyncIterable,
34
36
  )
35
37
  from typing_extensions import (
36
38
  Set,
@@ -71,6 +73,13 @@ if TYPE_CHECKING:
71
73
  else:
72
74
  Base64FileInput = Union[IO[bytes], PathLike]
73
75
  FileContent = Union[IO[bytes], bytes, PathLike] # PathLike is not subscriptable in Python 3.8.
76
+
77
+
78
+ # Used for sending raw binary data / streaming data in request bodies
79
+ # e.g. for file uploads without multipart encoding
80
+ BinaryTypes = Union[bytes, bytearray, IO[bytes], Iterable[bytes]]
81
+ AsyncBinaryTypes = Union[bytes, bytearray, IO[bytes], AsyncIterable[bytes]]
82
+
74
83
  FileTypes = Union[
75
84
  # file (or bytes)
76
85
  FileContent,
@@ -96,7 +96,7 @@ class InteractionsResource(SyncAPIResource):
96
96
 
97
97
  model: The name of the `Model` used for generating the interaction.
98
98
 
99
- background: Whether to run the model interaction in the background.
99
+ background: Input only. Whether to run the model interaction in the background.
100
100
 
101
101
  generation_config: Input only. Configuration parameters for the model interaction.
102
102
 
@@ -161,7 +161,7 @@ class InteractionsResource(SyncAPIResource):
161
161
 
162
162
  stream: Input only. Whether the interaction will be streamed.
163
163
 
164
- background: Whether to run the model interaction in the background.
164
+ background: Input only. Whether to run the model interaction in the background.
165
165
 
166
166
  generation_config: Input only. Configuration parameters for the model interaction.
167
167
 
@@ -224,7 +224,7 @@ class InteractionsResource(SyncAPIResource):
224
224
 
225
225
  agent_config: Configuration for the agent.
226
226
 
227
- background: Whether to run the model interaction in the background.
227
+ background: Input only. Whether to run the model interaction in the background.
228
228
 
229
229
  previous_interaction_id: The ID of the previous interaction, if any.
230
230
 
@@ -289,7 +289,7 @@ class InteractionsResource(SyncAPIResource):
289
289
 
290
290
  agent_config: Configuration for the agent.
291
291
 
292
- background: Whether to run the model interaction in the background.
292
+ background: Input only. Whether to run the model interaction in the background.
293
293
 
294
294
  previous_interaction_id: The ID of the previous interaction, if any.
295
295
 
@@ -350,7 +350,7 @@ class InteractionsResource(SyncAPIResource):
350
350
 
351
351
  stream: Input only. Whether the interaction will be streamed.
352
352
 
353
- background: Whether to run the model interaction in the background.
353
+ background: Input only. Whether to run the model interaction in the background.
354
354
 
355
355
  generation_config: Input only. Configuration parameters for the model interaction.
356
356
 
@@ -713,7 +713,7 @@ class AsyncInteractionsResource(AsyncAPIResource):
713
713
 
714
714
  model: The name of the `Model` used for generating the interaction.
715
715
 
716
- background: Whether to run the model interaction in the background.
716
+ background: Input only. Whether to run the model interaction in the background.
717
717
 
718
718
  generation_config: Input only. Configuration parameters for the model interaction.
719
719
 
@@ -778,7 +778,7 @@ class AsyncInteractionsResource(AsyncAPIResource):
778
778
 
779
779
  stream: Input only. Whether the interaction will be streamed.
780
780
 
781
- background: Whether to run the model interaction in the background.
781
+ background: Input only. Whether to run the model interaction in the background.
782
782
 
783
783
  generation_config: Input only. Configuration parameters for the model interaction.
784
784
 
@@ -841,7 +841,7 @@ class AsyncInteractionsResource(AsyncAPIResource):
841
841
 
842
842
  agent_config: Configuration for the agent.
843
843
 
844
- background: Whether to run the model interaction in the background.
844
+ background: Input only. Whether to run the model interaction in the background.
845
845
 
846
846
  previous_interaction_id: The ID of the previous interaction, if any.
847
847
 
@@ -906,7 +906,7 @@ class AsyncInteractionsResource(AsyncAPIResource):
906
906
 
907
907
  agent_config: Configuration for the agent.
908
908
 
909
- background: Whether to run the model interaction in the background.
909
+ background: Input only. Whether to run the model interaction in the background.
910
910
 
911
911
  previous_interaction_id: The ID of the previous interaction, if any.
912
912
 
@@ -967,7 +967,7 @@ class AsyncInteractionsResource(AsyncAPIResource):
967
967
 
968
968
  stream: Input only. Whether the interaction will be streamed.
969
969
 
970
- background: Whether to run the model interaction in the background.
970
+ background: Input only. Whether to run the model interaction in the background.
971
971
 
972
972
  generation_config: Input only. Configuration parameters for the model interaction.
973
973
 
@@ -26,6 +26,6 @@ __all__ = ["ImageConfig"]
26
26
  class ImageConfig(BaseModel):
27
27
  """The configuration for image interaction."""
28
28
 
29
- aspect_ratio: Optional[Literal["1:1", "2:3", "3:2", "3:4", "4:3", "9:16", "16:9", "21:9"]] = None
29
+ aspect_ratio: Optional[Literal["1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9", "21:9"]] = None
30
30
 
31
31
  image_size: Optional[Literal["1K", "2K", "4K"]] = None
@@ -25,6 +25,6 @@ __all__ = ["ImageConfigParam"]
25
25
  class ImageConfigParam(TypedDict, total=False):
26
26
  """The configuration for image interaction."""
27
27
 
28
- aspect_ratio: Literal["1:1", "2:3", "3:2", "3:4", "4:3", "9:16", "16:9", "21:9"]
28
+ aspect_ratio: Literal["1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9", "21:9"]
29
29
 
30
30
  image_size: Literal["1K", "2K", "4K"]
@@ -68,7 +68,7 @@ class BaseCreateModelInteractionParams(TypedDict, total=False):
68
68
  api_version: str
69
69
 
70
70
  background: bool
71
- """Whether to run the model interaction in the background."""
71
+ """Input only. Whether to run the model interaction in the background."""
72
72
 
73
73
  generation_config: GenerationConfigParam
74
74
  """Input only. Configuration parameters for the model interaction."""
@@ -136,7 +136,7 @@ class BaseCreateAgentInteractionParams(TypedDict, total=False):
136
136
  """Configuration for the agent."""
137
137
 
138
138
  background: bool
139
- """Whether to run the model interaction in the background."""
139
+ """Input only. Whether to run the model interaction in the background."""
140
140
 
141
141
  previous_interaction_id: str
142
142
  """The ID of the previous interaction, if any."""
@@ -1013,6 +1013,11 @@ def _GenerateContentConfig_to_mldev(
1013
1013
  getv(from_object, ['enable_enhanced_civic_answers']),
1014
1014
  )
1015
1015
 
1016
+ if getv(from_object, ['model_armor_config']) is not None:
1017
+ raise ValueError(
1018
+ 'model_armor_config parameter is not supported in Gemini API.'
1019
+ )
1020
+
1016
1021
  return to_object
1017
1022
 
1018
1023
 
@@ -1117,6 +1117,11 @@ def _GenerateContentConfig_to_mldev(
1117
1117
  getv(from_object, ['enable_enhanced_civic_answers']),
1118
1118
  )
1119
1119
 
1120
+ if getv(from_object, ['model_armor_config']) is not None:
1121
+ raise ValueError(
1122
+ 'model_armor_config parameter is not supported in Gemini API.'
1123
+ )
1124
+
1120
1125
  return to_object
1121
1126
 
1122
1127
 
@@ -1279,6 +1284,13 @@ def _GenerateContentConfig_to_vertex(
1279
1284
  'enable_enhanced_civic_answers parameter is not supported in Vertex AI.'
1280
1285
  )
1281
1286
 
1287
+ if getv(from_object, ['model_armor_config']) is not None:
1288
+ setv(
1289
+ parent_object,
1290
+ ['modelArmorConfig'],
1291
+ getv(from_object, ['model_armor_config']),
1292
+ )
1293
+
1282
1294
  return to_object
1283
1295
 
1284
1296
 
@@ -546,6 +546,22 @@ test_table: list[pytest_helper.TestTableItem] = [
546
546
  ),
547
547
  exception_if_vertex='not supported',
548
548
  ),
549
+ pytest_helper.TestTableItem(
550
+ name='test_model_armor_config',
551
+ parameters=types._GenerateContentParameters(
552
+ model=GEMINI_FLASH_LATEST,
553
+ contents=t.t_contents('What is your name?'),
554
+ config={
555
+ 'model_armor_config': {
556
+ 'prompt_template_name': '',
557
+ 'response_template_name': '',
558
+ # Intentionally left blank just to test that the SDK doesn't
559
+ # throw an exception.
560
+ },
561
+ },
562
+ ),
563
+ exception_if_mldev='not supported',
564
+ ),
549
565
  ]
550
566
 
551
567
  pytestmark = pytest_helper.setup(
@@ -5003,6 +5003,38 @@ SpeechConfigUnion = Union[str, SpeechConfig]
5003
5003
  SpeechConfigUnionDict = Union[str, SpeechConfig, SpeechConfigDict]
5004
5004
 
5005
5005
 
5006
+ class ModelArmorConfig(_common.BaseModel):
5007
+ """Configuration for Model Armor integrations of prompt and responses.
5008
+
5009
+ This data type is not supported in Gemini API.
5010
+ """
5011
+
5012
+ prompt_template_name: Optional[str] = Field(
5013
+ default=None,
5014
+ description="""Optional. The name of the Model Armor template to use for prompt sanitization.""",
5015
+ )
5016
+ response_template_name: Optional[str] = Field(
5017
+ default=None,
5018
+ description="""Optional. The name of the Model Armor template to use for response sanitization.""",
5019
+ )
5020
+
5021
+
5022
+ class ModelArmorConfigDict(TypedDict, total=False):
5023
+ """Configuration for Model Armor integrations of prompt and responses.
5024
+
5025
+ This data type is not supported in Gemini API.
5026
+ """
5027
+
5028
+ prompt_template_name: Optional[str]
5029
+ """Optional. The name of the Model Armor template to use for prompt sanitization."""
5030
+
5031
+ response_template_name: Optional[str]
5032
+ """Optional. The name of the Model Armor template to use for response sanitization."""
5033
+
5034
+
5035
+ ModelArmorConfigOrDict = Union[ModelArmorConfig, ModelArmorConfigDict]
5036
+
5037
+
5006
5038
  class GenerateContentConfig(_common.BaseModel):
5007
5039
  """Optional model configuration parameters.
5008
5040
 
@@ -5219,6 +5251,12 @@ class GenerateContentConfig(_common.BaseModel):
5219
5251
  models. This field is not supported in Vertex AI.
5220
5252
  """,
5221
5253
  )
5254
+ model_armor_config: Optional[ModelArmorConfig] = Field(
5255
+ default=None,
5256
+ description="""Settings for prompt and response sanitization using the Model Armor
5257
+ service. If supplied, safety_settings must not be supplied.
5258
+ """,
5259
+ )
5222
5260
 
5223
5261
  @pydantic.field_validator('response_schema', mode='before')
5224
5262
  @classmethod
@@ -5429,6 +5467,11 @@ class GenerateContentConfigDict(TypedDict, total=False):
5429
5467
  models. This field is not supported in Vertex AI.
5430
5468
  """
5431
5469
 
5470
+ model_armor_config: Optional[ModelArmorConfigDict]
5471
+ """Settings for prompt and response sanitization using the Model Armor
5472
+ service. If supplied, safety_settings must not be supplied.
5473
+ """
5474
+
5432
5475
 
5433
5476
  GenerateContentConfigOrDict = Union[
5434
5477
  GenerateContentConfig, GenerateContentConfigDict
@@ -13,4 +13,4 @@
13
13
  # limitations under the License.
14
14
  #
15
15
 
16
- __version__ = '1.58.0' # x-release-please-version
16
+ __version__ = '1.60.0' # x-release-please-version
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: google-genai
3
- Version: 1.58.0
3
+ Version: 1.60.0
4
4
  Summary: GenAI Python SDK
5
5
  Author-email: Google LLC <googleapis-packages@google.com>
6
6
  License-Expression: Apache-2.0
@@ -3,7 +3,7 @@ requires = ["setuptools", "wheel", "twine>=6.1.0", "packaging>=24.2", "pkginfo>=
3
3
 
4
4
  [project]
5
5
  name = "google-genai"
6
- version = "1.58.0"
6
+ version = "1.60.0"
7
7
  description = "GenAI Python SDK"
8
8
  readme = "README.md"
9
9
  license = "Apache-2.0"