[PR #505] [MERGED] fix(azure_openai): support streaming for o3 based models #1411

Closed
opened 2026-02-16 10:22:52 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-official-plugins/pull/505
Author: @kurokobo
Created: 3/19/2025
Status: Merged
Merged: 3/20/2025
Merged by: @crazywoola

Base: mainHead: aoai


📝 Commits (5)

  • 6678275 fix: use base_model_name instead of model to handle specific cases for specific models
  • f3b607b fix: return empty string instead of empty list with correct tool_calls responses for specific models
  • 86e5644 feat: support streaming for o3 based models
  • 62e74d5 feat: bump plugin version to 0.0.9
  • 64f639f fix: bump dependencies

📊 Changes

3 files changed (+25 additions, -18 deletions)

View changed files

📝 models/azure_openai/manifest.yaml (+1 -1)
📝 models/azure_openai/models/llm/llm.py (+21 -14)
📝 models/azure_openai/requirements.txt (+3 -3)

📄 Description

This PR changes following implementations:

  • Changed the conditional if statement based on the model name to a judgment using base_model_name
    • In AOAI, the model name can be changed arbitrarily by the user, making it impossible to predict precisely; however, base_model_name can be predicted.
  • If the model supports tool calls, but doesn't support straming, there are cases where an empty array [] is returned as the content from LLM in models, which was causing errors on the API side. To resolve this, This PR changed it to return "" when the result is [].
  • The model o3-mini supports streaming, but it was forced to stream: false Corrected conditionals for this.

closes #487


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-official-plugins/pull/505 **Author:** [@kurokobo](https://github.com/kurokobo) **Created:** 3/19/2025 **Status:** ✅ Merged **Merged:** 3/20/2025 **Merged by:** [@crazywoola](https://github.com/crazywoola) **Base:** `main` ← **Head:** `aoai` --- ### 📝 Commits (5) - [`6678275`](https://github.com/langgenius/dify-official-plugins/commit/66782759fa5c66eb5f2ab997a41ae3bacfc0e95c) fix: use base_model_name instead of model to handle specific cases for specific models - [`f3b607b`](https://github.com/langgenius/dify-official-plugins/commit/f3b607b5a1ba55ab12154b1c8bcd182a41419afe) fix: return empty string instead of empty list with correct tool_calls responses for specific models - [`86e5644`](https://github.com/langgenius/dify-official-plugins/commit/86e56443b8a71c7f90b0d6efe01c041e3a7cd8a1) feat: support streaming for o3 based models - [`62e74d5`](https://github.com/langgenius/dify-official-plugins/commit/62e74d58f5978b2bd347c21bdcac2ac379648695) feat: bump plugin version to 0.0.9 - [`64f639f`](https://github.com/langgenius/dify-official-plugins/commit/64f639f3d3131622567b1d666fe3567fd61166ce) fix: bump dependencies ### 📊 Changes **3 files changed** (+25 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `models/azure_openai/manifest.yaml` (+1 -1) 📝 `models/azure_openai/models/llm/llm.py` (+21 -14) 📝 `models/azure_openai/requirements.txt` (+3 -3) </details> ### 📄 Description This PR changes following implementations: - ✅ Changed the conditional `if` statement based on the model name to a judgment using `base_model_name` - In AOAI, the model name can be changed arbitrarily by the user, making it impossible to predict precisely; however, base_model_name can be predicted. - ✅ If the model supports tool calls, but doesn't support straming, there are cases where an empty array `[]` is returned as the content from LLM in models, which was causing errors on the API side. To resolve this, This PR changed it to return `""` when the result is `[]`. - ✅ The model o3-mini supports streaming, but it was forced to `stream: false` Corrected conditionals for this. closes #487 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 10:22:52 -05:00
yindo closed this issue 2026-02-16 10:22:52 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#1411