Support routed OpenAI required tool choice (#732)

This commit is contained in:
alex s
2026-07-10 18:43:07 -04:00
committed by GitHub
parent 22d327d21f
commit c13960ae01
2 changed files with 24 additions and 0 deletions
+4
View File
@@ -24,6 +24,10 @@ DEFAULT_MAX_TURNS = 500
def _accepts_required_tool_choice(model_name: str | None) -> bool:
name = (model_name or "").strip().lower()
for prefix in ("litellm/", "any-llm/"):
if name.startswith(prefix):
name = name[len(prefix) :]
break
return name.startswith("openai/") or is_known_openai_bare_model(name)