Skip to content

Automatically add the configured model_id to neural searches#353

Merged
mbklein merged 1 commit intodeploy/stagingfrom
auto-add-neural-model-id
Mar 19, 2026
Merged

Automatically add the configured model_id to neural searches#353
mbklein merged 1 commit intodeploy/stagingfrom
auto-add-neural-model-id

Conversation

@mbklein
Copy link
Copy Markdown
Contributor

@mbklein mbklein commented Mar 18, 2026

Automatically add the configured model_id (from AWS Secrets Manager) to any neural query that doesn't already have one. This will eliminate the need for the DC front end or the API's MCP server or any other client to know the correct model ID for the API it's calling.

Theoretically, this could be implemented as a request_processor on the index's default search pipeline. Unfortunately, opensearch-project/neural-search#813 made it so the neural query enricher only worked on top-level neural queries (not queries nested in a bool or hybrid), and even though it was supposedly fixed in OpenSearch 2.12, I still couldn't get it to work in my dev index.

While this will allow any public API user to consume Bedrock resources, the cost compared to existing AI search, DC-based hybrid search, and embedding during indexing is negligible.

Copy link
Copy Markdown
Contributor

@bmquinn bmquinn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea! 👍

@mbklein mbklein merged commit 67f21be into deploy/staging Mar 19, 2026
1 check passed
@mbklein mbklein deleted the auto-add-neural-model-id branch March 19, 2026 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants