Repository: langchain
Issue: Exception when trying to pull Google GenAI prompt
Labels: 🤖:bug,investigate,Ɑ:  core

### Checked other resources

- [X] I added a very descriptive title to this issue.
- [X] I searched the LangChain documentation with the integrated search.
- [X] I used the GitHub search to find a similar question and didn't find it.
- [X] I am sure that this is a bug in LangChain rather than my code.
- [X] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

### Example Code

```python
from langchain import hub as prompts
prompts.pull("prompt_name", include_model=True)
```

### Error Message and Stack Trace (if applicable)

  File "/home/federicoomoto/src/fairway/pr/fairway-fastapi/app/firebase/prompts.py", line 14, in get_prompt
    prompt = prompts.pull(
             ^^^^^^^^^^^^^
  File "/home/federicoomoto/.cache/pypoetry/virtualenvs/fairway-fastapi-VcPivsSZ-py3.12/lib/python3.12/site-packages/langchain/hub.py", line 114, in pull
    response = client.pull_prompt(owner_repo_commit, include_model=include_model)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/federicoomoto/.cache/pypoetry/virtualenvs/fairway-fastapi-VcPivsSZ-py3.12/lib/python3.12/site-packages/langsmith/client.py", line 5301, in pull_prompt
    prompt = loads(json.dumps(prompt_object.manifest))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/federicoomoto/.cache/pypoetry/virtualenvs/fairway-fastapi-VcPivsSZ-py3.12/lib/python3.12/site-packages/langchain_core/_api/beta_decorator.py", line 110, in warning_emitting_wrapper
    return wrapped(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/federicoomoto/.cache/pypoetry/virtualenvs/fairway-fastapi-VcPivsSZ-py3.12/lib/python3.12/site-packages/langchain_core/load/load.py", line 181, in loads
    return json.loads(
           ^^^^^^^^^^^
  File "/usr/lib64/python3.12/json/__init__.py", line 359, in loads
    return cls(**kw).decode(s)
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/federicoomoto/.cache/pypoetry/virtualenvs/fairway-fastapi-VcPivsSZ-py3.12/lib/python3.12/site-packages/langchain_core/load/load.py", line 119, in __call__
    raise ValueError(
ValueError: Trying to deserialize something that cannot be deserialized in current version of langchain-core: ('langchain', 'chat_models', 'google_genai', 'ChatGoogleGenerativeAI')

### Description

When trying to pull a Google GenAI prompt from LangSmith, including the model, I get the following exception:

ValueError: Trying to deserialize something that cannot be deserialized in current version of langchain-core: ('langchain', 'chat_models', 'google_genai', 'ChatGoogleGenerativeAI')

If I try to pull the prompt without the model, everything works as expected.

The model config is as follows:

![image](https://github.com/user-attachments/assets/282baf32-9766-4484-b9a8-24a016e30de7)


### System Info

System Information
------------------
> OS:  Linux
> OS Version:  #1 SMP PREEMPT_DYNAMIC Sun Aug 11 15:32:50 UTC 2024
> Python Version:  3.12.4 (main, Jun  7 2024, 00:00:00) [GCC 14.1.1 20240607 (Red Hat 14.1.1-5)]

Package Information
-------------------
> langchain_core: 0.3.0
> langchain: 0.3.0
> langsmith: 0.1.121
> langchain_google_genai: 2.0.0
> langchain_openai: 0.2.0
> langchain_text_splitters: 0.3.0

Optional packages not installed
-------------------------------
> langgraph
> langserve

Other Dependencies
------------------
> aiohttp: 3.10.5
> async-timeout: Installed. No version info available.
> google-generativeai: 0.7.2
> httpx: 0.27.2
> jsonpatch: 1.33
> numpy: 1.26.4
> openai: 1.45.1
> orjson: 3.10.7
> packaging: 24.1
> pillow: 10.4.0
> pydantic: 2.9.1
> PyYAML: 6.0.2
> requests: 2.32.3
> SQLAlchemy: 2.0.34
> tenacity: 8.5.0
> tiktoken: 0.7.0
> typing-extensions: 4.12.2