Skip to content

Feat: add add azure endpoint for image endpoints#11482

Merged
ishaan-jaff merged 3 commits into
mainfrom
litellm_image_edits_add_azure_endpoint
Jun 6, 2025
Merged

Feat: add add azure endpoint for image endpoints#11482
ishaan-jaff merged 3 commits into
mainfrom
litellm_image_edits_add_azure_endpoint

Conversation

@ishaan-jaff

@ishaan-jaff ishaan-jaff commented Jun 6, 2025

Copy link
Copy Markdown
Contributor

Feat: add add azure endpoint for image endpoints

This PR implements new Azure-compatible endpoints for image generation and image edits while adding corresponding tests to verify proper routing and behavior.

Relevant issues

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • I have added a screenshot of my new test passing locally
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🆕 New Feature
🐛 Bug Fix
🧹 Refactoring
📖 Documentation
🚄 Infrastructure
✅ Test

Changes

@vercel

vercel Bot commented Jun 6, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 6, 2025 5:14pm

@openhands-ai

openhands-ai Bot commented Jun 6, 2025

Copy link
Copy Markdown

Looks like there are a few issues preventing this PR from being merged!

  • GitHub Actions are failing:
    • LiteLLM Linting

If you'd like me to help, just leave a comment, like

@OpenHands please fix the failing actions on PR #11482

Feel free to include any additional details that might help me get this PR into a better state.

You can manage your notification settings

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements new Azure-compatible endpoints for image generation and image edits while adding corresponding tests to verify proper routing and behavior.

  • Added tests for Azure endpoints in tests/test_litellm/proxy/image_endpoints/test_azure_routes.py
  • Updated image endpoints in litellm/proxy/image_endpoints/endpoints.py to accept an optional "model" parameter and adjust model selection accordingly

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tests/test_litellm/proxy/image_endpoints/test_azure_routes.py Added tests for Azure endpoints for image generation and image edits
litellm/proxy/image_endpoints/endpoints.py Introduced new POST endpoints for Azure image generation and image edits with updated model selection logic
Comments suppressed due to low confidence (2)

litellm/proxy/image_endpoints/endpoints.py:67

  • Consider updating the function's docstring to document the new 'model' parameter for clarity on its purpose and usage.
    model: Optional[str] = None,

litellm/proxy/image_endpoints/endpoints.py:204

  • Document the new 'model' parameter in the function's docstring to clearly explain how it affects the endpoint behavior.
    model: Optional[str] = None,

Comment on lines +9 to +10
sys.path.insert(0, os.path.abspath("../../.."))

Copilot AI Jun 6, 2025

Copy link

Choose a reason for hiding this comment

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

[nitpick] Consider configuring PYTHONPATH or using a test runner configuration instead of modifying sys.path directly to improve test maintainability.

Suggested change
sys.path.insert(0, os.path.abspath("../../.."))

Copilot uses AI. Check for mistakes.
@ishaan-jaff ishaan-jaff merged commit fdaad51 into main Jun 6, 2025
38 of 46 checks passed
@ishaan-berri ishaan-berri deleted the litellm_image_edits_add_azure_endpoint branch March 26, 2026 21:54
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