Allow the none reasoning effort for GPT-6 Luna by Matos182 · Pull Request #183922 · home-assistant/core · GitHub
Skip to content

Allow the none reasoning effort for GPT-6 Luna - #183922

Merged
zweckj merged 1 commit into
home-assistant:devfrom
Matos182:fix/openai-luna-reasoning-none
Oct 1, 2026
Merged

zweckj merged 1 commit into
home-assistant:devfrom
Matos182:fix/openai-luna-reasoning-none

Conversation

@Matos182

@Matos182 Matos182 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Breaking change

Proposed change

gpt-6-luna supports the none reasoning effort, but the configuration flow uses the general GPT-6 list, which does not include it. This means users cannot select none when configuring the model.

This change adds a gpt-6-luna entry before the general gpt-6 entry. It allows none in both Conversation and AI Task subentries and keeps low as the default.

The supported effort levels are listed in the OpenAI model documentation.

How to reproduce

  1. Reconfigure an OpenAI Conversation or AI Task subentry.
  2. Disable recommended settings and set the model to gpt-6-luna.
  3. Check the reasoning effort selector. Before this change, none is missing.

Tests

The tests cover the effort list, saving none and low for both subentry types, and the Responses API arguments for both settings.

  • Before the fix, three regression cases failed. After the fix, all 17 focused tests passed.
  • The full OpenAI integration suite passed: 262 tests and 56 snapshots. Coverage was 98% for the integration and 100% for config_flow.py.
  • Ruff, mypy and pylint passed for the changed code. All applicable prek hooks passed for the four changed files.
  • I also checked both settings against the Responses API with a simulated function. Both returned the requested function call. With none, the API also accepted temperature=0.5 and top_p=0.9. These checks used no Home Assistant device data or actions.

Integration test command:

uv run --no-sync pytest -q tests/components/openai_conversation --cov=homeassistant.components.openai_conversation --cov-report=term-missing

Local validation limits

I used Python 3.14.5 and the dependencies pinned by Core, including the test requirements and OpenAI SDK.

The full script/setup stopped while building DTLSSocket because autoconf was unavailable. I installed the dependencies needed for the integration and ran the tests and checks above.

The repository-wide prek run --all-files was stopped when pylint exhausted the available memory. Running the remaining hooks reported a duplicate-module conflict for signal_type.py/.pyi in mypy and a missing infrared_protocols dependency in hassfest. The checks on the changed files passed, but I could not complete all repository-wide checks locally.

This PR adds no dependencies or configuration keys. The model-switch effort reset discussed in #182222 is outside its scope.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies a diff between library versions and ideally a link to the changelog/release notes is added to the PR description.

To help with the load of incoming pull requests:

Copilot AI balanced review requested due to automatic review settings October 1, 2026 16:32
@Matos182
Matos182 requested a review from Shulyaka as a code owner October 1, 2026 16:32

@home-assistant home-assistant Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Matos182

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@home-assistant home-assistant Bot added bugfix cla-needed Hacktoberfest has-tests integration: openai_conversation small-pr PRs with less than 30 lines. Top 200 Integration is ranked within the top 200 by usage labels Oct 1, 2026
@home-assistant

home-assistant Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

@home-assistant
home-assistant Bot marked this pull request as draft October 1, 2026 16:32
@home-assistant

home-assistant Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Hey there @Shulyaka, mind taking a look at this pull request as it has been labeled with an integration (openai_conversation) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of openai_conversation can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant mark-draft Mark the pull request as draft.
  • @home-assistant ready-for-review Remove the draft status from the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign openai_conversation Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant update-branch Update the pull request branch with the base branch.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component, problem in config, problem in device, feature-request) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component, problem in config, problem in device, feature-request) on the pull request.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The focused model exception is consistent with existing prefix handling and has comprehensive regression coverage.

Review effort: Balanced
Findings: None

What changed in this PR

Adds GPT-6 Luna-specific reasoning options to the OpenAI Conversation integration.

Changes:

  • Allows none reasoning effort while retaining low as default.
  • Tests Conversation and AI Task configuration persistence.
  • Verifies generated Responses API arguments with snapshots.
File Description
homeassistant/​components/​openai_conversation/​config_flow.py Adds Luna-specific reasoning options.
tests/​components/​openai_conversation/​test_config_flow.py Tests option availability and persistence.
tests/​components/​openai_conversation/​test_conversation.py Adds Luna API argument cases.
tests/​components/​openai_conversation/​snapshots/​test_conversation.ambr Captures expected Luna request arguments.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@Matos182
Matos182 marked this pull request as ready for review October 1, 2026 16:35
@zweckj zweckj added this to the 2026.10.0 milestone Oct 1, 2026
@zweckj
zweckj merged commit f90ecfd into home-assistant:dev Oct 1, 2026
36 checks passed
@Matos182
Matos182 deleted the fix/openai-luna-reasoning-none branch October 1, 2026 18:49
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants