Skip to content

Ingesting documents with Amazon Bedrock inference fails with "Invalid value [ingest] received" #126709

@kderusso

Description

@kderusso

Elasticsearch Version

Serverless

Installed Plugins

No response

Java Version

bundled

OS Version

Serverless

Problem Description

Ingesting semantic_text content using Amazon Titan is returning inference failures.

Digging into what might be causing this error, it's potentially a combination of this line (from 5 months ago) - with a hardcoded InputType.INGEST for chunked inference - combined with the logic here added last month.

Steps to Reproduce

Perform the following requests, using Amazon Bedrock credentials with support for amazon.titan-embed-text-v2:0:

PUT /_inference/text_embedding/my-bedrock-embeddings { "service": "amazonbedrock", "service_settings": { "access_key": "...", "secret_key": "...", "provider": "amazontitan", "model": "amazon.titan-embed-text-v2:0", "region": "us-east-1" } } PUT my-test-index { "mappings": { "properties": { "semantic_field": { "type": "semantic_text", "inference_id": "my-bedrock-embeddings" } } } } PUT my-test-index/_doc/1 { "semantic_field": "The Jedi Master Yoda said, do or do not, there is no try" } 

The ingest request will return the following inference error:

{ "error": { "root_cause": [ { "type": "validation_exception", "reason": "Validation Failed: 1: Invalid value [ingest] received. [input_type] is not allowed for provider [amazontitan];" } ], "type": "validation_exception", "reason": "Validation Failed: 1: Invalid value [ingest] received. [input_type] is not allowed for provider [amazontitan];" }, "status": 400 } 

The following script has been verified to work on 8.17.4 but is failing in serverless.

Logs (if relevant)

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions