Skip to content

fix(ovhcloud): Fix tool calling not working - #25948

Merged
krrish-berri-2 merged 2 commits into
BerriAI:litellm_oss_staging_04_22_2026from
eliasto:ovhcloud/fix-tool-calling
Apr 23, 2026
Merged

fix(ovhcloud): Fix tool calling not working#25948
krrish-berri-2 merged 2 commits into
BerriAI:litellm_oss_staging_04_22_2026from
eliasto:ovhcloud/fix-tool-calling

Conversation

@eliasto

@eliasto eliasto commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

Pre-Submission checklist

  • I have Added testing in the tests/test_litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem
  • I have requested a Greptile review by commenting @greptileai and received a Confidence Score of at least 4/5 before requesting a maintainer review

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

CI (LiteLLM team)

CI status guideline:

  • 50-55 passing tests: main is stable with minor issues.
  • 45-49 passing tests: acceptable but needs attention
  • <= 40 passing tests: unstable; be careful with your merges and assess the risk.
  • Branch creation CI run
    Link:

  • CI run for the last commit
    Link:

  • Merge / cherry-pick CI run
    Links:

Screenshots / Proof of Fix

Type

🐛 Bug Fix
🧹 Refactoring
✅ Test

Changes

Remove supported openai params, so only the OVHcloud returns an error if the tool calling is not supported.

@vercel

vercel Bot commented Apr 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment Apr 17, 2026 1:36pm

Request Review

@eliasto eliasto changed the title Ovhcloud/fix tool calling fix(ovhcloud): Fix tool calling not working Apr 17, 2026
@eliasto

eliasto commented Apr 17, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai Please make a review

@greptile-apps

greptile-apps Bot commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR removes the get_supported_openai_params override in OVHCloudChatConfig that was stripping tools, tool_choice, function_call, and response_format from the supported param list based on a static model catalog lookup. After the fix, OVHCloudChatConfig inherits the full OpenAI param list from OpenAIGPTConfig, so tool-calling params are always forwarded to the OVHCloud server, which is responsible for returning an error if a specific model doesn't support them. The new test_tools_not_filtered_by_static_model_map parametrized test correctly verifies this behavior without making network calls.

Confidence Score: 5/5

Safe to merge — targeted removal of a stale static filter with a clear unit test verifying the new behavior.

All findings are P2 or lower. The core change is a clean deletion of over-eager param filtering; the inherited behavior from OpenAIGPTConfig is well-understood and correct. The new test exercises the exact code path that was broken. No security, data-integrity, or reliability concerns.

No files require special attention.

Important Files Changed

Filename Overview
litellm/llms/ovhcloud/chat/transformation.py Removes the get_supported_openai_params override that conditionally stripped tool-calling params based on a stale static catalog; now inherits the full OpenAI param list from OpenAIGPTConfig.
tests/test_litellm/llms/ovhcloud/test_ovhcloud_chat_transformation.py Adds test_tools_not_filtered_by_static_model_map (pure unit test, no network calls) covering 5 model names; remaining changes are Black-style formatting fixes.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[LiteLLM call with tools param] --> B{OVHCloudChatConfig\nget_supported_openai_params}
    
    subgraph BEFORE["BEFORE (removed)"]
        B1[Call _get_model_info_helper] --> B2{supports_function_calling?}
        B2 -->|True| B3[Include tools, tool_choice,\nfunction_call, response_format]
        B2 -->|False / error| B4[Strip tools, tool_choice,\nfunction_call, response_format]
    end

    subgraph AFTER["AFTER (this PR)"]
        C[Inherit OpenAIGPTConfig list:\nalways includes tools, tool_choice,\nfunction_call, response_format]
    end

    B --> BEFORE
    B --> AFTER

    B3 --> D[OVHCloud API]
    C --> D
    B4 --> E[Tools silently dropped —\nrequest fails for supported models]
    D --> F{Server-side validation}
    F -->|Supported| G[Success]
    F -->|Not supported| H[Server returns error]
Loading

Reviews (2): Last reviewed commit: "fix import order" | Re-trigger Greptile

Comment thread tests/test_litellm/llms/ovhcloud/test_ovhcloud_chat_transformation.py Outdated
@codecov

codecov Bot commented Apr 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@krrish-berri-2
krrish-berri-2 changed the base branch from litellm_internal_staging to litellm_oss_staging_04_22_2026 April 23, 2026 02:33
@krrish-berri-2
krrish-berri-2 merged commit bd145d1 into BerriAI:litellm_oss_staging_04_22_2026 Apr 23, 2026
42 of 44 checks passed
fzowl pushed a commit to fzowl/litellm that referenced this pull request Jun 24, 2026
* fix(ovhcloud): fix tool calling

* fix import order
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