Files
MoviePilot/tests/test_llm_provider_hints.py
DDSRem 2de976f6b3 Merge pull request #7050 from DDSRem-Dev/codex-comment-migration
docs: 统一全项目中文注释和结构化契约说明
2026-10-17 19:26:29 +08:00

19 lines
623 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""
验证大语言模型提供方提示的解析与选择。
"""
from app.agent.llm.provider import LLMProviderManager
def test_openai_compatible_provider_api_key_hint_only_describes_credentials() -> None:
"""
通用 OpenAI 兼容入口的 API Key 提示不应混入 Base URL 配置说明。
"""
provider = LLMProviderManager().get_provider("openai")
assert provider.requires_base_url is True
assert provider.api_key_hint == (
"填写 OpenAI-compatible 服务的 API Key;如服务未启用鉴权,可填写任意占位值。"
)
assert "Base URL" not in provider.api_key_hint