diff --git a/python/dify_plugin/interfaces/model/openai_compatible/llm.py b/python/dify_plugin/interfaces/model/openai_compatible/llm.py index 47861d2a..ed2201a4 100644 --- a/python/dify_plugin/interfaces/model/openai_compatible/llm.py +++ b/python/dify_plugin/interfaces/model/openai_compatible/llm.py @@ -173,6 +173,12 @@ def validate_credentials(self, model: str, credentials: dict) -> None: """ try: headers = {"Content-Type": "application/json"} + extra_headers = credentials.get("extra_headers") + if extra_headers is not None: + headers = { + **headers, + **extra_headers, + } api_key = credentials.get("api_key") if api_key: