From 151d741a71c14963663ade149d3dec410d59c697 Mon Sep 17 00:00:00 2001 From: Martin Nuc Date: Fri, 9 Oct 2026 00:06:06 +0200 Subject: [PATCH] Accept any openai>=2.45.0 so the integration loads on HA 2026.10 Home Assistant 2026.10 pins openai==3.10.0 in its package constraints, so the manifest's exact openai==2.45.0 can no longer be installed and setup fails: Setup failed for custom integration 'openai_compatible': Requirements for openai_compatible not found: ['openai==2.45.0']. The requirement is now a floor. Each Home Assistant release then installs the openai it pins: 2.45.0 on 2026.9, 3.10.0 on 2026.10. The vendored code needs no change for 3.x. The only breaking change in openai 3.0 is HTTPX2 as the default client, and passing Home Assistant's legacy httpx client is still supported at runtime, which is how core's own integration handles it. Every openai import in the integration resolves on 3.10.0, and the suite passes against it on the 2026.10.0 test harness (170 passed). requirements_test.txt now pins 3.10.0 so CI tests what current Home Assistant ships. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_0123XQr8dh5RnFLnECHPVNrd --- README.md | 4 ++++ custom_components/openai_compatible/manifest.json | 2 +- requirements_test.txt | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 179401b..41e9346 100644 --- a/README.md +++ b/README.md @@ -161,6 +161,10 @@ each item costs, and the design decision that has to be made first. (commit recorded in [`UPSTREAM_COMMIT`](custom_components/openai_compatible/UPSTREAM_COMMIT)), with the domain renamed to `openai_compatible` and the base URL made configurable. +The manifest requires `openai>=2.45.0` rather than core's exact pin: Home Assistant +installs custom-integration requirements against its own package constraints, so an +exact pin stops the integration loading whenever core bumps `openai`. + Base-URL handling lives in its own module, [`url_util.py`](custom_components/openai_compatible/url_util.py), deliberately separate from the vendored files so re-syncing with core stays a clean merge. diff --git a/custom_components/openai_compatible/manifest.json b/custom_components/openai_compatible/manifest.json index 8acae4c..6e168e5 100644 --- a/custom_components/openai_compatible/manifest.json +++ b/custom_components/openai_compatible/manifest.json @@ -17,7 +17,7 @@ "iot_class": "cloud_polling", "issue_tracker": "https://github.com/adamjs83/ha-openai-compatible/issues", "requirements": [ - "openai==2.45.0" + "openai>=2.45.0" ], "version": "0.2.0" } diff --git a/requirements_test.txt b/requirements_test.txt index 287891f..6a1c321 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1,6 +1,7 @@ # Requires Python 3.14+ (Home Assistant 2026.9 floor). Not installable on Python 3.13. pytest-homeassistant-custom-component>=0.13.317 -openai==2.45.0 +# Core 2026.10's pin; the manifest only sets a floor. +openai==3.10.0 # The manifest declares dependencies: ["conversation"], and the ported tests exercise # stt/tts too; a full HA install resolves each core component's own `requirements` at