DeepTutor: Lifelong Personalized Tutoring. https://deeptutor.info/.
Python ai-agentsai-tutorclawbotcli-tooldeepresearchinteractive-learninglearningmulti-agent-systemsrag
fix(llm): enable OpenAI Codex native tool calls
NoxsMediac6b6d87651b2
diff --git a/deeptutor/core/agentic/client.py b/deeptutor/core/agentic/client.pyindex 9339056af..d5a7a61f4 100644--- a/deeptutor/core/agentic/client.py+++ b/deeptutor/core/agentic/client.py@@ -332,7 +332,7 @@ def can_use_native_tool_calling(*, binding: str, model: str | None) -> bool:Resolution order:- 1. Anthropic-backed providers always support tool use (native Messages API).+ 1. Native provider adapters backed by Anthropic or OpenAI Codex support tools.2. Local OpenAI-compatible servers (Ollama, vLLM, LM Studio, llama.cpp,Lemonade, OVMS, …) and anything in ``_NATIVE_TOOL_BLOCKED_BINDINGS`` areopted out — tool support there depends on the loaded model and is@@ -348,7 +348,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 == "anthropic":+ if spec and spec.backend in {"anthropic", "openai_codex"}:return Trueif binding in _NATIVE_TOOL_BLOCKED_BINDINGS or (spec and spec.is_local):return Falsediff --git a/tests/core/test_agentic_client_provider_kwargs.py b/tests/core/test_agentic_client_provider_kwargs.pyindex 62a240860..49480b9fc 100644--- a/tests/core/test_agentic_client_provider_kwargs.py+++ b/tests/core/test_agentic_client_provider_kwargs.py@@ -205,9 +205,19 @@ def test_registered_cloud_openai_compat_providers_enable_native_tools() -> None:assert can_use_native_tool_calling(binding=binding, model=None) is True, binding-def test_local_and_oauth_backends_stay_opted_out_of_native_tools() -> None:- # Local OpenAI-compatible servers (model-dependent, unreliable tool support)- # and the OAuth CLI backends keep native tool schemas disabled.+def test_openai_codex_backend_can_use_native_tool_calling() -> None:+ assert (+ can_use_native_tool_calling(+ binding="openai_codex",+ model="openai-codex/gpt-5.5",+ )+ is True+ )+++def test_local_and_github_copilot_backends_stay_opted_out_of_native_tools() -> None:+ # Local OpenAI-compatible servers have model-dependent, unreliable tool support.+ # GitHub Copilot remains opted out until its native tool path is validated.for binding in ("ollama","vllm",@@ -215,7 +225,6 @@ def test_local_and_oauth_backends_stay_opted_out_of_native_tools() -> None:"llama_cpp","lemonade","ovms",- "openai_codex","github_copilot",):assert can_use_native_tool_calling(binding=binding, model=None) is False, binding