-
Notifications
You must be signed in to change notification settings - Fork 186
Accept passthrough headers in agent execute #4364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Accept passthrough headers in agent execute #4364
Conversation
Zhangxunmt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spotless needs to apply
55ee4c9 to
856c4fa
Compare
856c4fa to
acac26b
Compare
4327051 to
c14d0c5
Compare
ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/AgentUtils.java
Outdated
Show resolved
Hide resolved
| private static final String HEADER_FAS_SECRET_KEY = "x-amzn-fas-secretkey"; | ||
| private static final String HEADER_FAS_SESSION_TOKEN = "x-amzn-fas-sessiontoken"; | ||
| private static final String HEADER_DATASOURCES = "x-amzn-datasources"; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we change it to x-amzn-datasource-endpoint and add a new header x-amzn-datasource-type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
discussed with team today, we will accept these headers in ml-commons to match opensearch-mcp-server-py
- opensearch-url
- aws-region
- aws-access-key-id
- aws-secret-access-key
- aws-session-token
- aws-service-name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 we should generic headers which opensearch mcp server accepts.
Signed-off-by: Jiaping Zeng <[email protected]>
Signed-off-by: Jiaping Zeng <[email protected]>
Signed-off-by: Jiaping Zeng <[email protected]>
Signed-off-by: Jiaping Zeng <[email protected]>
16cddcb to
7748952
Compare
Signed-off-by: Jiaping Zeng <[email protected]>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4364 +/- ##
=========================================
Coverage 80.15% 80.15%
- Complexity 10227 10245 +18
=========================================
Files 858 858
Lines 44496 44547 +51
Branches 5145 5158 +13
=========================================
+ Hits 35664 35708 +44
- Misses 6668 6669 +1
- Partials 2164 2170 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Jiaping Zeng <[email protected]>
Description
Create MCP client on each execute request + forward headers to MCP connector
Related Issues
Resolves #[Issue number to be closed when this PR is merged]
Check List
--signoff.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.
Accepted headers:
Sample request:
Response: