[Connectors] Fixes Bedrock connector not using the action proxy configuration#224130
[Connectors] Fixes Bedrock connector not using the action proxy configuration#224130spong merged 13 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/ml-ui (:ml) |
|
Pinging @elastic/appex-ai-infra (Team:AI Infra) |
…ng custom NodeHttpHandler
…urce-definitions/scripts/fix-location-collection.ts'
| accessKeyId: this.secrets.accessKey, | ||
| secretAccessKey: this.secrets.secret, | ||
| }, | ||
| requestHandler: new NodeHttpHandler(isHttps ? { httpsAgent } : { httpAgent }), |
There was a problem hiding this comment.
Even though the latest docs say you can specify httpAgent via httpOptions, it turns out in these other docs that this was deprecated in the upgrade from v2->v3 and you must now do it via requestHandler, which must be specified via a NodeHttpHandler, hence the new explicit dependency.
There was a problem hiding this comment.
@elastic/kibana-security, this was previously a transitive dependency of @aws-sdk/client-bedrock-runtime, but since I have to import NodeHttpHandler I needed to explicitly declare it in our package.json:
https://github.com/aws/aws-sdk-js-v3/blob/main/clients/client-bedrock-runtime/package.json#L50
stephmilovic
left a comment
There was a problem hiding this comment.
Thanks for the fix Garrett!
pmuellr
left a comment
There was a problem hiding this comment.
I think you need to remove the test for the proxy URL when determining which agent to use.
| }; | ||
| } else if (connectorTypeId === '.bedrock') { | ||
| connectorConfig = { | ||
| apiUrl: 'https://_face_api_.com', |
There was a problem hiding this comment.
hahahaha ... was wondering what face was here, looking at the original code, thinking this was a copy/pasta of fake that was made previously, and now copied. DO NOT CHANGE, I love it!
| this.url | ||
| ); | ||
| const isHttps = ( | ||
| this.configurationUtilities.getProxySettings()?.proxyUrl ?? this.url |
There was a problem hiding this comment.
I don't think you want the this.configurationUtilities.getProxySettings()?.proxyUrl part, just the this.url part.
You can configure an https proxy to an http server, but as far as the actual connection goes, from the standpoint of the client you are interacting with, it's all http. The https bits are all under the covers ...
And if you try to use an https agent with an http connection, I suspect that will cause problems.
There was a problem hiding this comment.
Thanks for the feedback @pmuellr, I hadn't realized! This is resolved in 4b2c64e.
Also cc @e40pud as this is what he did over in https://github.com/elastic/kibana/pull/224129/files#diff-c3049a99b1502b0141a372106e3d0061db506862cbaf77c05657c7d77e794658R90-R93 as well.
|
Starting backport for target branches: 8.18, 8.19, 9.0 |
💚 Build Succeeded
Metrics [docs]
History
cc @spong |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
…ration (elastic#224130) ## Summary Similar to elastic#219617, this PR fixes an issue with the `BedrockConnector` not using the configured `xpack.actions.proxyUrl`. To test, add the following [`xpack.actions.proxyUrl`](https://p.elstc.co/paste/DaM71BUP#iHki8gmY4-LZcfQD0ja6HeMHknuvpEvQtSbapcAEOXb) to your `kibana.dev.yml`, then create a Bedrock connector and confirm in the Kibana server logs that the configured proxy is being used and a successful response is returned. Sample `debug` logs look something along the lines of: ``` [2025-06-16T11:59:36.282-06:00][DEBUG][plugins.actions.bedrock] executing action .bedrock:sonnet-3-7: Sonnet 3.7 (Bedrock) [2025-06-16T11:59:36.286-06:00][DEBUG][plugins.actions] Request to external service. Connector Id: sonnet-3-7. Connector type: .bedrock Method: post. URL: https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-3-7-sonnet-20250219-v1%3A0/invoke [2025-06-16T11:59:36.286-06:00][DEBUG][plugins.actions] Creating proxy agents for proxy: https://PROXY_URL/ ``` Be sure to enable debug logging for the actions plugin ala: ``` logging: loggers: - name: plugins.actions level: debug ``` ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co> (cherry picked from commit 321f9a1) # Conflicts: # x-pack/platform/plugins/shared/stack_connectors/server/connector_types/bedrock/bedrock.ts
…ration (elastic#224130) ## Summary Similar to elastic#219617, this PR fixes an issue with the `BedrockConnector` not using the configured `xpack.actions.proxyUrl`. To test, add the following [`xpack.actions.proxyUrl`](https://p.elstc.co/paste/DaM71BUP#iHki8gmY4-LZcfQD0ja6HeMHknuvpEvQtSbapcAEOXb) to your `kibana.dev.yml`, then create a Bedrock connector and confirm in the Kibana server logs that the configured proxy is being used and a successful response is returned. Sample `debug` logs look something along the lines of: ``` [2025-06-16T11:59:36.282-06:00][DEBUG][plugins.actions.bedrock] executing action .bedrock:sonnet-3-7: Sonnet 3.7 (Bedrock) [2025-06-16T11:59:36.286-06:00][DEBUG][plugins.actions] Request to external service. Connector Id: sonnet-3-7. Connector type: .bedrock Method: post. URL: https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-3-7-sonnet-20250219-v1%3A0/invoke [2025-06-16T11:59:36.286-06:00][DEBUG][plugins.actions] Creating proxy agents for proxy: https://PROXY_URL/ ``` Be sure to enable debug logging for the actions plugin ala: ``` logging: loggers: - name: plugins.actions level: debug ``` ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co> (cherry picked from commit 321f9a1) # Conflicts: # renovate.json
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…ration (elastic#224130) ## Summary Similar to elastic#219617, this PR fixes an issue with the `BedrockConnector` not using the configured `xpack.actions.proxyUrl`. To test, add the following [`xpack.actions.proxyUrl`](https://p.elstc.co/paste/DaM71BUP#iHki8gmY4-LZcfQD0ja6HeMHknuvpEvQtSbapcAEOXb) to your `kibana.dev.yml`, then create a Bedrock connector and confirm in the Kibana server logs that the configured proxy is being used and a successful response is returned. Sample `debug` logs look something along the lines of: ``` [2025-06-16T11:59:36.282-06:00][DEBUG][plugins.actions.bedrock] executing action .bedrock:sonnet-3-7: Sonnet 3.7 (Bedrock) [2025-06-16T11:59:36.286-06:00][DEBUG][plugins.actions] Request to external service. Connector Id: sonnet-3-7. Connector type: .bedrock Method: post. URL: https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-3-7-sonnet-20250219-v1%3A0/invoke [2025-06-16T11:59:36.286-06:00][DEBUG][plugins.actions] Creating proxy agents for proxy: https://PROXY_URL/ ``` Be sure to enable debug logging for the actions plugin ala: ``` logging: loggers: - name: plugins.actions level: debug ``` ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co> (cherry picked from commit 321f9a1) # Conflicts: # renovate.json # x-pack/platform/plugins/shared/stack_connectors/server/connector_types/bedrock/bedrock.ts
…onfiguration (#224130) (#224326) # Backport This will backport the following commits from `main` to `9.0`: - [[Connectors] Fix Bedrock connector not using the action proxy configuration (#224130)](#224130) <!--- Backport version: 10.0.1 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Garrett Spong","email":"spong@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-06-17T20:07:24Z","message":"[Connectors] Fix Bedrock connector not using the action proxy configuration (#224130)\n\n## Summary\n\nSimilar to #219617, this PR fixes\nan issue with the `BedrockConnector` not using the configured\n`xpack.actions.proxyUrl`.\n\nTo test, add the following\n[`xpack.actions.proxyUrl`](https://p.elstc.co/paste/DaM71BUP#iHki8gmY4-LZcfQD0ja6HeMHknuvpEvQtSbapcAEOXb)\nto your `kibana.dev.yml`, then create a Bedrock connector and confirm in\nthe Kibana server logs that the configured proxy is being used and a\nsuccessful response is returned. Sample `debug` logs look something\nalong the lines of:\n\n\n```\n[2025-06-16T11:59:36.282-06:00][DEBUG][plugins.actions.bedrock] executing action .bedrock:sonnet-3-7: Sonnet 3.7 (Bedrock)\n[2025-06-16T11:59:36.286-06:00][DEBUG][plugins.actions] Request to external service. Connector Id: sonnet-3-7. Connector type: .bedrock Method: post. URL: https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-3-7-sonnet-20250219-v1%3A0/invoke\n[2025-06-16T11:59:36.286-06:00][DEBUG][plugins.actions] Creating proxy agents for proxy: https://PROXY_URL/\n```\n\n\nBe sure to enable debug logging for the actions plugin ala:\n\n```\nlogging:\n loggers:\n - name: plugins.actions\n level: debug\n```\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Steph Milovic <stephanie.milovic@elastic.co>","sha":"321f9a18d4d93bf87ef2b1612edbd571bf0fcb48","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix",":ml","backport:version","Team:AI Infra","v9.1.0","v8.19.0","v9.0.3","v8.18.3"],"title":"[Connectors] Fix Bedrock connector not using the action proxy configuration","number":224130,"url":"https://github.com/elastic/kibana/pull/224130","mergeCommit":{"message":"[Connectors] Fix Bedrock connector not using the action proxy configuration (#224130)\n\n## Summary\n\nSimilar to #219617, this PR fixes\nan issue with the `BedrockConnector` not using the configured\n`xpack.actions.proxyUrl`.\n\nTo test, add the following\n[`xpack.actions.proxyUrl`](https://p.elstc.co/paste/DaM71BUP#iHki8gmY4-LZcfQD0ja6HeMHknuvpEvQtSbapcAEOXb)\nto your `kibana.dev.yml`, then create a Bedrock connector and confirm in\nthe Kibana server logs that the configured proxy is being used and a\nsuccessful response is returned. Sample `debug` logs look something\nalong the lines of:\n\n\n```\n[2025-06-16T11:59:36.282-06:00][DEBUG][plugins.actions.bedrock] executing action .bedrock:sonnet-3-7: Sonnet 3.7 (Bedrock)\n[2025-06-16T11:59:36.286-06:00][DEBUG][plugins.actions] Request to external service. Connector Id: sonnet-3-7. Connector type: .bedrock Method: post. URL: https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-3-7-sonnet-20250219-v1%3A0/invoke\n[2025-06-16T11:59:36.286-06:00][DEBUG][plugins.actions] Creating proxy agents for proxy: https://PROXY_URL/\n```\n\n\nBe sure to enable debug logging for the actions plugin ala:\n\n```\nlogging:\n loggers:\n - name: plugins.actions\n level: debug\n```\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Steph Milovic <stephanie.milovic@elastic.co>","sha":"321f9a18d4d93bf87ef2b1612edbd571bf0fcb48"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","9.0","8.18"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/224130","number":224130,"mergeCommit":{"message":"[Connectors] Fix Bedrock connector not using the action proxy configuration (#224130)\n\n## Summary\n\nSimilar to #219617, this PR fixes\nan issue with the `BedrockConnector` not using the configured\n`xpack.actions.proxyUrl`.\n\nTo test, add the following\n[`xpack.actions.proxyUrl`](https://p.elstc.co/paste/DaM71BUP#iHki8gmY4-LZcfQD0ja6HeMHknuvpEvQtSbapcAEOXb)\nto your `kibana.dev.yml`, then create a Bedrock connector and confirm in\nthe Kibana server logs that the configured proxy is being used and a\nsuccessful response is returned. Sample `debug` logs look something\nalong the lines of:\n\n\n```\n[2025-06-16T11:59:36.282-06:00][DEBUG][plugins.actions.bedrock] executing action .bedrock:sonnet-3-7: Sonnet 3.7 (Bedrock)\n[2025-06-16T11:59:36.286-06:00][DEBUG][plugins.actions] Request to external service. Connector Id: sonnet-3-7. Connector type: .bedrock Method: post. URL: https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-3-7-sonnet-20250219-v1%3A0/invoke\n[2025-06-16T11:59:36.286-06:00][DEBUG][plugins.actions] Creating proxy agents for proxy: https://PROXY_URL/\n```\n\n\nBe sure to enable debug logging for the actions plugin ala:\n\n```\nlogging:\n loggers:\n - name: plugins.actions\n level: debug\n```\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Steph Milovic <stephanie.milovic@elastic.co>","sha":"321f9a18d4d93bf87ef2b1612edbd571bf0fcb48"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
…configuration (#224130) (#224327) # Backport This will backport the following commits from `main` to `8.19`: - [[Connectors] Fix Bedrock connector not using the action proxy configuration (#224130)](#224130) <!--- Backport version: 10.0.1 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Garrett Spong","email":"spong@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-06-17T20:07:24Z","message":"[Connectors] Fix Bedrock connector not using the action proxy configuration (#224130)\n\n## Summary\n\nSimilar to #219617, this PR fixes\nan issue with the `BedrockConnector` not using the configured\n`xpack.actions.proxyUrl`.\n\nTo test, add the following\n[`xpack.actions.proxyUrl`](https://p.elstc.co/paste/DaM71BUP#iHki8gmY4-LZcfQD0ja6HeMHknuvpEvQtSbapcAEOXb)\nto your `kibana.dev.yml`, then create a Bedrock connector and confirm in\nthe Kibana server logs that the configured proxy is being used and a\nsuccessful response is returned. Sample `debug` logs look something\nalong the lines of:\n\n\n```\n[2025-06-16T11:59:36.282-06:00][DEBUG][plugins.actions.bedrock] executing action .bedrock:sonnet-3-7: Sonnet 3.7 (Bedrock)\n[2025-06-16T11:59:36.286-06:00][DEBUG][plugins.actions] Request to external service. Connector Id: sonnet-3-7. Connector type: .bedrock Method: post. URL: https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-3-7-sonnet-20250219-v1%3A0/invoke\n[2025-06-16T11:59:36.286-06:00][DEBUG][plugins.actions] Creating proxy agents for proxy: https://PROXY_URL/\n```\n\n\nBe sure to enable debug logging for the actions plugin ala:\n\n```\nlogging:\n loggers:\n - name: plugins.actions\n level: debug\n```\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Steph Milovic <stephanie.milovic@elastic.co>","sha":"321f9a18d4d93bf87ef2b1612edbd571bf0fcb48","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix",":ml","backport:version","Team:AI Infra","v9.1.0","v8.19.0","v9.0.3","v8.18.3"],"title":"[Connectors] Fix Bedrock connector not using the action proxy configuration","number":224130,"url":"https://github.com/elastic/kibana/pull/224130","mergeCommit":{"message":"[Connectors] Fix Bedrock connector not using the action proxy configuration (#224130)\n\n## Summary\n\nSimilar to #219617, this PR fixes\nan issue with the `BedrockConnector` not using the configured\n`xpack.actions.proxyUrl`.\n\nTo test, add the following\n[`xpack.actions.proxyUrl`](https://p.elstc.co/paste/DaM71BUP#iHki8gmY4-LZcfQD0ja6HeMHknuvpEvQtSbapcAEOXb)\nto your `kibana.dev.yml`, then create a Bedrock connector and confirm in\nthe Kibana server logs that the configured proxy is being used and a\nsuccessful response is returned. Sample `debug` logs look something\nalong the lines of:\n\n\n```\n[2025-06-16T11:59:36.282-06:00][DEBUG][plugins.actions.bedrock] executing action .bedrock:sonnet-3-7: Sonnet 3.7 (Bedrock)\n[2025-06-16T11:59:36.286-06:00][DEBUG][plugins.actions] Request to external service. Connector Id: sonnet-3-7. Connector type: .bedrock Method: post. URL: https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-3-7-sonnet-20250219-v1%3A0/invoke\n[2025-06-16T11:59:36.286-06:00][DEBUG][plugins.actions] Creating proxy agents for proxy: https://PROXY_URL/\n```\n\n\nBe sure to enable debug logging for the actions plugin ala:\n\n```\nlogging:\n loggers:\n - name: plugins.actions\n level: debug\n```\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Steph Milovic <stephanie.milovic@elastic.co>","sha":"321f9a18d4d93bf87ef2b1612edbd571bf0fcb48"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","9.0","8.18"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/224130","number":224130,"mergeCommit":{"message":"[Connectors] Fix Bedrock connector not using the action proxy configuration (#224130)\n\n## Summary\n\nSimilar to #219617, this PR fixes\nan issue with the `BedrockConnector` not using the configured\n`xpack.actions.proxyUrl`.\n\nTo test, add the following\n[`xpack.actions.proxyUrl`](https://p.elstc.co/paste/DaM71BUP#iHki8gmY4-LZcfQD0ja6HeMHknuvpEvQtSbapcAEOXb)\nto your `kibana.dev.yml`, then create a Bedrock connector and confirm in\nthe Kibana server logs that the configured proxy is being used and a\nsuccessful response is returned. Sample `debug` logs look something\nalong the lines of:\n\n\n```\n[2025-06-16T11:59:36.282-06:00][DEBUG][plugins.actions.bedrock] executing action .bedrock:sonnet-3-7: Sonnet 3.7 (Bedrock)\n[2025-06-16T11:59:36.286-06:00][DEBUG][plugins.actions] Request to external service. Connector Id: sonnet-3-7. Connector type: .bedrock Method: post. URL: https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-3-7-sonnet-20250219-v1%3A0/invoke\n[2025-06-16T11:59:36.286-06:00][DEBUG][plugins.actions] Creating proxy agents for proxy: https://PROXY_URL/\n```\n\n\nBe sure to enable debug logging for the actions plugin ala:\n\n```\nlogging:\n loggers:\n - name: plugins.actions\n level: debug\n```\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Steph Milovic <stephanie.milovic@elastic.co>","sha":"321f9a18d4d93bf87ef2b1612edbd571bf0fcb48"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
…configuration (#224130) (#224328) # Backport This will backport the following commits from `main` to `8.18`: - [[Connectors] Fix Bedrock connector not using the action proxy configuration (#224130)](#224130) <!--- Backport version: 10.0.1 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Garrett Spong","email":"spong@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-06-17T20:07:24Z","message":"[Connectors] Fix Bedrock connector not using the action proxy configuration (#224130)\n\n## Summary\n\nSimilar to #219617, this PR fixes\nan issue with the `BedrockConnector` not using the configured\n`xpack.actions.proxyUrl`.\n\nTo test, add the following\n[`xpack.actions.proxyUrl`](https://p.elstc.co/paste/DaM71BUP#iHki8gmY4-LZcfQD0ja6HeMHknuvpEvQtSbapcAEOXb)\nto your `kibana.dev.yml`, then create a Bedrock connector and confirm in\nthe Kibana server logs that the configured proxy is being used and a\nsuccessful response is returned. Sample `debug` logs look something\nalong the lines of:\n\n\n```\n[2025-06-16T11:59:36.282-06:00][DEBUG][plugins.actions.bedrock] executing action .bedrock:sonnet-3-7: Sonnet 3.7 (Bedrock)\n[2025-06-16T11:59:36.286-06:00][DEBUG][plugins.actions] Request to external service. Connector Id: sonnet-3-7. Connector type: .bedrock Method: post. URL: https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-3-7-sonnet-20250219-v1%3A0/invoke\n[2025-06-16T11:59:36.286-06:00][DEBUG][plugins.actions] Creating proxy agents for proxy: https://PROXY_URL/\n```\n\n\nBe sure to enable debug logging for the actions plugin ala:\n\n```\nlogging:\n loggers:\n - name: plugins.actions\n level: debug\n```\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Steph Milovic <stephanie.milovic@elastic.co>","sha":"321f9a18d4d93bf87ef2b1612edbd571bf0fcb48","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix",":ml","backport:version","Team:AI Infra","v9.1.0","v8.19.0","v9.0.3","v8.18.3"],"title":"[Connectors] Fix Bedrock connector not using the action proxy configuration","number":224130,"url":"https://github.com/elastic/kibana/pull/224130","mergeCommit":{"message":"[Connectors] Fix Bedrock connector not using the action proxy configuration (#224130)\n\n## Summary\n\nSimilar to #219617, this PR fixes\nan issue with the `BedrockConnector` not using the configured\n`xpack.actions.proxyUrl`.\n\nTo test, add the following\n[`xpack.actions.proxyUrl`](https://p.elstc.co/paste/DaM71BUP#iHki8gmY4-LZcfQD0ja6HeMHknuvpEvQtSbapcAEOXb)\nto your `kibana.dev.yml`, then create a Bedrock connector and confirm in\nthe Kibana server logs that the configured proxy is being used and a\nsuccessful response is returned. Sample `debug` logs look something\nalong the lines of:\n\n\n```\n[2025-06-16T11:59:36.282-06:00][DEBUG][plugins.actions.bedrock] executing action .bedrock:sonnet-3-7: Sonnet 3.7 (Bedrock)\n[2025-06-16T11:59:36.286-06:00][DEBUG][plugins.actions] Request to external service. Connector Id: sonnet-3-7. Connector type: .bedrock Method: post. URL: https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-3-7-sonnet-20250219-v1%3A0/invoke\n[2025-06-16T11:59:36.286-06:00][DEBUG][plugins.actions] Creating proxy agents for proxy: https://PROXY_URL/\n```\n\n\nBe sure to enable debug logging for the actions plugin ala:\n\n```\nlogging:\n loggers:\n - name: plugins.actions\n level: debug\n```\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Steph Milovic <stephanie.milovic@elastic.co>","sha":"321f9a18d4d93bf87ef2b1612edbd571bf0fcb48"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","9.0","8.18"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/224130","number":224130,"mergeCommit":{"message":"[Connectors] Fix Bedrock connector not using the action proxy configuration (#224130)\n\n## Summary\n\nSimilar to #219617, this PR fixes\nan issue with the `BedrockConnector` not using the configured\n`xpack.actions.proxyUrl`.\n\nTo test, add the following\n[`xpack.actions.proxyUrl`](https://p.elstc.co/paste/DaM71BUP#iHki8gmY4-LZcfQD0ja6HeMHknuvpEvQtSbapcAEOXb)\nto your `kibana.dev.yml`, then create a Bedrock connector and confirm in\nthe Kibana server logs that the configured proxy is being used and a\nsuccessful response is returned. Sample `debug` logs look something\nalong the lines of:\n\n\n```\n[2025-06-16T11:59:36.282-06:00][DEBUG][plugins.actions.bedrock] executing action .bedrock:sonnet-3-7: Sonnet 3.7 (Bedrock)\n[2025-06-16T11:59:36.286-06:00][DEBUG][plugins.actions] Request to external service. Connector Id: sonnet-3-7. Connector type: .bedrock Method: post. URL: https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-3-7-sonnet-20250219-v1%3A0/invoke\n[2025-06-16T11:59:36.286-06:00][DEBUG][plugins.actions] Creating proxy agents for proxy: https://PROXY_URL/\n```\n\n\nBe sure to enable debug logging for the actions plugin ala:\n\n```\nlogging:\n loggers:\n - name: plugins.actions\n level: debug\n```\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Steph Milovic <stephanie.milovic@elastic.co>","sha":"321f9a18d4d93bf87ef2b1612edbd571bf0fcb48"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
Summary
Similar to #219617, this PR fixes an issue with the
BedrockConnectornot using the configuredxpack.actions.proxyUrl.To test, add the following
xpack.actions.proxyUrlto yourkibana.dev.yml, then create a Bedrock connector and confirm in the Kibana server logs that the configured proxy is being used and a successful response is returned. Sampledebuglogs look something along the lines of:Be sure to enable debug logging for the actions plugin ala:
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.