aws-samples / aws-samples/bedrock-chat

[BUG] Advanced Parsing: default parsing models are end-of-life, ingestion fails with 404 and syncs silently succeed

Open
#1,126 0 comments 0 reactions 0 assignees View on GitHub
planned
Dominant language
TypeScript
Stars
1.3k
Forks
535
Avg merge
1d 12h
Merged PRs (30d)
10

Description

### Describe the bug

Enabling **Advanced Parsing** on a bot knowledge base breaks document ingestion for the default model choices, and the failure is silent: the sync can end up looking completed while zero documents were indexed, so the bot answers nothing from its knowledge.

Error from the `EmbeddingSynchronizeDataSourceHandler` logs:

```
[ERROR] ValidationException: An error occurred (ValidationException) when calling the
IngestKnowledgeBaseDocuments operation: Knowledge base role
arn:aws:iam:::role/AmazonBedrockExecutionRoleForKnowledgeBase... is not able
to call the specified model
arn:aws:bedrock:eu-central-2::foundation-model/anthropic.claude-3-5-sonnet-20240620-v1:0:
This model version has reached the end of its life. (Status Code: 404)
```

### Root cause

The parsing model allowlist (`backend/app/routes/schemas/bot_kb.py`):

```python
type_kb_parsing_model = Literal[
"anthropic.claude-3-5-sonnet-v1",
"anthropic.claude-3-haiku-v1",
"anthropic.claude-3-sonnet-v1",
"disabled",
]
```

* `anthropic.claude-3-5-sonnet-v1` and `anthropic.claude-3-sonnet-v1` have reached **end of life** on Bedrock: every ingestion using them fails with the 404 above.
* `anthropic.claude-3-haiku-v1` is the only option still invocable (verified via `list-foundation-models`: it is the last Claude model with `ON_DEMAND` inference), but it is a legacy early-2024 model.
* Simply bumping the list to newer models is not enough: **every current Claude model on Bedrock is `INFERENCE_PROFILE`-only**, so the parsing configuration would need inference-profile ARN support (and matching KB role permissions across the profile regions). Today `getParsingModel` in `cdk/lib/utils/bedrock-knowledge-base-args.ts` only builds base foundation-model references.

The frontend picker (`frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx`) exposes the same options. Verified at v3.17.0 and on current `v3` HEAD.

### Steps to reproduce

1. Create or edit a bot with a knowledge base.
2. Set Advanced Parsing Model to Claude 3.5 Sonnet v1 (the first non-disabled option).
3. Add a document and sync: ingestion fails ("This model version has reached the end of its life").
4. Workaround: set Advanced Parsing back to Disabled and the same documents ingest fine.

### Expected behavior

Advanced Parsing works with the offered models, and per-document ingestion failures surface in the bot sync status instead of failing silently.

### Suggested fix

1. Short term: stop offering the end-of-life models and keep stored bots deserializable → PR #1127.
2. Follow-up: support inference profiles for parsing (per the AWS docs on [parsing options](https://docs.aws.amazon.com/bedrock/latest/userguide/kb-advanced-parsing.html) and [supported models for parsing](https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-supported.html#knowledge-base-supported-parsing), current Claude / Nova vision families are supported parsers) so a current-generation model can be offered again.
3. Surface per-document `IngestKnowledgeBaseDocuments` failures in the sync status, and validate region availability of the configured parsing model.

Contributor guide

Open the contributing guide

Research direction

Start with backend/app/routes/schemas/bot_kb.py and frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx to trace the parsing-model options, then read getParsingModel in cdk/lib/utils/bedrock-knowledge-base-args.ts. Check the EmbeddingSynchronizeDataSourceHandler ingestion path and its sync status handling. Done means end-of-life models are no longer offered while stored bots remain deserializable, supported parsing configuration works, and ingestion failures surface.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python, typescript
Domain
backend, cloud, frontend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.