Repository: langchain
Issue: Bedrock: Unknown parameter in toolConfig.tools[0].toolSpec: "strict", must be one of: name, description, inputSchema
Labels: 🤖:bug

### 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

I created a StructuredPrompt with LangSmith and now am trying to use it with Promptim.

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

```
Error running target function: Parameter validation failed:
Unknown parameter in toolConfig.tools[0].toolSpec: "strict", must be one of: name, description, inputSchema
Traceback (most recent call last):
  File "/Users/austinmw/Desktop/test_promptim/.venv/lib/python3.11/site-packages/langsmith/evaluation/_arunner.py", line 1046, in 
_aforward
    await fn(
  File "/Users/austinmw/Desktop/test_promptim/.venv/lib/python3.11/site-packages/langsmith/run_helpers.py", line 522, in 
async_wrapper
    raise e
  File "/Users/austinmw/Desktop/test_promptim/.venv/lib/python3.11/site-packages/langsmith/run_helpers.py", line 508, in 
async_wrapper
    function_result = await asyncio.create_task(  # type: ignore[call-arg]
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/austinmw/Desktop/test_promptim/promptimizer/src/promptim/trainer.py", line 900, in predict
    return await task.system_safe(prompt, inputs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/austinmw/Desktop/test_promptim/promptimizer/src/promptim/trainer.py", line 358, in prompt_system
    return await prompt_wrapper._postlude.ainvoke(prompt.invoke(inputs))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/austinmw/Desktop/test_promptim/.venv/lib/python3.11/site-packages/langchain_core/runnables/base.py", line 3066, in 
ainvoke
    input = await asyncio.create_task(part(), context=context)  # type: ignore
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/austinmw/Desktop/test_promptim/.venv/lib/python3.11/site-packages/langchain_core/runnables/base.py", line 5366, in 
ainvoke
    return await self.bound.ainvoke(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/austinmw/Desktop/test_promptim/.venv/lib/python3.11/site-packages/langchain_core/language_models/chat_models.py", 
line 307, in ainvoke
    llm_result = await self.agenerate_prompt(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/austinmw/Desktop/test_promptim/.venv/lib/python3.11/site-packages/langchain_core/language_models/chat_models.py", 
line 796, in agenerate_prompt
    return await self.agenerate(
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/austinmw/Desktop/test_promptim/.venv/lib/python3.11/site-packages/langchain_core/language_models/chat_models.py", 
line 756, in agenerate
    raise exceptions[0]
  File "/Users/austinmw/Desktop/test_promptim/.venv/lib/python3.11/site-packages/langchain_core/language_models/chat_models.py", 
line 924, in _agenerate_with_cache
    result = await self._agenerate(
             ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/austinmw/Desktop/test_promptim/.venv/lib/python3.11/site-packages/langchain_core/language_models/chat_models.py", 
line 964, in _agenerate
    return await run_in_executor(
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/austinmw/Desktop/test_promptim/.venv/lib/python3.11/site-packages/langchain_core/runnables/config.py", line 588, in 
run_in_executor
    return await asyncio.get_running_loop().run_in_executor(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/austinmw/mambaforge/envs/py311/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/austinmw/Desktop/test_promptim/.venv/lib/python3.11/site-packages/langchain_core/runnables/config.py", line 579, in 
wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/austinmw/Desktop/test_promptim/.venv/lib/python3.11/site-packages/langchain_aws/chat_models/bedrock_converse.py", 
line 501, in _generate
    response = self.client.converse(
               ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/austinmw/Desktop/test_promptim/.venv/lib/python3.11/site-packages/botocore/client.py", line 569, in _api_call
    return self._make_api_call(operation_name, kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/austinmw/Desktop/test_promptim/.venv/lib/python3.11/site-packages/botocore/client.py", line 980, in _make_api_call
    request_dict = self._convert_to_request_dict(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/austinmw/Desktop/test_promptim/.venv/lib/python3.11/site-packages/botocore/client.py", line 1047, in 
_convert_to_request_dict
    request_dict = self._serializer.serialize_to_request(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/austinmw/Desktop/test_promptim/.venv/lib/python3.11/site-packages/botocore/validate.py", line 381, in 
serialize_to_request
    raise ParamValidationError(report=report.generate_report())
botocore.exceptions.ParamValidationError: Parameter validation failed:
Unknown parameter in toolConfig.tools[0].toolSpec: "strict", must be one of: name, description, inputSchema
```

### Description

See above

### System Info

System Information
------------------
> OS:  Darwin
> OS Version:  Darwin Kernel Version 23.6.0: Wed Jul 31 20:49:39 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_T6000
> Python Version:  3.11.8 | packaged by conda-forge | (main, Feb 16 2024, 20:49:36) [Clang 16.0.6 ]

Package Information
-------------------
> langchain_core: 0.3.24
> langchain: 0.3.11
> langsmith: 0.2.2
> langchain_anthropic: 0.3.0
> langchain_aws: 0.2.9
> langchain_openai: 0.2.12
> langchain_text_splitters: 0.3.2

Optional packages not installed
-------------------------------
> langserve

Other Dependencies
------------------
> aiohttp: 3.11.10
> anthropic: 0.40.0
> async-timeout: Installed. No version info available.
> boto3: 1.35.78
> defusedxml: 0.7.1
> httpx: 0.28.1
> jsonpatch: 1.33
> langsmith-pyo3: Installed. No version info available.
> numpy: 1.26.4
> openai: 1.57.2
> orjson: 3.10.12
> packaging: 24.2
> pydantic: 2.10.3
> PyYAML: 6.0.2
> requests: 2.32.3
> requests-toolbelt: 1.0.0
> SQLAlchemy: 2.0.36
> tenacity: 9.0.0
> tiktoken: 0.8.0
> typing-extensions: 4.12.2