ping: JSON 이 안 나오면 설정 조합을 바꿔가며 자동 진단, LLM_MERGE_SYSTEM 옵션
- 게이트웨이/모델이 system 역할을 무시해 평문으로 답하는 경우(팀원 VM /api/ito + 339 실측) LLM_MERGE_SYSTEM=1 로 system 을 user 앞에 합쳐 보낸다 - summarize.ping 이 (그대로 → merge → merge+json_mode off) 순으로 시도해 되는 .env 값을 알려준다. --real 은 실제 조각 추출 프롬프트로 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
0f70c0d245
commit
db50ec9d46
@@ -263,3 +263,14 @@ def test_provider_requires_its_credentials(monkeypatch):
|
||||
_configure(monkeypatch, llm_provider="bogus", llm_api_key="k")
|
||||
with pytest.raises(RuntimeError):
|
||||
llm_client.OpenAICompatClient()
|
||||
|
||||
|
||||
def test_merge_system_folds_system_into_user(monkeypatch):
|
||||
from config.settings import settings
|
||||
from summarize import llm_client
|
||||
_configure(monkeypatch, llm_api_key="k")
|
||||
monkeypatch.setattr(settings, "llm_merge_system", True)
|
||||
msgs = llm_client.OpenAICompatClient().body("SYS", "USR")["messages"]
|
||||
assert msgs == [{"role": "user", "content": "SYS\n\nUSR"}]
|
||||
monkeypatch.setattr(settings, "llm_merge_system", False)
|
||||
assert [m["role"] for m in llm_client.OpenAICompatClient().body("SYS", "USR")["messages"]] == ["system", "user"]
|
||||
|
||||
Reference in New Issue
Block a user