Files
DeepTutor/deeptutor/core
Bingxi Zhao (Frank) 61f9c66718 fix(llm): enable native tool calls for all registered cloud OpenAI-compatible providers
#584 fixed SiliconFlow by adding a PROVIDER_CAPABILITIES entry, but the same
class of bug affected every registered openai_compat cloud provider lacking an
explicit entry: get_capability fell to DEFAULT_CAPABILITIES (supports_tools=
False), so can_use_native_tool_calling() returned False and models emitted
textual <tool_calls> markup instead of executable tool calls. Affected:
gemini, zhipu, qianfan, stepfun, xiaomi_mimo, nvidia_nim, aihubmix, and the
volcengine/byteplus coding-plan variants.

Make the decision registry-backend-driven instead of per-provider data:
can_use_native_tool_calling now treats a registered, non-local openai_compat
provider as tool-capable by default (matching the catch-all 'custom' provider
and the OpenAI-compatible API contract). Anthropic backends stay always-on;
local servers (Ollama/vLLM/LM Studio/llama.cpp/Lemonade/OVMS) and bindings in
_NATIVE_TOOL_BLOCKED_BINDINGS stay opted out; an explicit supports_tools flag
still wins. This removes the registry/capabilities duplication for the tools
flag and prevents the gap from recurring when new cloud providers are added.

capabilities.py stays a pure static-data module (no registry coupling); the
policy lives in client.py, which already consults the registry.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 21:35:12 +08:00
..
2026-04-23 19:29:16 +08:00
2026-06-18 00:22:48 +08:00
2026-06-17 00:56:27 +08:00
2026-06-11 20:03:34 +08:00
2026-06-11 20:03:34 +08:00