Skip to content

Bump openai from 1.102.0 to 2.18.0#879

Closed
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/pip/openai-2.18.0
Closed

Bump openai from 1.102.0 to 2.18.0#879
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/pip/openai-2.18.0

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot Bot commented on behalf of github Feb 10, 2026

Bumps openai from 1.102.0 to 2.18.0.

Release notes

Sourced from openai's releases.

v2.18.0

2.18.0 (2026-02-09)

Full Changelog: v2.17.0...v2.18.0

Features

  • api: add context_management to responses (137e992)
  • api: responses context_management (c3bd017)

v2.17.0

2.17.0 (2026-02-05)

Full Changelog: v2.16.0...v2.17.0

Features

  • api: add shell_call_output status field (1bbaf88)
  • api: image generation actions for responses; ResponseFunctionCallArgumentsDoneEvent.name (7d96513)
  • client: add custom JSON encoder for extended type support (9f43c8b)

Bug Fixes

  • client: undo change to web search Find action (8f14eb0)
  • client: update type for find_in_page action (ec54dde)

v2.16.0

2.16.0 (2026-01-27)

Full Changelog: v2.15.0...v2.16.0

Features

  • api: api update (b97f9f2)
  • api: api updates (9debcc0)
  • client: add support for binary request streaming (49561d8)

Bug Fixes

  • api: mark assistants as deprecated (0419cbc)

Chores

  • ci: upgrade actions/github-script (5139f13)
  • internal: update actions/checkout version (f276714)

... (truncated)

Changelog

Sourced from openai's changelog.

2.18.0 (2026-02-09)

Full Changelog: v2.17.0...v2.18.0

Features

  • api: add context_management to responses (137e992)
  • api: responses context_management (c3bd017)

2.17.0 (2026-02-05)

Full Changelog: v2.16.0...v2.17.0

Features

  • api: add shell_call_output status field (1bbaf88)
  • api: image generation actions for responses; ResponseFunctionCallArgumentsDoneEvent.name (7d96513)
  • client: add custom JSON encoder for extended type support (9f43c8b)

Bug Fixes

  • client: undo change to web search Find action (8f14eb0)
  • client: update type for find_in_page action (ec54dde)

2.16.0 (2026-01-27)

Full Changelog: v2.15.0...v2.16.0

Features

  • api: api update (b97f9f2)
  • api: api updates (9debcc0)
  • client: add support for binary request streaming (49561d8)

Bug Fixes

  • api: mark assistants as deprecated (0419cbc)

Chores

  • ci: upgrade actions/github-script (5139f13)
  • internal: update actions/checkout version (f276714)

