#Calling providers that support tool use

54 messages · Page 1 of 1 (latest)

steep nebula
#

Example
I am trying to call deepseek/deepseek-chat directly. However, only DeepSeek provider supports tool use. So when my requests get routed anywhere else, I get an error back from OpenRouter.

Description
How can I prevent this scenario? For every single model that I want to use do I have to figure out which providers support tool use and then manually list those out when I call the endpoint?

This seems almost impossible to do. I can call the models endpoint to figure out which models support tool use, but how is that useful if tool use depends on which provider will be called?

dreamy flint
#

could this help ?

steep nebula
#

That's what I'm doing, but it sends an error back because the provider it got routed to happened to not support tool use

#

that sentence seems false

dreamy flint
#

yes it looks like it is

steep nebula
#

Specific error I get is this:

No endpoints found that support tool use. To learn more about provider routing, visit: https://openrouter.ai/docs/provider-routing
dreamy flint
#

there is this endpoint

#

the supported_parameters parameter is listing tools, tool_choice only for Deepseek so this might be what you're looking for

steep nebula
#

good catch but I doubt they want us hitting that api

#

i wish these endpoints just had the info needed to determine this stuff on a provider level...

dreamy flint
#

yeah, there is not any documented endpoint to get providers info (for a specific model) from what I've seen. i would wait for the openrouter's team to confirm if it's fine to hit the one above in the meantime... don't see how it could be a big deal though.

#

!! would you look at that

#

from #announcements message

#

(and you're right, they don't want us to hit the private api)

steep nebula
#

oh wow thanks!

rich hearth
steep nebula
rich hearth
steep nebula
#

sure let me give you an example

#

For example here you can see deepseek the provider is broken for me when I call v3

#

I get 0 tokens every time

#

So great, I can disable that provider. However, now I’m left with only providers that don’t support tools, even though the “model” does because of the deepseek provider

#

So if I want to call v3 with deepseek the provider disabled, I have to make sure I don’t pass tools, otherwise I will get an error

#

But the question is, how do I determine if there are any providers left enabled for this model that do support tools to make that decision? As far as I know it’s not possible to know unless there’s another endpoint

#

Let me know do that makes sense, happy to expand

rich hearth
#

I think I'm following. Essentially, some models and provider combinations do support tool calling. But if you disable some or generally have some providers ignored, it's hard to know. The question is, which providers support tool calling? Generally speaking, right? And then you can figure out which ones you have disabled and make your decision based on that.

steep nebula
#

Right exactly

#

I need to know:

  1. what models support tools
  2. what providers of each model support tools for those that do
  3. which providers do I current have enabled
rich hearth
#

Yeah okay, so for 1 & 2 I think the endpoints API does return that information - you'd have to call it for each model though, which sucks, and you'd know if tool calling is supported via the tools value in the supported_parameters array

#

And then #3 I don't think we have a solution for

#

at least not via API

steep nebula
#

Gotcha

#

Yeah for 1 and 2 I am fine currently, as I point my calls at a specific model so I just have a cache that knows which ones support tools

rich hearth
#

Yeah. But then on the account level you have stuff disabled / ignored, right?

steep nebula
#

If I didn’t have to disable deepseek due to that bug i wouldn’t have an issue haha

#

Yes!

#

Only out of necessity:(

rich hearth
#

Yeah... this is tricky. Would only managing your ignored list in code help here (or be not-inconvenient?)

steep nebula
#

Yeah it probably would although not ideal solution wise

rich hearth
#

right, yeah

steep nebula
#

It’s really nice to be able to disable misbehaving providers from the UI

rich hearth
#

and then also be able to feed that back into your own model filtering code

#

agree

steep nebula
#

Yep! Thanks for the help! I think for now I’ll just keep manual configurations and try to limit disables

rich hearth
steep nebula
#

Just let the api do its thing with tool support

#

Thanks yeah that will work well! Love the service by the way, and appreciate the help!

At this point I’ve migrated all my calls to OR 🙂

rich hearth
#

Sounds good, feel free to ping me if you run into any unexpected behaviour with that, as I noted you guys might've found an issue with the tool calling docs description? but also we have new docs, so try those out 😅