# Function calling not working with inference clients on (seemingly) any model

**URL:** <https://discuss.huggingface.co/t/function-calling-not-working-with-inference-clients-on-seemingly-any-model/138581>\
**Category:** Beginners\
**Created:** [February 2, 2025, 3:31pm UTC](https://discuss.huggingface.co/t/function-calling-not-working-with-inference-clients-on-seemingly-any-model/138581 "2025-02-02T15:31:43Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![anomalus](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/anomalus/32/17744_2.png) [@anomalus](https://discuss.huggingface.co/u/anomalus)\
**Post date:** [February 8, 2025, 5:02pm UTC](https://discuss.huggingface.co/t/function-calling-not-working-with-inference-clients-on-seemingly-any-model/138581/14 "2025-02-08T17:02:25Z")

</div>

I’ve had some [acknowledgement on the GitHub issue I filed](https://github.com/huggingface/text-generation-inference/issues/2986#issuecomment-2643403042).

I’ve tried a workaround that entails omitting the “tools” argument on subsequent instantiations of the chat completion object, and it seems to work for now, at least for simple tool situations.

Vision models also fail in weird ways, when sending messages with an image\_url specified. The workaround is the same.

Both of these situations require special hacky logic for HF inference, [like this](https://github.com/spatialpixel/funkify/blob/4229858c009c4b5d4194a2076e46ac57daa9f219/src/service-huggingface.js#L39).

---

_[View the full topic](https://discuss.huggingface.co/t/function-calling-not-working-with-inference-clients-on-seemingly-any-model/138581)._
