C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\langchain_core\_api\deprecation.py:25: UserWarning: Core Pydantic V1 functionality isn't compatible with Python 3.14 or greater. from pydantic.v1.fields import FieldInfo as FieldInfoV1 C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\langchain_core\runnables\history.py:596: LangChainDeprecationWarning: `connection_string` was deprecated in LangChain 0.2.2 and will be removed in 1.0. Use connection instead. message_history = self.get_session_history( Traceback (most recent call last): File "C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\langchain_google_genai\chat_models.py", line 3047, in _generate response: GenerateContentResponse = self.client.models.generate_content( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ **request, ^^^^^^^^^^ ) ^ File "C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\google\genai\models.py", line 5709, in generate_content response = self._generate_content( model=model, contents=contents, config=parsed_config ) File "C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\google\genai\models.py", line 4371, in _generate_content response = self._api_client.request( 'post', path, request_dict, http_options ) File "C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\google\genai\_api_client.py", line 1401, in request response = self._request(http_request, http_options, stream=False) File "C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\google\genai\_api_client.py", line 1235, in _request return retry(self._request_once, http_request, stream) # type: ignore[no-any-return] File "C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\tenacity\__init__.py", line 470, in __call__ do = self.iter(retry_state=retry_state) File "C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\tenacity\__init__.py", line 371, in iter result = action(retry_state) File "C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\tenacity\__init__.py", line 393, in self._add_action_func(lambda rs: rs.outcome.result()) ~~~~~~~~~~~~~~~~~^^ File "C:\Python314\Lib\concurrent\futures\_base.py", line 443, in result return self.__get_result() ~~~~~~~~~~~~~~~~~^^ File "C:\Python314\Lib\concurrent\futures\_base.py", line 395, in __get_result raise self._exception File "C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\tenacity\__init__.py", line 473, in __call__ result = fn(*args, **kwargs) File "C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\google\genai\_api_client.py", line 1214, in _request_once errors.APIError.raise_for_response(response) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^ File "C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\google\genai\errors.py", line 134, in raise_for_response cls.raise_error(response.status_code, response_json, response) ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\google\genai\errors.py", line 159, in raise_error raise ClientError(status_code, response_json, response) google.genai.errors.ClientError: 404 NOT_FOUND. {'error': {'code': 404, 'message': 'models/gemini-1.5-pro is not found for API version v1beta, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.', 'status': 'NOT_FOUND'}} The above exception was the direct cause of the following exception: Traceback (most recent call last): File "D:\Programming\Antigravity\DuckyAI\test_bot.py", line 9, in test res = await agent.chat('test_session', 'Hello!') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Programming\Antigravity\DuckyAI\ai_agent.py", line 57, in chat response = await asyncio.to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^ ...<3 lines>... ) ^ File "C:\Python314\Lib\asyncio\threads.py", line 25, in to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python314\Lib\concurrent\futures\thread.py", line 86, in run result = ctx.run(self.task) File "C:\Python314\Lib\concurrent\futures\thread.py", line 73, in run return fn(*args, **kwargs) File "C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\langchain_core\runnables\base.py", line 5695, in invoke return self.bound.invoke( ~~~~~~~~~~~~~~~~~^ input, ^^^^^^ self._merge_configs(config), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ **{**self.kwargs, **kwargs}, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\langchain_core\runnables\base.py", line 5695, in invoke return self.bound.invoke( ~~~~~~~~~~~~~~~~~^ input, ^^^^^^ self._merge_configs(config), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ **{**self.kwargs, **kwargs}, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\langchain_core\runnables\base.py", line 3157, in invoke input_ = context.run(step.invoke, input_, config) File "C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\langchain_core\runnables\base.py", line 5695, in invoke return self.bound.invoke( ~~~~~~~~~~~~~~~~~^ input, ^^^^^^ self._merge_configs(config), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ **{**self.kwargs, **kwargs}, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\langchain_core\runnables\base.py", line 5018, in invoke return self._call_with_config( ~~~~~~~~~~~~~~~~~~~~~~^ self._invoke, ^^^^^^^^^^^^^ ...<2 lines>... **kwargs, ^^^^^^^^^ ) ^ File "C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\langchain_core\runnables\base.py", line 2060, in _call_with_config context.run( ~~~~~~~~~~~^ call_func_with_variable_args, # type: ignore[arg-type] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<4 lines>... **kwargs, ^^^^^^^^^ ), ^ File "C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\langchain_core\runnables\config.py", line 452, in call_func_with_variable_args return func(input, **kwargs) # type: ignore[call-arg] File "C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\langchain_core\runnables\base.py", line 4886, in _invoke output = output.invoke( input_, ...<4 lines>... ), ) File "C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\langchain_core\runnables\base.py", line 5695, in invoke return self.bound.invoke( ~~~~~~~~~~~~~~~~~^ input, ^^^^^^ self._merge_configs(config), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ **{**self.kwargs, **kwargs}, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\langchain_core\runnables\base.py", line 3157, in invoke input_ = context.run(step.invoke, input_, config) File "C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\langchain_google_genai\chat_models.py", line 2535, in invoke return super().invoke(input, config, stop=stop, **kwargs) ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\langchain_core\language_models\chat_models.py", line 402, in invoke self.generate_prompt( ~~~~~~~~~~~~~~~~~~~~^ [self._convert_input(input)], ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<6 lines>... **kwargs, ^^^^^^^^^ ).generations[0][0], ^ File "C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\langchain_core\language_models\chat_models.py", line 1121, in generate_prompt return self.generate(prompt_messages, stop=stop, callbacks=callbacks, **kwargs) ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\langchain_core\language_models\chat_models.py", line 931, in generate self._generate_with_cache( ~~~~~~~~~~~~~~~~~~~~~~~~~^ m, ^^ ...<2 lines>... **kwargs, ^^^^^^^^^ ) ^ File "C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\langchain_core\language_models\chat_models.py", line 1233, in _generate_with_cache result = self._generate( messages, stop=stop, run_manager=run_manager, **kwargs ) File "C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\langchain_google_genai\chat_models.py", line 3051, in _generate _handle_client_error(e, request) ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^ File "C:\Users\Danial\AppData\Roaming\Python\Python314\site-packages\langchain_google_genai\chat_models.py", line 145, in _handle_client_error raise ChatGoogleGenerativeAIError(msg) from e langchain_google_genai.chat_models.ChatGoogleGenerativeAIError: Error calling model 'gemini-1.5-pro' (NOT_FOUND): 404 NOT_FOUND. {'error': {'code': 404, 'message': 'models/gemini-1.5-pro is not found for API version v1beta, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.', 'status': 'NOT_FOUND'}}