litellm/tests/test_litellm/llms/openai_like
Atharva Jaiswal 7bcef1490b
Fix: Exclude tool params for models without function calling support (#21125) (#21244)
* Fix tool params reported as supported for models without function calling (#21125)

JSON-configured providers (e.g. PublicAI) inherited all OpenAI params
including tools, tool_choice, function_call, and functions — even for
models that don't support function calling. This caused an inconsistency
where get_supported_openai_params included "tools" but
supports_function_calling returned False.

The fix checks supports_function_calling in the dynamic config's
get_supported_openai_params and removes tool-related params when the
model doesn't support it. Follows the same pattern used by OVHCloud
and Fireworks AI providers.

* Style: move verbose_logger to module-level import, remove redundant try/except

Address review feedback from Greptile bot:
- Move verbose_logger import to top-level (matches project convention)
- Remove redundant try/except around supports_function_calling() since it
  already handles exceptions internally via _supports_factory()
2026-02-16 08:36:32 -08:00
..
chat fix: Resolve pytest module name collision for test_transformation.py files (#16661) 2025-11-14 16:50:40 -08:00
embedding Fix: vllm embedding format 2026-01-30 16:42:59 +05:30
__init__.py [Feat] Allow adding OpenAI compatible chat providers using .json + add public ai provider (#17448) 2025-12-04 17:59:25 -08:00
test_json_providers.py Fix: Exclude tool params for models without function calling support (#21125) (#21244) 2026-02-16 08:36:32 -08:00
test_xiaomi_mimo.py fix: add xiaomi_mimo to LlmProviders enum to fix router support (#18819) 2026-01-08 23:45:57 +05:30