Skip to content

[FLINK-AGENTS-524] Add Amazon OpenSearch and S3 Vectors vector store integrations#533

Open
avichaym wants to merge 8 commits intoapache:mainfrom
avichaym:feature/aws-vector-stores
Open

[FLINK-AGENTS-524] Add Amazon OpenSearch and S3 Vectors vector store integrations#533
avichaym wants to merge 8 commits intoapache:mainfrom
avichaym:feature/aws-vector-stores

Conversation

@avichaym
Copy link

@avichaym avichaym commented Feb 10, 2026

Linked issue: #524

Depends on #534 — please merge that first.

Purpose of change

Add Amazon OpenSearch and S3 Vectors as vector store providers.

  • OpenSearchVectorStore — Supports Serverless (AOSS) and Service domains, IAM/basic auth, implements CollectionManageableVectorStore for Long-Term Memory, KNN search with filter support, chunked bulk writes
  • S3VectorsVectorStore — S3 Vectors SDK, PutVectors chunked at 500 (API limit)

Both override add() for batch embedding optimization.

New modules: integrations/vector-stores/opensearch/, integrations/vector-stores/s3vectors/

Tests

  • Unit tests: OpenSearch (4), S3 Vectors (2)
  • Integration tests gated by env vars (OPENSEARCH_ENDPOINT, S3V_BUCKET): collection CRUD, document CRUD, filtered query
  • End-to-end validated with RAG and Long-Term Memory demos against real OpenSearch domain and S3 Vectors bucket

API

No public API changes. New integration modules only.

Documentation

  • doc-needed
  • doc-not-needed
  • doc-included

Avichay Marciano added 2 commits February 10, 2026 08:02
…grations

Add two new integration modules for Amazon Bedrock:

- Chat model using the Converse API with native tool calling support,
  SigV4 auth via DefaultCredentialsProvider, and token metrics reporting.
  Supports all Bedrock models accessible via Converse API.

- Embedding model using Titan Text Embeddings V2 via InvokeModel.
  Batch embed(List<String>) parallelizes via configurable thread pool
  (embed_concurrency parameter, default 4).

Includes unit tests for constructors, parameter handling, and inheritance.
@github-actions github-actions bot added priority/major Default priority of the PR or issue. fixVersion/0.3.0 The feature or bug should be implemented/fixed in the 0.3.0 version. labels Feb 10, 2026
@avichaym avichaym changed the title [FLINK-AGENTS-523] Add Amazon Bedrock chat model and embedding model integrations [FLINK-AGENTS-524] Add Amazon OpenSearch and S3 Vectors vector store integrations Feb 10, 2026
@avichaym avichaym force-pushed the feature/aws-vector-stores branch from 56b9836 to 9f4f768 Compare February 10, 2026 16:37
@github-actions github-actions bot added the doc-label-missing The Bot applies this label either because none or multiple labels were provided. label Feb 10, 2026
@github-actions
Copy link

@avichaym Please add the following content to your PR description and select a checkbox:

- [ ] `doc-needed` 
- [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-included` 

@github-actions github-actions bot added doc-not-needed Your PR changes do not impact docs and removed doc-label-missing The Bot applies this label either because none or multiple labels were provided. labels Feb 10, 2026
@wenjin272 wenjin272 added doc-needed Your PR changes impact docs. and removed doc-not-needed Your PR changes do not impact docs labels Feb 12, 2026
@avichaym avichaym force-pushed the feature/aws-vector-stores branch from 9f4f768 to c492b13 Compare February 13, 2026 22:25
Avichay Marciano added 4 commits February 19, 2026 09:47
…ences

- Add exponential backoff retry (MAX_RETRIES=5) for ThrottlingException,
  ServiceUnavailableException, ModelErrorException, 429, 503 — consistent
  with BedrockEmbeddingModelConnection in this PR.
- Remove {..} JSON extraction fallback from stripMarkdownFences that could
  corrupt normal text responses containing braces.
- Only apply markdown fence stripping on non-tool-call responses.
- Add 5 unit tests for stripMarkdownFences covering: text with braces,
  clean JSON, json fences, plain fences, and null input.
…grations

Add two new vector store integration modules:

- OpenSearch: supports Serverless (AOSS) and Service domains, IAM
  (SigV4) or basic auth. Implements CollectionManageableVectorStore.
  ANN search via knn query with ef_search, min_score, and filter_query
  support. Bulk writes chunked by configurable max_bulk_mb.

- S3 Vectors: uses S3 Vectors SDK for PutVectors/QueryVectors/
  GetVectors/DeleteVectors. PutVectors chunked at 500 (API limit).

Both override add() for batch embedding via embed(List<String>).

Includes unit tests and integration tests (auto-enabled via
OPENSEARCH_ENDPOINT / S3V_BUCKET environment variables).
Validated against real OpenSearch domain and S3 Vectors bucket.
…docs

Bedrock (chat + embedding):
- Add close() to release AWS SDK clients and thread pools
- Wire max_tokens through BedrockChatModelSetup into InferenceConfiguration
- Add retry jitter to BedrockEmbeddingModelConnection
- Add typed getConnection() override to BedrockEmbeddingModelSetup
- Document stripMarkdownFences necessity and future work

OpenSearch vector store:
- Add close() to release SdkHttpClient
- Cache DefaultCredentialsProvider (was creating new instance per request)
- Add constructor validation for required endpoint/index params
- Add limit support in get() via extraArgs
- Add TODO for Aws4Signer deprecation and batch add() dedup

S3 Vectors vector store:
- Add close() to release S3VectorsClient
- Add constructor validation for required vector_bucket/vector_index params
- size() now throws UnsupportedOperationException instead of returning -1
- Add TODO for batch add() dedup

All files: expand wildcard imports, add usage example Javadocs
@avichaym avichaym force-pushed the feature/aws-vector-stores branch from c492b13 to dd77d50 Compare February 19, 2026 09:08
OpenSearchVectorStore:
- Add retry with exponential backoff for 429/502/503 in executeRequest()
- Only ignore 404s in getCollection/deleteCollection (not all exceptions)
- Close credentialsProvider in close()

S3VectorsVectorStore:
- Add retry with backoff for putVectors (ThrottlingException, 429, 503)

Consistent with retry patterns in BedrockChatModelConnection and
BedrockEmbeddingModelConnection.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-needed Your PR changes impact docs. fixVersion/0.3.0 The feature or bug should be implemented/fixed in the 0.3.0 version. priority/major Default priority of the PR or issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments