Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dependencies to Fix OpenAI API Parameter Error #1161

Merged
merged 1 commit into from
Feb 18, 2025

Conversation

Jones0073
Copy link
Contributor

Updates the versions of several dependencies in pyproject.toml—namely, langchain-community, langchain-openai, and both instances of langgraph—to address a dependency error that breaks reasoning models.

Issue Details:

  • Error Encountered:
    During execution, an outdated call to the OpenAI API in the current versions of these libraries results in the following error:
    raise self._make_status_error_from_response(err.response) from None
    openai.BadRequestError: Error code: 400 - {'error': {'message': "Unsupported parameter: 'temperature' is not supported with this model.", 'type': 'invalid_request_error', 'param': 'temperature', 'code': 'unsupported_parameter'}}
  • Root Cause:
    The libraries were using an API call that included a temperature parameter not supported by the model, leading to a BadRequestError.

Solution:

  • Update Dependencies:
    The new versions of langchain-community, langchain-openai, and langgraph in the pyproject.toml implement updated API calls that remove the unsupported parameter and correctly interact with the OpenAI API.

Impact:

  • Fixes:
    The update ensures that reasoning models can be used without encountering the OpenAI API error.
  • Backward Compatibility:
    The changes should be backward compatible, as the updated dependencies maintain the intended functionality while fixing the error.

@ElishaKay ElishaKay merged commit 2c947ee into assafelovic:master Feb 18, 2025
@Jones0073 Jones0073 deleted the fix/dependency-update branch February 18, 2025 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants