Skip to content

Allow openai 2.45 and later, so the package installs next to nemo-gym's main - #543

Open
ffrujeri wants to merge 1 commit into
NVIDIA:mainfrom
ffrujeri:deps/allow-openai-2.45
Open

ffrujeri wants to merge 1 commit into
NVIDIA:mainfrom
ffrujeri:deps/allow-openai-2.45

Conversation

@ffrujeri

@ffrujeri ffrujeri commented Nov 16, 2026 •

Copy link
Copy Markdown

What changed

pyproject.toml now accepts a range of openai versions instead of one exact version:

Dependency Before After
openai ==2.44.0 >=2.44.0,<3
langchain-openai >=1.3.0,<1.3.5 >=1.3.0

uv.lock changes only these two specifiers. It still installs openai 2.44.0 and langchain-openai 1.3.4, so this repository's own environment does not change.

Why

The openai pin was chosen to match the version nemo-gym 0.6.0 declares, and the langchain-openai cap only followed that pin (releases after 1.3.4 need openai>=2.45.0). nemo-gym's main now pins openai==2.45.0, so a project that installs auto-ontology-server next to it cannot resolve.

That project is an Auto Ontology Agent Server in NeMo Gym. It installs this package from main and calls the ReAct agent's run_episode with a model client that goes through Gym's Model Server, so each model call is captured per rollout for training. With a range, both nemo-gym 0.7.0 (openai==2.44.0, which auto-ontology-eval uses) and nemo-gym's main (openai==2.45.0) resolve, and the next Gym bump does not break the install again.

No issue was filed for this; the change is the whole request.

How it was tested

Following CONTRIBUTING.md (Postgres with pgvector in Docker, fixtures seeded, alembic upgrade head):

Check Result
uv lock --check Up to date
ruff check and ruff format --check on auto_ontology alembic dev_tools Pass
uv run pytest auto_ontology dev_tools -q with the locked openai 2.44.0 and langchain-openai 1.3.4 2677 passed, 2 skipped
The same suite with openai 2.45.0 and langchain-openai 1.8.0, the versions a nemo-gym main project resolves (uv run --with ...) 2677 passed, 2 skipped
cd mcp && uv run pytest -q 88 passed

Summary by CodeRabbit

  • Chores
    • Adjusted compatibility for projects using supported OpenAI version configurations. Existing integrations can continue resolving alongside projects configured for either of the two supported versions, while compatibility remains bounded to the current major version. No user-facing features or behavior changes are included in this update.

…'s main

openai was pinned to 2.44.0 to match nemo-gym 0.6.0. nemo-gym's main pins
2.45.0, so a project that installs both cannot resolve. Accept a range,
>=2.44.0,<3, and lift langchain-openai's <1.3.5 cap, which only followed
the pin. The lock keeps openai 2.44.0 and langchain-openai 1.3.4.

Signed-off-by: Felipe Vieira Frujeri <ffrujeri@nvidia.com>
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The project updates the langchain-openai and openai version constraints in pyproject.toml. The dependency comments also describe the related version requirements and nemo-gym pins.

Changes: OpenAI dependency constraints

Layer / File(s) Summary
Update dependency version ranges
pyproject.toml
langchain-openai changes from >=1.3.0,<1.3.5 to >=1.3.0. openai changes from ==2.44.0 to >=2.44.0,<3. The comments describe the corresponding version requirements and nemo-gym pins.

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Other

Merge Risk: Minimal · up to e774a

This change loosens dependency constraints so the package can install alongside different nemo-gym versions. The locked environment is unchanged and reported tests pass on both old and new versions, so merge risk is minimal.

Security architecture risk: Minimal · up to e774a

The change permits newer client libraries without changing the currently locked versions, credential handling, or endpoint configuration. No introduced security, failure-containment, or rollback defect was established.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The evidenced exposure is different SDK code executing in the existing chat and embedding client paths when a downstream environment resolves newer versions. No additional credential source, tenant scope, service identity, or tool authority is introduced by the manifest-only change.

Trust Boundaries and Controls

  • observed — The unchanged chat constructor explicitly receives api_key and base_url and disables SDK retries. The unchanged embedding constructor receives the configured endpoint, credential or placeholder, retry setting, and optional HTTP client. These application-side settings are not weakened by the PR.
Pre-merge checks: Passed 6

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title states that the change allows openai 2.45 and later so the package installs next to nemo-gym's main. The raw summary and objectives confirm that the pyproject.toml change loosens the openai …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Tests For Backend Behaviour Changes Passed The check applies only when the PR changes behaviour under auto_ontology/. The changed-file inventory for the reviewed range (refs/coderabbit/pre-merge-check/base..head) lists only two files: pyprojec…
Migration Accompanies Schema Change Passed The check applies only when auto_ontology/dal/schema.py is modified. The reviewed range (refs/coderabbit/pre-merge-check/base to head) changes only two files: pyproject.toml (M) and uv.lock …
Full details: Title check

Explanation

The title states that the change allows openai 2.45 and later so the package installs next to nemo-gym's main. The raw summary and objectives confirm that the pyproject.toml change loosens the openai pin to >=2.44.0,<3 and removes the langchain-openai cap. The title is accurate and specific. It does not follow the configured style of a concise imperative summary, since it begins with 'Allow' (acceptable imperative) but is 13 words and reads as a sentence rather than a short commit-style summary. No bare ticket ID and no WIP marker are present.

