co-mono/packages/ai/src
Tiago Freitas 8f67e00160
fix: include empty tools param when conversation has tool history (#150)
Anthropic (via LiteLLM/proxy) requires the `tools` parameter to be
present when messages include tool_calls or tool role messages,
even if no tools are currently being provided.

This adds a `hasToolHistory()` helper to detect if the conversation
contains tool calls or tool results, and ensures `tools: []` is
included in the request params when needed.

Fixes #149

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Ubuntu <ubuntu@ip-172-31-50-87.us-west-2.compute.internal>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 21:30:43 +01:00
..
agent chore: bump coding-agent to 0.7.14 - fix Anthropic OAuth and Mistral API compatibility 2025-11-17 12:46:59 +01:00
providers fix: include empty tools param when conversation has tool history (#150) 2025-12-08 21:30:43 +01:00
utils Remove provider-level tool validation, add validateToolCall helper 2025-12-08 18:04:33 +01:00
index.ts Remove provider-level tool validation, add validateToolCall helper 2025-12-08 18:04:33 +01:00
models.generated.ts Add [Unreleased] section to CHANGELOG 2025-12-06 22:49:45 +01:00
models.ts refactor(ai): Simplify API with new streaming interface and model management 2025-09-03 01:25:19 +02:00
stream.ts Add xhigh thinking level for OpenAI codex-max models 2025-12-08 21:12:54 +01:00
types.ts Add xhigh thinking level for OpenAI codex-max models 2025-12-08 21:12:54 +01:00