llamaIndex - 💡(How to fix) Fix [Bug]: Error with Bedrock's `global.amazon.nova-2-lite-v1:0`

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

botocore.errorfactory.ValidationException: An error occurred (ValidationException) when calling the InvokeModel operation: Malformed input request: #: extraneous key [textGenerationConfig] is not permitted, reformat your input and try again.

Code Example

botocore.errorfactory.ValidationException: An error occurred (ValidationException) when calling the InvokeModel operation:
Malformed input request: #: extraneous key [textGenerationConfig] is not permitted, reformat your input and try again.

---

uv pip install --upgrade llama-index-llms-bedrock

---

from llama_index.llms.bedrock import Bedrock

llm = Bedrock(
    model="global.amazon.nova-2-lite-v1:0",
    temperature=0.0,
    context_size=1000000,
)

llm.something()

---
RAW_BUFFERClick to expand / collapse

Bug Description

When using the model global.amazon.nova-2-lite-v1:0 for inference with Amazon Bedrock, we are observing an exception. With another model, for example global.anthropic.claude-haiku-4-5-20251001-v1:0, everything works well.

botocore.errorfactory.ValidationException: An error occurred (ValidationException) when calling the InvokeModel operation:
Malformed input request: #: extraneous key [textGenerationConfig] is not permitted, reformat your input and try again.

Version

0.14.20

Steps to Reproduce

uv pip install --upgrade llama-index-llms-bedrock
from llama_index.llms.bedrock import Bedrock

llm = Bedrock(
    model="global.amazon.nova-2-lite-v1:0",
    temperature=0.0,
    context_size=1000000,
)

llm.something()

Relevant Logs/Tracebacks

extent analysis

TL;DR

The issue is likely due to an incompatible input configuration for the global.amazon.nova-2-lite-v1:0 model, and removing or modifying the textGenerationConfig key may resolve the issue.

Guidance

  • Verify that the textGenerationConfig key is not required for the global.amazon.nova-2-lite-v1:0 model by checking the model's documentation or configuration options.
  • Check the input configuration for the global.amazon.nova-2-lite-v1:0 model and remove or modify the textGenerationConfig key if it is not necessary.
  • Compare the input configurations for the working model (global.anthropic.claude-haiku-4-5-20251001-v1:0) and the non-working model (global.amazon.nova-2-lite-v1:0) to identify any differences.
  • Consider updating the llama-index-llms-bedrock library to a newer version if available, as the issue may be resolved in a later version.

Example

No code snippet is provided as the issue is related to model configuration and input validation.

Notes

The issue may be specific to the global.amazon.nova-2-lite-v1:0 model or the llama-index-llms-bedrock library version 0.14.20. Further investigation is required to determine the root cause.

Recommendation

Apply workaround: Remove or modify the textGenerationConfig key in the input configuration for the global.amazon.nova-2-lite-v1:0 model, as this is the most likely cause of the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

llamaIndex - 💡(How to fix) Fix [Bug]: Error with Bedrock's `global.amazon.nova-2-lite-v1:0`