Full details: Tests For Backend Behaviour Changes

Explanation

The check applies only when the PR changes behaviour under auto_ontology/. The changed-file inventory for the reviewed range (refs/coderabbit/pre-merge-check/base..head) lists only two files: pyproject.toml (modified) and uv.lock (modified). No file under auto_ontology/ changes, so there is no backend behaviour change. The changes are dependency version specifiers: openai moves from ==2.44.0 to >=2.44.0,<3, and the langchain-openai cap is removed. The PR description states that uv.lock still resolves to openai 2.44.0 and langchain-openai 1.3.4. No test updates are required under this check. Primary author: ffrujeri (not relevant to this check).

Full details: Migration Accompanies Schema Change

Explanation

The check applies only when auto_ontology/dal/schema.py is modified. The reviewed range (refs/coderabbit/pre-merge-check/base to head) changes only two files: pyproject.toml (M) and uv.lock (M). schema.py is not in the changed-file inventory, so the condition does not apply. No Alembic revision is required. The PR changes only dependency specifiers for openai and langchain-openai.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between a630ebd and e774af9.

Files ignored due to path filters: 1

  • uv.lock is excluded by !**/*.lock, !uv.lock
Files selected for processing: 1

  • pyproject.toml

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

ffrujeri added a commit to NVIDIA-NeMo/Gym that referenced this pull request Nov 17, 2026
…t Server, on BIRD dev

Auto Ontology's main answers a question with one ReAct episode
(react.loop.run_episode): its model searches Auto Ontology's catalog, runs SQL
and submits a query. The agent calls run_episode as Auto Ontology's own ReAct
step does, with auto-ontology-eval's settings for a graded benchmark, and
answers with the submitted query in a fenced sql block.

- The task (question, evidence, database) comes in the seed's agent context.
  birdbench's prepare.py writes it with +prepare_script_args.agent_context=true,
  to its own file, and benchmarks/birdbench/auto_ontology.yaml pairs the agent
  with bird_sql through single_agent_turn_legacy.
- The episode's model is Auto Ontology's reasoning client on the policy's Model
  Server. Its calls go through Gym's ServerClient on the activation's rollout
  route, with the invocation ID, and report their usage (model_calls.py).
- Auto Ontology is pinned to its main (a630ebd) plus the commit of
  NVIDIA/auto-ontology#543 that accepts the openai version Gym pins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Felipe Vieira Frujeri <ffrujeri@nvidia.com>
ffrujeri added a commit to NVIDIA-NeMo/Gym that referenced this pull request Nov 17, 2026
…t Server, on BIRD dev

Auto Ontology's main answers a question with one ReAct episode
(react.loop.run_episode): its model searches Auto Ontology's catalog, runs SQL
and submits a query. The agent calls run_episode as Auto Ontology's own ReAct
step does, with auto-ontology-eval's settings for a graded benchmark, and
answers with the submitted query in a fenced sql block.

- The task (question, evidence, database) comes in the seed's agent context.
  birdbench's prepare.py writes it with +prepare_script_args.agent_context=true,
  to its own file, and benchmarks/birdbench/auto_ontology.yaml pairs the agent
  with bird_sql through single_agent_turn.
- The episode's model is Auto Ontology's reasoning client on the policy's Model
  Server. Its calls go through Gym's ServerClient on the activation's rollout
  route, with the invocation ID, and report their usage (model_calls.py).
- Auto Ontology is pinned to its main (a630ebd) plus the commit of
  NVIDIA/auto-ontology#543 that accepts the openai version Gym pins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Felipe Vieira Frujeri <ffrujeri@nvidia.com>
@liofnv liofnv added the enhancement New feature or request label Nov 17, 2026
ffrujeri added a commit to NVIDIA-NeMo/Gym that referenced this pull request Nov 17, 2026
… once

Pin Auto Ontology once, in benchmarks/birdbench/auto_ontology/pyproject.toml,
and build everything Auto Ontology-based from that pin.

- The catalog image (auto_ontology/Dockerfile, build_image.sh): Auto
  Ontology at the pinned commit from its own repository and lock file, the
  BIRD dev databases, and a catalog Postgres. build_catalog.py migrates the
  catalog with Auto Ontology's Alembic migrations, then for each database
  ingests the schema, writes BIRD's column descriptions from its
  database_description CSVs (Auto Ontology has no input for them, and a SQLite
  database carries none) through apply_metadata_batch, embeds the described
  catalog and compiles the semantic layer. The build fails when a model call
  failed after Auto Ontology's retries or a database has no vectors; Auto
  Ontology logs both and goes on. Keys reach the build as a BuildKit secret.
- The catalog-tools rows now start as Auto Ontology's agent starts an
  episode: its system prompt with the SQLite rules, the question with the
  evidence apart, and its tool definitions, from the pinned package
  (auto_ontology/react_prompt.py). The auto_ontology project prepares them;
  Gym's own prompt and tool descriptions go.
- prepare.py --agent-context adds the task to each row's agent context, for
  the Auto Ontology agent.
- The catalog server's defaults follow the image; its routes pass any
  argument on, so Auto Ontology answers a wrong one as its loop does.

The pin is Auto Ontology's main (a630ebd) plus the commit of
NVIDIA/auto-ontology#543, which accepts the openai version Gym pins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Felipe Vieira Frujeri <ffrujeri@nvidia.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants