since 1 day our model gpt-5-chat-latest does not c...
# ask-ai
b
since 1 day our model gpt-5-chat-latest does not call function anymore what is the expected form to send to be detected as a tool he sends orally this : {"tool": "report_health_concern", "arguments": {}}"
t
Thanks for reaching out, timothe. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'd love to help you get to the bottom of this! Could you share a bit more about the situation where GPT-5-chat-latest is supposed to call the function? For example: • What exactly are you sending as input to the model? • Are there any particular settings or configurations you've set up for function calling? • Have you made any recent changes to your setup or the model's environment? Having these details will really help us understand why the function call might not be showing up as expected. Looking forward to your reply! Sources: tests/test-chat.cpp
Thank you for sharing the code and context! There are a few reasons why GPT-5-chat-latest might not be detecting or calling functions like
report_health_concern
or
CloseConv
. To help you better, could you please clarify a few things? • Are you using a specific chat template or configuration for function calling, such as FireFunction v2? • Is the expected output format starting with
functools[...]
or another particular grammar trigger? • Have you checked that the functions are properly defined in the tools array with a valid JSON schema? • Is tool calling explicitly enabled in your server or model configuration? Once we have these details, I’ll be more than happy to help you troubleshoot and find the best solution together! Sources: tools/server/tests/unit/test_tool_call.py | Tool definition and use | LiveKit Docs
b
format is {"tool": "report_health_concern", "arguments": {{}}
t
Thanks for sharing the format
{"tool": "report_health_concern", "arguments": {}}
! It’s great that you’re exploring this. Function call detection can sometimes vary depending on the model or framework you’re working with, so let’s see if we can figure this out together. Could you please help me understand a bit more? • Are you using a specific framework, like Firefunction v2 or Llama 3.x? • Does your setup require a prefix such as
functools[
or any other special grammar triggers for function calls? • Have you checked if tool calling is enabled in your configuration? Once we have these details, we’ll be in a better spot to confirm if this format works smoothly with your setup. Looking forward to your reply! Sources: docs/function-calling.md
b
tool calling is supposed to be automatic and @function_tool() async def report_health_concern(self, ctx: RunContext): self.action_detected = True return "health_alert_recorded"
t
I'm here to help you troubleshoot why the automatic tool calling for
report_health_concern
might not be working as expected. Let’s walk through some common areas to check together: • Tool Registration: Please make sure that
report_health_concern
is defined within a class that inherits from
Agent
and is decorated with
@function_tool()
. If it’s not properly registered, the model won’t recognize it as a callable tool. • Tool Schema: It’s a good idea to verify that the function schema is correctly set up. Using
raw_schema
for explicit parameter definitions can really help, especially if your model expects strict OpenAI-style schemas. • Tool Choice Configuration: Could you check your
tool_choice
setting? If it’s set to
none
or limited to certain tools, it might be preventing the function call from going through. • Model-Specific Behavior: If you’re using
gpt-5-chat-latest
and it’s a custom or less integrated model, it might have some unique requirements or limitations for tool calling. It’s worth confirming that it’s fully supported in your setup. • Argument Validation: Lastly, please ensure that the model is generating valid arguments for the tool call. Sometimes invalid or missing arguments can cause the call to fail quietly. To help me assist you better, could you please confirm: • Is the function properly registered and included in your tools list? • What is your current
tool_choice
setting? • Are there any logs showing argument validation errors or issues during tool execution? With these details, we’ll be in a great position to pinpoint the issue and find the best solution for you. Looking forward to your reply! Sources: Docs::Agents | agents/src/voice/generation.ts | livekit-agents/livekit/agents/voice/run_result.py | Agents v0.x migration guide - Python | LiveKit Docs
b
it is registered too choice is automatic and no logs just the llm saying out loud the function
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!