fix(llm): call_llm 429 自动 fallback + 移除 compliance 硬编码 provider

- nvidia_client.py 新增 _get_provider_fallback_list() 从 DB 读提供商顺序
- call_llm 循环尝试提供商列表,HTTP 429 自动跳过到下一个
- 移除 compliance_optimizer.py 中硬编码 provider="opencode-go"
- 新增 logging 模块引用
This commit is contained in:
Yuzhiran Dev
2026-06-01 13:23:35 +08:00
parent 09c467e56d
commit 31d8434010
2 changed files with 77 additions and 60 deletions
+1 -1
View File
@@ -182,7 +182,7 @@ def polish_with_llm(html: str, platform: str, remaining_issues: Optional[List[Di
prompt = get_prompt("compliance_fix", issues_desc=issues_desc, html=html)
else:
prompt = get_prompt("compliance_polish", html=html)
polished = call_llm(prompt, provider="opencode-go", temperature=temperature, max_tokens=max_tokens, system_prompt=system_prompt)
polished = call_llm(prompt, provider=None, temperature=temperature, max_tokens=max_tokens, system_prompt=system_prompt)
polished = clean_html_content(polished)
polished = strip_ai_preface(polished)
polished = strip_thinking_html(polished)