代码提交
This commit is contained in:
1 parent
70da7c5649
commit
178572bc7f
79 files changed
+13456
-798
No files matched your search
@@ -9,6 +9,9 @@ import yaml
|
||||
from starlette.routing import Match
|
||||
|
||||
from app.gateway.routers import model_management as router
|
||||
from deerflow.config.app_config import AppConfig
|
||||
from deerflow.config.model_config import ModelConfig
|
||||
from deerflow.models.factory import create_chat_model
|
||||
|
||||
|
||||
def test_replace_models_block_keeps_other_sections_and_comments() -> None:
|
||||
@@ -149,3 +152,27 @@ async def test_connection_test_uses_one_minimal_prompt_without_writing_config(
|
||||
assert len(messages_seen) == 1
|
||||
assert messages_seen[0].content == "Reply with exactly: OK"
|
||||
assert config_path.read_text(encoding="utf-8") == original
|
||||
|
||||
|
||||
def test_force_disable_thinking_skips_generic_openai_models_without_thinking_support() -> None:
|
||||
"""LiteLLM proxies reject vendor-specific thinking payloads for ordinary chat models."""
|
||||
config = AppConfig.model_construct(
|
||||
models=[
|
||||
ModelConfig(
|
||||
name="litellm-qwen",
|
||||
use="langchain_openai:ChatOpenAI",
|
||||
model="qwen3.6",
|
||||
api_key="test-key",
|
||||
base_url="http://litellm.example/v1",
|
||||
supports_thinking=False,
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
chat_model = create_chat_model(
|
||||
"litellm-qwen",
|
||||
app_config=config,
|
||||
force_disable_thinking=True,
|
||||
)
|
||||
|
||||
assert chat_model.extra_body is None
|
||||
Reference in new issue
Block a user