Skip to content

DeepTutor: Lifelong Personalized Tutoring. https://deeptutor.info/.

chore: name the native-tool backend set; move wecom test beside other channel tests

Bingxi Zhao (Frank)7e763036ecf5
diff --git a/deeptutor/core/agentic/client.py b/deeptutor/core/agentic/client.py
index d5a7a61f4..44921be34 100644
--- a/deeptutor/core/agentic/client.py
+++ b/deeptutor/core/agentic/client.py
@@ -29,6 +29,11 @@ _NATIVE_TOOL_BLOCKED_BINDINGS: frozenset[str] = frozenset(
{"anthropic", "claude", "ollama", "lm_studio", "vllm", "llama_cpp"}
)
+# Native provider adapters whose backends speak OpenAI-style function calling
+# end to end (schema serialization + tool-call parsing). Backends validated
+# here get tools attached regardless of the binding blocklist above.
+_NATIVE_TOOL_BACKENDS: frozenset[str] = frozenset({"anthropic", "openai_codex"})
+
@dataclass(frozen=True)
class LLMClientConfig:
@@ -348,7 +353,7 @@ def can_use_native_tool_calling(*, binding: str, model: str | None) -> bool:
``_NATIVE_TOOL_BLOCKED_BINDINGS``.
"""
spec = find_by_name(binding)
- if spec and spec.backend in {"anthropic", "openai_codex"}:
+ if spec and spec.backend in _NATIVE_TOOL_BACKENDS:
return True
if binding in _NATIVE_TOOL_BLOCKED_BINDINGS or (spec and spec.is_local):
return False
diff --git a/tests/partners/test_wecom_channel.py b/tests/services/partners/test_wecom_channel.py
similarity index 100%
rename from tests/partners/test_wecom_channel.py
rename to tests/services/partners/test_wecom_channel.py