Skip to content

Conversation

@majiayu000
Copy link

Summary

  • Add graceful fallback handling for LLMs that don't support tools/function calling
  • Detect "does not support tools" errors from providers (Ollama, etc.)
  • Fall back to text-based question decomposition using JSON prompt

Test plan

  • Added unit tests for error detection helper function
  • Tests verify fallback prompt and method existence
  • Manual testing with deepseek-r1 model recommended

Fixes #801

Fixes Cinnamon#801

Some LLM models (e.g., deepseek-r1 via Ollama) do not support the
OpenAI tools/function calling API. This change adds graceful fallback
handling:

- Detect "does not support tools" errors from LLM providers
- Fall back to text-based question decomposition when tools unavailable
- Parse JSON or plain text responses from the fallback prompt

Signed-off-by: majiayu000 <[email protected]>
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.

[BUG] model doesn't support tools

1 participant