feat: add native tool support for LiteLLM provider #9719
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds native tool calling support for the LiteLLM provider, allowing it to use OpenAI-style tool calls when the user explicitly selects native protocol.
Changes
packages/types/src/providers/lite-llm.tssupportsNativeTools: trueto the default model infosrc/api/providers/fetchers/litellm.tssupportsNativeToolsfrom LiteLLM API response by checking:supports_function_callingsupports_tool_choicesupports_tool_usesrc/api/providers/lite-llm.tstools,tool_choice, andparallel_tool_callsto API request when native protocol is usedtool_call_partialchunks in streaming response for NativeToolCallParsersrc/api/providers/fetchers/__tests__/litellm.spec.tssupportsNativeToolsfieldNotes
toolProtocol: "native"in their profile settingsImportant
Adds native tool support for LiteLLM provider, enabling OpenAI-style tool calls with native protocol selection.
toolProtocol: "native"is set.supportsNativeTools: truetolitellmDefaultModelInfoinlite-llm.ts.fetchers/litellm.ts, extractssupportsNativeToolsfrom API response based onsupports_function_calling,supports_tool_choice, andsupports_tool_use.lite-llm.ts, checks for native tool support and modifies API requests to includetools,tool_choice, andparallel_tool_callswhen native protocol is used.tool_call_partialchunks in streaming responses forNativeToolCallParser.fetchers/__tests__/litellm.spec.tsto includesupportsNativeTools.This description was created by
for 17e0e57. You can customize this summary. It will automatically update as commits are pushed.