Skip to content

Conversation

@hassiebp
Copy link
Contributor

@hassiebp hassiebp commented Jun 3, 2025

Important

Fixes Azure OpenAI model name extraction in _extract_model_name() to prevent duplicate version info in utils.py.

  • Behavior:
    • Fixes _extract_model_name() in utils.py to correctly assign deployment_version and deployment_name.
    • Adds a check to prevent duplicate deployment_version in deployment_name.
  • Logic:
    • Ensures deployment_version is only appended if not already in deployment_name.
    • Returns None if deployment_name is not a string.
  • Misc:
    • Corrects order of operations in Azure OpenAI model extraction logic.

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


Greptile Summary

Disclaimer: Experimental PR review

Fixes model name extraction logic for Azure OpenAI models in the Langfuse Python SDK to prevent duplicate version information in model names.

  • Fixed incorrect variable assignment in _extract_model_name() where deployment_version was being assigned to deployment_name
  • Added missing conditional check to prevent duplicate version info when extracting Azure OpenAI model names
  • Incorrect order of operations in Azure OpenAI model extraction logic - deployment version check happens before deployment name
  • Potential bug where deployment_name could be overwritten by deployment_version due to variable reuse

@hassiebp hassiebp enabled auto-merge (squash) June 3, 2025 15:21
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.

1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

@hassiebp hassiebp merged commit 22aaed7 into main Jun 4, 2025
10 checks passed
@hassiebp hassiebp deleted the fix-langchain-azure-modelname-main branch June 4, 2025 09:00
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