# Error using function callbacks on custom inference endpoint

**URL:** <https://discuss.huggingface.co/t/error-using-function-callbacks-on-custom-inference-endpoint/165365>\
**Category:** Beginners\
**Created:** [August 2, 2025, 9:56am UTC](https://discuss.huggingface.co/t/error-using-function-callbacks-on-custom-inference-endpoint/165365 "2025-08-02T09:56:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [August 2, 2025, 11:17am UTC](https://discuss.huggingface.co/t/error-using-function-callbacks-on-custom-inference-endpoint/165365/2 "2025-08-02T11:17:22Z")

</div>

There seems to be [some incompatibility between TGI and Llama’s Function Calling](https://github.com/huggingface/text-generation-inference/issues/2480), so you [may need to use a slightly hacky workaround](https://discuss.huggingface.co/t/function-calling-not-working-with-inference-clients-on-seemingly-any-model/138581/14).

### Resources

- [Tool use does not work on Neuron backend #3114 (Same error)](https://github.com/huggingface/text-generation-inference/issues/3114)
- [Function/tool calling never resolves #2986](https://github.com/huggingface/text-generation-inference/issues/2986#issuecomment-2643403042)

---

_[View the full topic](https://discuss.huggingface.co/t/error-using-function-callbacks-on-custom-inference-endpoint/165365)._
