Skip to content

Conversation

emerzon
Copy link
Contributor

@emerzon emerzon commented May 13, 2025

Description

Use LiteLLM DB for determining model tool capability instead of using a hardcoded list.
This enables newer models (Ie. gpt-4.1, gemini-2.5) to use native tools.

How Has This Been Tested?

Checked new models now can execute tools.

@emerzon emerzon requested a review from a team as a code owner May 13, 2025 00:14
Copy link

vercel bot commented May 13, 2025

@emerzon is attempting to deploy a commit to the Danswer Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR updates the model tool capability detection by leveraging LiteLLM's database instead of hardcoded lists, enabling support for newer AI models to use native tools.

  • Replaced hardcoded OPEN_AI_TOOL_CALLING_MODELS with dynamic lookup in backend/onyx/tools/utils.py using supports_function_calling attribute
  • Updated LiteLLM from 1.66.3 to 1.69.0 in both requirements files to support the new functionality
  • Implementation in explicit_tool_calling_supported() now uses get_model_map() and _find_model_obj() for more flexible model support

3 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

Copy link
Contributor

@Weves Weves left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks @emerzon!

@Weves Weves merged commit 8d2e170 into onyx-dot-app:main May 16, 2025
1 of 9 checks passed
ferdinandl007 pushed a commit to ferdinandl007/onyx that referenced this pull request May 19, 2025
* Bump LiteLLM

* Use LiteLLM DB for determining model tool capability instead of using hardcoded list

* Make function defaults explicit
aronszanto pushed a commit to aronszanto/onyx that referenced this pull request May 27, 2025
* Bump LiteLLM

* Use LiteLLM DB for determining model tool capability instead of using hardcoded list

* Make function defaults explicit
ZhipengHe pushed a commit to ZhipengHe/onyx that referenced this pull request Jun 6, 2025
* Bump LiteLLM

* Use LiteLLM DB for determining model tool capability instead of using hardcoded list

* Make function defaults explicit
AnkitTukatek pushed a commit to TukaTek/onyx that referenced this pull request Sep 23, 2025
* Bump LiteLLM

* Use LiteLLM DB for determining model tool capability instead of using hardcoded list

* Make function defaults explicit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants