From 0e6bdd834ec2e9095674e22cac78b1d891b749fa Mon Sep 17 00:00:00 2001 From: Lin Jia Date: Fri, 24 Jul 2026 16:44:05 -0700 Subject: [PATCH 1/2] build: widen openai floor to >=2.0.0 The floor was pinned at the version that happened to be current when the package metadata was written, not at a version the code actually needs. It blocks downstream consumers: NeMo Gym pins openai<=2.7.2, so adding nemo-switchyard to Gym is unsatisfiable today. Switchyard uses openai for request/response schema types and the async client in lib/llm_client.py. Every symbol imported resolves on 2.0.0, and the Python suite at v0.1.0 passes identically on 2.0.0, 2.2.0, 2.5.0, 2.7.2, 2.34.0 and 2.48.0 (69 passed in all six runs). The upper bound at the major version is unchanged. Co-Authored-By: Claude Opus 5 Signed-off-by: Lin Jia --- pyproject.toml | 5 ++++- uv.lock | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1108a0894..b955e00a9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,10 @@ classifiers = [ # pip install nemo-switchyard[cli] # Add prompt-toolkit for CLI # pip install nemo-switchyard[all] # Everything dependencies = [ - "openai>=2.34.0,<3.0", + # openai: request/response schema types, plus the async client in lib/llm_client.py. + # Keep this floor low so downstream consumers that pin an older openai can depend on + # Switchyard; the suite passes unchanged from 2.0.0 through 2.48.0. + "openai>=2.0.0,<3.0", "anthropic>=0.99.0,<1.0", "httpx>=0.28.1,<1.0", "pydantic>=2.13.3,<3.0", diff --git a/uv.lock b/uv.lock index 8c69827da..6bd14e25d 100644 --- a/uv.lock +++ b/uv.lock @@ -2255,7 +2255,7 @@ requires-dist = [ { name = "httpx", specifier = ">=0.28.1,<1.0" }, { name = "nemo-platform", marker = "extra == 'intake'", specifier = ">=0.1.0,<1.0" }, { name = "nemo-switchyard", extras = ["server", "cli", "tracing", "intake", "affinity-redis"], marker = "extra == 'all'" }, - { name = "openai", specifier = ">=2.34.0,<3.0" }, + { name = "openai", specifier = ">=2.0.0,<3.0" }, { name = "prompt-toolkit", marker = "extra == 'cli'", specifier = ">=3.0.52,<4.0" }, { name = "pydantic", specifier = ">=2.13.3,<3.0" }, { name = "redis", marker = "extra == 'affinity-redis'", specifier = ">=5.0.1,<6" }, From 4c62174ec3944a11e8536254caa43e056aac2b45 Mon Sep 17 00:00:00 2001 From: Lin Jia Date: Fri, 24 Jul 2026 16:50:06 -0700 Subject: [PATCH 2/2] build: raise openai floor to >=2.7 to match consumer pins Lowering the floor all the way to 2.0.0 was more than the motivating case needs. NeMo Gym pins openai<=2.7.2, so >=2.7 is enough to make the two co-installable while keeping the supported range that much narrower. The suite at v0.1.0 passes identically on 2.7.0, 2.7.1 and 2.7.2 as it does on 2.34.0 and 2.48.0 (69 passed in every run). Co-Authored-By: Claude Opus 5 Signed-off-by: Lin Jia --- pyproject.toml | 6 +++--- uv.lock | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b955e00a9..eabebcdef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,9 +32,9 @@ classifiers = [ # pip install nemo-switchyard[all] # Everything dependencies = [ # openai: request/response schema types, plus the async client in lib/llm_client.py. - # Keep this floor low so downstream consumers that pin an older openai can depend on - # Switchyard; the suite passes unchanged from 2.0.0 through 2.48.0. - "openai>=2.0.0,<3.0", + # Keep this floor low enough for downstream consumers to co-install us; NeMo Gym pins + # openai<=2.7.2. The suite passes unchanged from 2.7.0 through 2.48.0. + "openai>=2.7,<3.0", "anthropic>=0.99.0,<1.0", "httpx>=0.28.1,<1.0", "pydantic>=2.13.3,<3.0", diff --git a/uv.lock b/uv.lock index 6bd14e25d..1e8ba088e 100644 --- a/uv.lock +++ b/uv.lock @@ -2255,7 +2255,7 @@ requires-dist = [ { name = "httpx", specifier = ">=0.28.1,<1.0" }, { name = "nemo-platform", marker = "extra == 'intake'", specifier = ">=0.1.0,<1.0" }, { name = "nemo-switchyard", extras = ["server", "cli", "tracing", "intake", "affinity-redis"], marker = "extra == 'all'" }, - { name = "openai", specifier = ">=2.0.0,<3.0" }, + { name = "openai", specifier = ">=2.7,<3.0" }, { name = "prompt-toolkit", marker = "extra == 'cli'", specifier = ">=3.0.52,<4.0" }, { name = "pydantic", specifier = ">=2.13.3,<3.0" }, { name = "redis", marker = "extra == 'affinity-redis'", specifier = ">=5.0.1,<6" },