#160432·elasticsearch

[Inference API] Persist default reasoning.effort on openai chat_completion task_settings

Author: rahulranjan22Created Sep 28, 2026Updated Sep 28, 2026
Labels>enhancement:SearchOrg/InferenceTeam:Search - Inference

Description

Allow a default reasoning effort to be stored on an openai chat_completion inference endpoint in task_settings.reasoning, the same way service: elastic already can.

A caller can send reasoning.effort on _stream today. Elasticsearch maps it to OpenAI reasoning_effort. That was added in https://github.com/elastic/elasticsearch/pull/156505. The same PR deferred persist: "Do not persist reasoning in OpenAI task_settings for now (that work is deferred)."

PUT or _update with task_settings.reasoning on service: openai fails at schema time:

Configuration contains settings [{reasoning={effort=low}}] unknown to the [openai] service

openai task_settings only accept user and headers: https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-openai

If the request omits reasoning, Elasticsearch does not inject reasoning_effort. The gateway or model then applies its own default.

Kibana also has no connector-level default. Agent Builder UI and Observability / Security AI Assistant omit reasoning, so callers that do not send it on each request cannot set a default on the endpoint.

Workaround is to pass reasoning.effort on _stream, or reasoning_level on https://www.elastic.co/docs/api/doc/kibana/operation/operation-post-agent-builder-converse. Neither covers the Agent Builder UI.

Suggested store and merge: use the stored default when the request omits reasoning. Per-request reasoning.effort wins.

Related: https://github.com/elastic/elasticsearch/issues/148909