Commit Graph

2 Commits

Author SHA1 Message Date
Devin AI
9bdc7b9eef fix: address review comments - add is_litellm guard, remove unused import/var
- Guard _get_llm_extra_kwargs with is_litellm check to avoid passing
  litellm-specific kwargs to non-litellm instructor clients
- Remove unused pytest import
- Remove unused result variable in test_to_pydantic_forwards_api_key
- Add test for non-litellm path returning empty kwargs

Co-Authored-By: João <joao@crewai.com>
2026-03-04 12:21:57 +00:00
Devin AI
9dabb3e81c fix: support remote Ollama server for function calling and pydantic output
Bug 1: InternalInstructor.to_pydantic() now forwards api_base/base_url/api_key
to litellm so that remote Ollama servers are reachable during structured output
parsing.

Bug 2: LLM.supports_function_calling() now falls back to querying the remote
Ollama /api/show endpoint when litellm returns False for Ollama models with a
non-localhost base URL.

Fixes #4694

Co-Authored-By: João <joao@crewai.com>
2026-03-04 12:15:16 +00:00