[PR #206] fix(openai_compatible_rerank): Handle empty API keys consistently with text_embedding #223

Open
opened 2026-02-15 21:16:18 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-sdks/pull/206
Author: @1018053166
Created: 9/17/2025
Status: 🔄 Open

Base: mainHead: fix/rerank-auth-handling


📝 Commits (7)

  • 98273d6 fix(openai_rerank): Handle empty API keys consistently with authorization header
  • 73edcb0 docs: translate comments to English in rerank.py
  • 1e71b45 Remove whitespace from blank line
  • 283678b Remove whitespace from blank line
  • 26b8b77 Merge and resolve conflict: Remove whitespace from blank line
  • 5d65d4a Fix merge conflicts and remove trailing whitespace in rerank.py
  • eb3ac2c style: standardize quote style and ensure newline at end of file in rerank.py

📊 Changes

1 file changed (+4 additions, -1 deletions)

View changed files

📝 python/dify_plugin/interfaces/model/openai_compatible/rerank.py (+4 -1)

📄 Description

Description

Fixes https://github.com/langgenius/dify-official-plugins/issues/1724 by making authorization header handling in OpenAI-compatible rerank model consistent with text_embedding implementation:

  • Only adds Authorization header when api_key is present
  • Matches text_embedding.py behavior exactly
  • Ensures backward compatibility

Changes

  • Modified header generation logic in rerank.py
  • Added null check for api_key
  • Updated all comments to English

🔄 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-plugin-sdks/pull/206 **Author:** [@1018053166](https://github.com/1018053166) **Created:** 9/17/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/rerank-auth-handling` --- ### 📝 Commits (7) - [`98273d6`](https://github.com/langgenius/dify-plugin-sdks/commit/98273d67fecba129a6a234551cbbf27d7a3abdbb) fix(openai_rerank): Handle empty API keys consistently with authorization header - [`73edcb0`](https://github.com/langgenius/dify-plugin-sdks/commit/73edcb0b3ec64c64905f9955bd3c39bd6320a83a) docs: translate comments to English in rerank.py - [`1e71b45`](https://github.com/langgenius/dify-plugin-sdks/commit/1e71b45b07ed1deb3fc7ff9ffae68367c12079f7) Remove whitespace from blank line - [`283678b`](https://github.com/langgenius/dify-plugin-sdks/commit/283678b7808158d874e1bb2e0d972a79864c2225) Remove whitespace from blank line - [`26b8b77`](https://github.com/langgenius/dify-plugin-sdks/commit/26b8b77e10cba0cc909658c1fafea30cb8caaac1) Merge and resolve conflict: Remove whitespace from blank line - [`5d65d4a`](https://github.com/langgenius/dify-plugin-sdks/commit/5d65d4a80c4f8c3bc399619bbd4ae86e3449e6cd) Fix merge conflicts and remove trailing whitespace in rerank.py - [`eb3ac2c`](https://github.com/langgenius/dify-plugin-sdks/commit/eb3ac2cae885d05e1c1d5c908f71cc69dd12c72b) style: standardize quote style and ensure newline at end of file in rerank.py ### 📊 Changes **1 file changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `python/dify_plugin/interfaces/model/openai_compatible/rerank.py` (+4 -1) </details> ### 📄 Description ## Description Fixes https://github.com/langgenius/dify-official-plugins/issues/1724 by making authorization header handling in OpenAI-compatible rerank model consistent with text_embedding implementation: - Only adds Authorization header when api_key is present - Matches text_embedding.py behavior exactly - Ensures backward compatibility ## Changes - Modified header generation logic in `rerank.py` - Added null check for api_key - Updated all comments to English --- <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-15 21:16:18 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-sdks#223