fix(code-review): keep Gemini fallback opt-in
This commit is contained in:
@@ -362,7 +362,7 @@ class Settings(BaseSettings):
|
||||
raise ValueError(
|
||||
f"OLLAMA URL host 不允許的外部域名:{host!r}(完整 URL:{v!r})"
|
||||
",必須使用私網 IP 或已知 K8s Service hostname"
|
||||
)
|
||||
) from None
|
||||
if not (ip.is_private or ip.is_loopback):
|
||||
raise ValueError(
|
||||
f"OLLAMA URL 必須是私網/loopback IP、已知 K8s SVC 或 GCP 白名單 IP,"
|
||||
@@ -496,6 +496,14 @@ class Settings(BaseSettings):
|
||||
)
|
||||
GEMINI_API_KEY: str = Field(default="", description="Google Gemini API key")
|
||||
CLAUDE_API_KEY: str = Field(default="", description="Anthropic Claude API key")
|
||||
LOCAL_CODE_REVIEW_ALLOW_GEMINI_FALLBACK: bool = Field(
|
||||
default=False,
|
||||
description=(
|
||||
"Allow LocalCodeReviewService to fall back to Gemini when the "
|
||||
"GCP-B/Ollama code-review lane fails. Default false to avoid "
|
||||
"unexpected cloud spend from Gitea push/PR alerts."
|
||||
),
|
||||
)
|
||||
# 2026-03-29 ogt: ADR-036 Nemotron Tool Calling 整合
|
||||
NVIDIA_API_KEY: str = Field(
|
||||
default="",
|
||||
|
||||
Reference in New Issue
Block a user