What is "unknown AI function" error about?
# ask-ai
i
What is "unknown AI function" error about?
t
Thanks for reaching out, Jan. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're seeing an "unknown AI function" error — I can help. This usually means the system tried to call a tool/function that isn't registered or recognized by the agent runtime. Common causes: • A function intended for the LLM wasn't defined or decorated correctly (e.g., missing
@function_tool
registration). • The function name in the model's function call doesn't match the registered function name. • The tool registration step failed at startup, so the runtime doesn't know about the function. • A mismatch between deployed code and the model prompt/config (model expects a tool that isn't present). To help diagnose, can you share: 1. The exact error text and where you saw it (server logs, client console, or LLM response). 2. The function registration code (or the decorator line, e.g.,
@function_tool
) and the function name you expect. 3. Any recent deploy or config changes to agents/tools. With those I can suggest targeted fixes (naming, registration, or restart steps). Sources: LiveKit's Series A: Infra for the AI computing era | Tool definition and use | LiveKit docs
i
Tell me livekit code that produced this error
t
You're asking for the LiveKit code that produced the "unknown AI function" error. I don't have your code here, and the docs don't contain a snippet that emits that exact error string. That error typically comes from the agent's tool/function registration—e.g., a function not registered with
@function_tool
, a name mismatch, or a registration failure at startup. Please share the following so I can find the exact offending code and give a fix: 1. The code that registers your tools/functions (the
@function_tool
lines or equivalent). 2. The function definitions you expect the LLM to call (names and signatures). 3. The full error text or stack trace and where it appears (server logs, agent logs, or LLM response). 4. Any recent deploy/config changes or the runtime you’re using. Send those and I’ll point to the precise lines to change and the exact fix. Sources: Tool definition and use | LiveKit docs