[OpenAI Connector] Enable defaultModel for Azure OpenAI connector to support APIM endpoints#253577
Conversation
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
pmuellr
left a comment
There was a problem hiding this comment.
ResponseOps changes LGTM
|
@elasticmachine merge upstream |
spong
left a comment
There was a problem hiding this comment.
Pair reviewed and confirmed fix -- thanks for getting this fix in @stephmilovic! 🙌
💔 Build Failed
Failed CI StepsMetrics [docs]
History
|
|
Starting backport for target branches: 8.19, 9.2, 9.3 https://github.com/elastic/kibana/actions/runs/22460388800 |
…o support APIM endpoints (elastic#253577) (cherry picked from commit fdbc8b7)
…o support APIM endpoints (elastic#253577) (cherry picked from commit fdbc8b7)
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
…ctor to support APIM endpoints (#253577) (#255185) # Backport This will backport the following commits from `main` to `9.3`: - [[OpenAI Connector] Enable `defaultModel` for Azure OpenAI connector to support APIM endpoints (#253577)](#253577) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Steph Milovic","email":"stephanie.milovic@elastic.co"},"sourceCommit":{"committedDate":"2026-02-26T20:42:24Z","message":"[OpenAI Connector] Enable `defaultModel` for Azure OpenAI connector to support APIM endpoints (#253577)","sha":"fdbc8b78479fa90d96b51f713b9127f50a47b875","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team: SecuritySolution","backport:version","v9.4.0","v9.2.5","v9.3.1","v8.19.12"],"title":"[OpenAI Connector] Enable `defaultModel` for Azure OpenAI connector to support APIM endpoints","number":253577,"url":"https://github.com/elastic/kibana/pull/253577","mergeCommit":{"message":"[OpenAI Connector] Enable `defaultModel` for Azure OpenAI connector to support APIM endpoints (#253577)","sha":"fdbc8b78479fa90d96b51f713b9127f50a47b875"}},"sourceBranch":"main","suggestedTargetBranches":["9.2","9.3","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/253577","number":253577,"mergeCommit":{"message":"[OpenAI Connector] Enable `defaultModel` for Azure OpenAI connector to support APIM endpoints (#253577)","sha":"fdbc8b78479fa90d96b51f713b9127f50a47b875"}},{"branch":"9.2","label":"v9.2.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.3","label":"v9.3.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.12","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co>
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
…o support APIM endpoints (elastic#253577) (cherry picked from commit fdbc8b7) # Conflicts: # x-pack/platform/plugins/shared/stack_connectors/public/connector_types/openai/constants.tsx
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…ctor to support APIM endpoints (#253577) (#255184) # Backport This will backport the following commits from `main` to `9.2`: - [[OpenAI Connector] Enable `defaultModel` for Azure OpenAI connector to support APIM endpoints (#253577)](#253577) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Steph Milovic","email":"stephanie.milovic@elastic.co"},"sourceCommit":{"committedDate":"2026-02-26T20:42:24Z","message":"[OpenAI Connector] Enable `defaultModel` for Azure OpenAI connector to support APIM endpoints (#253577)","sha":"fdbc8b78479fa90d96b51f713b9127f50a47b875","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team: SecuritySolution","backport:version","v9.4.0","v9.2.5","v9.3.1","v8.19.12"],"title":"[OpenAI Connector] Enable `defaultModel` for Azure OpenAI connector to support APIM endpoints","number":253577,"url":"https://github.com/elastic/kibana/pull/253577","mergeCommit":{"message":"[OpenAI Connector] Enable `defaultModel` for Azure OpenAI connector to support APIM endpoints (#253577)","sha":"fdbc8b78479fa90d96b51f713b9127f50a47b875"}},"sourceBranch":"main","suggestedTargetBranches":["9.2","9.3","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/253577","number":253577,"mergeCommit":{"message":"[OpenAI Connector] Enable `defaultModel` for Azure OpenAI connector to support APIM endpoints (#253577)","sha":"fdbc8b78479fa90d96b51f713b9127f50a47b875"}},{"branch":"9.2","label":"v9.2.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.3","label":"v9.3.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.12","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co>
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
…ector to support APIM endpoints (#253577) (#255600) # Backport This will backport the following commits from `main` to `8.19`: - [[OpenAI Connector] Enable `defaultModel` for Azure OpenAI connector to support APIM endpoints (#253577)](#253577) <!--- Backport version: 10.2.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Steph Milovic","email":"stephanie.milovic@elastic.co"},"sourceCommit":{"committedDate":"2026-02-26T20:42:24Z","message":"[OpenAI Connector] Enable `defaultModel` for Azure OpenAI connector to support APIM endpoints (#253577)","sha":"fdbc8b78479fa90d96b51f713b9127f50a47b875","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","backport missing","Team: SecuritySolution","backport:version","v9.4.0","v9.2.5","v9.3.1","v8.19.12"],"title":"[OpenAI Connector] Enable `defaultModel` for Azure OpenAI connector to support APIM endpoints","number":253577,"url":"https://github.com/elastic/kibana/pull/253577","mergeCommit":{"message":"[OpenAI Connector] Enable `defaultModel` for Azure OpenAI connector to support APIM endpoints (#253577)","sha":"fdbc8b78479fa90d96b51f713b9127f50a47b875"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/253577","number":253577,"mergeCommit":{"message":"[OpenAI Connector] Enable `defaultModel` for Azure OpenAI connector to support APIM endpoints (#253577)","sha":"fdbc8b78479fa90d96b51f713b9127f50a47b875"}},{"branch":"9.2","label":"v9.2.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/255184","number":255184,"state":"OPEN"},{"branch":"9.3","label":"v9.3.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/255185","number":255185,"state":"MERGED","mergeCommit":{"sha":"c032f32bdf161d581f5885cca32ceed11ae32fa0","message":"[9.3] [OpenAI Connector] Enable `defaultModel` for Azure OpenAI connector to support APIM endpoints (#253577) (#255185)\n\n# Backport\n\nThis will backport the following commits from `main` to `9.3`:\n- [[OpenAI Connector] Enable `defaultModel` for Azure OpenAI connector\nto support APIM endpoints\n(#253577)](https://github.com/elastic/kibana/pull/253577)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by: Steph Milovic <stephanie.milovic@elastic.co>"}},{"branch":"8.19","label":"v8.19.12","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
…o support APIM endpoints (elastic#253577)
Summary
Resolves #253520
Caution
This PR follows the intermediary release process, and the schema changes will be introduced in #253575. Please do not merge this PR until the week after #253575 is merged. The target merge date is February 23.
Azure API Management (APIM) and other proxy endpoints require the
modelfield to be present in the request body. Unlike standard Azure OpenAI deployments, APIM endpoints cannot infer the model from the deployment URL, so requests without an explicitmodelfield fail with "Model could not be detected". This PR wires up thedefaultModelconfig field (accepted by the schema since the prerequisite PR) so that it is injected into outbound request bodies when the body does not already specify one, fixing both the connector test flow and the Observability AI Assistant runtime.Manual testing steps
Prerequisites: an Azure API Management endpoint that requires
modelin the request body (reproduces the customer scenario).modelfield (existing behavior unchanged).gpt-4o) in the "Default model" field. Click "Test". Confirm the request body now includes"model": "gpt-4o"and the test succeeds against the APIM endpoint."model": "gpt-3.5-turbo". Click "Test". Confirm the manually specified model is used anddefaultModeldoes not override it.