Set supports_developer_role = False for more OpenAI-compatible services

DeepSeek, Mistral, OLLama, Qwen, SambaNova, and Together don't support
the "developer" message role.
This commit is contained in:
Paul Kompfner
2026-03-23 15:04:53 -04:00
parent 4c121332cf
commit 8c678c1c98
6 changed files with 26 additions and 0 deletions

View File

@@ -30,6 +30,10 @@ class DeepSeekLLMService(OpenAILLMService):
maintaining full compatibility with OpenAI's interface and functionality.
"""
# DeepSeek doesn't support the "developer" message role.
# This value is used by BaseOpenAILLMService when calling the adapter.
supports_developer_role = False
Settings = DeepSeekLLMSettings
_settings: Settings

View File

@@ -32,6 +32,10 @@ class MistralLLMService(OpenAILLMService):
maintaining full compatibility with OpenAI's interface and functionality.
"""
# Mistral doesn't support the "developer" message role.
# This value is used by BaseOpenAILLMService when calling the adapter.
supports_developer_role = False
Settings = MistralLLMSettings
_settings: Settings

View File

@@ -29,6 +29,11 @@ class OLLamaLLMService(OpenAILLMService):
providing a compatible interface for running large language models locally.
"""
# OLLama doesn't support the "developer" message role (it seems to quietly
# ignore "developer" messages).
# This value is used by BaseOpenAILLMService when calling the adapter.
supports_developer_role = False
Settings = OllamaLLMSettings
_settings: Settings

View File

@@ -29,6 +29,10 @@ class QwenLLMService(OpenAILLMService):
maintaining full compatibility with OpenAI's interface and functionality.
"""
# Qwen doesn't support the "developer" message role.
# This value is used by BaseOpenAILLMService when calling the adapter.
supports_developer_role = False
Settings = QwenLLMSettings
_settings: Settings

View File

@@ -41,6 +41,10 @@ class SambaNovaLLMService(OpenAILLMService): # type: ignore
maintaining full compatibility with OpenAI's interface and functionality.
"""
# SambaNova doesn't support the "developer" message role.
# This value is used by BaseOpenAILLMService when calling the adapter.
supports_developer_role = False
Settings = SambaNovaLLMSettings
_settings: Settings

View File

@@ -29,6 +29,11 @@ class TogetherLLMService(OpenAILLMService):
maintaining full compatibility with OpenAI's interface and functionality.
"""
# Together.ai doesn't support the "developer" message role (it seems to quietly
# ignore "developer" messages).
# This value is used by BaseOpenAILLMService when calling the adapter.
supports_developer_role = False
Settings = TogetherLLMSettings
_settings: Settings