chore(models): retire deprecated models, simplify thinking config

Trim each provider to current-generation models and drop the special-casing
they required:

- OpenAI: remove gpt-4.1 (deprecated; the only non-reasoning model).
- Anthropic: remove Claude Sonnet 4.5 (legacy; the only Sonnet that 400s on effort).
- Google: remove the Gemini 2.5 line (superseded by 3.x).
- Gemini client: drop the integer thinking_budget mapping; 3.x takes the string
  thinking_level directly.

Effort/reasoning gates stay as defense in depth for custom model IDs. All kept
IDs verified against live APIs.
This commit is contained in:
Yijia-Xiao committed 2026-06-21 21:03:05 +00:00
1 parent a420ad0f3b
commit 7bb16c5daa
4 files changed
+55 -21

No files matched your search

+7 -13
View File
@@ -40,21 +40,15 @@ class GoogleClient(BaseLLMClient):
if google_api_key:
llm_kwargs["google_api_key"] = google_api_key
# Map thinking_level to appropriate API param based on model
# Gemini 3 Pro: low, high
# Gemini 3 Flash: minimal, low, medium, high
# Gemini 2.5: thinking_budget (0=disable, -1=dynamic)
# Gemini 3.x takes the string ``thinking_level`` (the integer
# ``thinking_budget`` was for the now-retired 2.5 line). Pro accepts
# low/high; Flash also accepts minimal/medium — so map an unsupported
# "minimal" on Pro to the nearest level it does accept.
thinking_level = self.kwargs.get("thinking_level")
if thinking_level:
model_lower = self.model.lower()
if "gemini-3" in model_lower:
# Gemini 3 Pro doesn't support "minimal", use "low" instead
if "pro" in model_lower and thinking_level == "minimal":
thinking_level = "low"
llm_kwargs["thinking_level"] = thinking_level
else:
# Gemini 2.5: map to thinking_budget
llm_kwargs["thinking_budget"] = -1 if thinking_level == "high" else 0
if "pro" in self.model.lower() and thinking_level == "minimal":
thinking_level = "low"
llm_kwargs["thinking_level"] = thinking_level
return NormalizedChatGoogleGenerativeAI(**llm_kwargs)