Skip to content

Conversation

@hassiebp
Copy link
Contributor

@hassiebp hassiebp commented Jun 29, 2025

Important

Updates OpenAI SDK integration to handle chat.completions.parse transition out of beta, adding max_version to manage method availability.

  • Behavior:
    • Added max_version parameter to OpenAiDefinition class in langfuse/openai.py to limit method availability.
    • Set version ceiling of 1.92.0 for beta chat completion parsing features.
    • Enhanced version checking in register_tracing() to skip methods exceeding their max_version.
  • Tests:
    • Updated test_openai.py to reflect changes in method availability and version handling.

This description was created by Ellipsis for 2753fae. You can customize this summary. It will automatically update as commits are pushed.


Greptile Summary

Disclaimer: Experimental PR review

Updates OpenAI SDK integration to handle the transition of chat.completions.parse out of beta, maintaining compatibility across different OpenAI SDK versions.

  • Added max_version parameter to OpenAiDefinition class in langfuse/openai.py to limit method availability
  • Set version ceiling of 1.92.0 for beta chat completion parsing features
  • Enhanced version checking in register_tracing() to skip methods exceeding their max_version
  • Ensures seamless transition as OpenAI moves features from beta to stable paths

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

1 file reviewed, no comments
Edit PR Review Bot Settings | Greptile

@hassiebp hassiebp merged commit dbf841b into main Jun 29, 2025
8 of 10 checks passed
@hassiebp hassiebp deleted the hassieb/lfe-5538-fix-openai-beta-import branch June 29, 2025 09:33
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.

bug(sdk-python): OpenAI Import paths Migrated in 1.92.X

2 participants