Commit 96445f9
[Search] Fix: prevent hidden provider fields from being sent in request payload (elastic#264462)
## Summary
Fields hidden via `INTERNAL_OVERRIDE_FIELDS` were still being written
into the form state as null during task type selection, causing them to
be included in the API request. This has been fixed by skipping any
field not present in the filtered schema during form state sync.
This PR also hides `max_input_tokens` for the Mistral provider, which
does not support this configuration and was rejecting requests that
included it.
<img width="700" alt="Screenshot 2026-04-20 at 16 42 26"
src="https://github.com/user-attachments/assets/d60b3686-9ab2-4c13-84a9-2a4f37a75943"
/>
### Testing
- Start Kibana and navigate to the `External Inference` page
- Click `Add endpoint` and select `Mistral` as the service.
- Fill in a valid API key and model ID (`mistral-medium-latest`).
- Confirm that `Maximum Input Tokens` field does not appear in the `More
options` accordion section.
- Select `chat_completion` under `Task type`
- Submit the form and confirm that the endpoint is created successfully.
### Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
- [ ] ~Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)~
- [ ]
~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials~
- [ ] ~[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~
- [ ] ~If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)~
- [ ] ~This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.~
- [ ] ~[Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed~
- [ ] ~The PR description includes the appropriate Release Notes
section, and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)~
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>1 parent a6df752 commit 96445f9
2 files changed
Lines changed: 9 additions & 2 deletions
File tree
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
287 | | - | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
288 | 290 | | |
289 | | - | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
290 | 294 | | |
291 | 295 | | |
292 | 296 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
140 | 143 | | |
0 commit comments