Documentation

  • examples: update Azure Realtime sample to use v1 API (#2829) (3b31981)

... (truncated)

Commits
  • a7a6016 release: 2.18.0 (#2846)
  • e888873 release: 2.17.0
  • b982088 fix(client): undo change to web search Find action
  • b95c09d codegen metadata
  • 31b4218 codegen metadata
  • a1fb97b fix(client): update type for find_in_page action
  • 42cb178 feat(api): image generation actions for responses; ResponseFunctionCallArgume...
  • db4d871 feat(client): add custom JSON encoder for extended type support
  • 2360dfa codegen metadata
  • 7da396e codegen metadata
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Feb 10, 2026
@claude
Copy link
Copy Markdown

claude Bot commented Feb 10, 2026

PR Review: Bump openai from 1.102.0 to 2.18.0

Overview

This is a major version upgrade from OpenAI Python SDK v1.102.0 to v2.18.0. While Dependabot automated this update, major version bumps warrant careful review for breaking changes.

Code Analysis

I've reviewed the codebase's OpenAI usage and found:

Direct OpenAI Usage:

  • opencontractserver/llms/client.py:87 - SimpleLLMClient uses from openai import OpenAI
  • Uses standard client.chat.completions.create() API (lines 158)
  • API interface is stable between v1.102.0 and v2.18.0

pydantic-ai Integration:

  • opencontractserver/llms/agents/pydantic_ai_agents.py - Primary agent framework
  • pydantic-ai handles OpenAI client initialization internally
  • OpenContracts passes model names as strings (e.g., "gpt-4o-mini"), not client instances
  • This abstraction insulates the codebase from OpenAI version changes

Breaking Changes Assessment

Reviewed the v2.x release notes:

v2.18.0 (2026-02-09):

  • Added context_management to responses
  • No breaking changes to core APIs

v2.17.0 (2026-02-05):

  • Added shell_call_output status field
  • Image generation actions for responses
  • Custom JSON encoder support
  • No breaking changes

v2.16.0 (2026-01-27):

  • Marked assistants API as deprecated (not used in this codebase)
  • Added binary request streaming support
  • No breaking changes to chat completions

Critical Finding: The OpenAI v2.x line maintains backward compatibility for the chat completions API used throughout this codebase.

Test Coverage

⚠️ Gap Identified: No dedicated tests for SimpleLLMClient found in opencontractserver/tests/

Recommendation: Before merging, consider adding a basic integration test:

# opencontractserver/tests/test_llm_client.py
from opencontractserver.llms.client import SimpleLLMClient, ChatMessage

def test_simple_llm_client_basic_chat():
    """Verify SimpleLLMClient works with current OpenAI version."""
    client = SimpleLLMClient(model="gpt-4o-mini")
    messages = [ChatMessage(role="user", content="Say 'test'")]
    response = client.chat(messages)
    assert response.content
    assert response.model

However, the extensive pydantic-ai test suite (100+ test files with VCR cassettes) provides indirect coverage of OpenAI integration.

Security Considerations

No security concerns identified:

  • API key handling unchanged (uses Django settings)
  • No new network exposure
  • Dependency from trusted source (OpenAI official SDK)

Performance Considerations

Potential improvements in v2.x:

  • Custom JSON encoder (v2.17.0) may improve serialization performance
  • Binary request streaming (v2.16.0) enables future optimizations
  • No regressions expected

Recommendations

  1. Safe to merge - No breaking changes affect this codebase

  2. ⚠️ Test before production deployment:

    # Run backend tests to verify pydantic-ai integration
    docker compose -f test.yml run django pytest -n 4 --dist loadscope
  3. 📝 Update CHANGELOG.md:

    ## [Unreleased] - 2026-02-10
    
    ### Changed
    - Updated openai library from 1.102.0 to 2.18.0 (requirements/base.txt:51)
      - Adds context_management support in responses
      - Includes performance improvements for JSON encoding
      - No breaking changes to chat completions API
  4. 🔄 Monitor for async improvements: The codebase has a TODO at opencontractserver/llms/client.py:196 to use native async OpenAI client - v2.x has improved async support that could be leveraged in future refactoring.

Conclusion

LGTM ✅ - This upgrade is safe and brings improvements without breaking changes. The codebase's abstraction through pydantic-ai and stable API usage patterns make it resilient to this version upgrade.


Review performed by analyzing code patterns, OpenAI SDK release notes, and dependency relationships. No runtime testing performed in this review.

Bumps [openai](https://github.com/openai/openai-python) from 1.102.0 to 2.18.0.
- [Release notes](https://github.com/openai/openai-python/releases)
- [Changelog](https://github.com/openai/openai-python/blob/main/CHANGELOG.md)
- [Commits](openai/openai-python@v1.102.0...v2.18.0)

---
updated-dependencies:
- dependency-name: openai
  dependency-version: 2.18.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot force-pushed the dependabot/pip/openai-2.18.0 branch from 0d8c701 to 5e0fabc Compare February 11, 2026 06:11
@claude
Copy link
Copy Markdown

claude Bot commented Feb 11, 2026

Pull Request Review: OpenAI Version Bump from 1.102.0 to 2.20.0

Overview

This PR bumps the OpenAI Python library from v1.102.0 to v2.20.0 - a major version upgrade that includes significant API changes.

Critical Concerns

1. Breaking Changes from v1.x to v2.x

This is a major version bump that likely includes breaking changes in API response structures, error handling, streaming interfaces, and model parameters.

The codebase uses OpenAI in opencontractserver/llms/client.py and integrates with pydantic-ai==0.2.* which may have OpenAI version dependencies.

Recommendation: Check pydantic-ai compatibility with OpenAI 2.x and review migration guide for v2.0 breaking changes.

2. Missing Test Coverage

The SimpleLLMClient class has no unit tests. This is concerning for a major dependency upgrade.

Recommendation: Add tests or manually test all agent functionality that uses OpenAI.

3. CI Status Incomplete

Wait for pytest suite to complete before merging, especially test_pydantic_ai_agents.py and agent framework tests.

Code Quality

Positive:

  • OpenAI only imported in one location
  • Simple usage pattern (chat completions)
  • Dependabot automation

Concerns:

  • pydantic-ai compatibility needs verification
  • tiktoken==0.12.0 compatibility needs verification
  • No CHANGELOG update (per CLAUDE.md rules)

Recommendation

DO NOT merge until:

  1. All CI checks pass (especially pytest)
  2. pydantic-ai compatibility is verified
  3. Manual testing confirms no regressions
  4. CHANGELOG.md is updated

This is a major version upgrade requiring careful validation.

@JSv4 JSv4 closed this Feb 21, 2026
@dependabot @github
Copy link
Copy Markdown
Contributor Author

dependabot Bot commented on behalf of github Feb 21, 2026

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot dependabot Bot deleted the dependabot/pip/openai-2.18.0 branch February 21, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant