[PR #199] [MERGED] fix(kiro): preserve tool definitions when history contains tool calls #298

Closed
opened 2026-02-27 07:18:51 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/justlovemaki/AIClient-2-API/pull/199
Author: @tickernelz
Created: 1/9/2026
Status: Merged
Merged: 1/9/2026
Merged by: @justlovemaki

Base: mainHead: fix-400-kiro


📝 Commits (3)

  • 99472b8 fix(kiro): preserve tool definitions when history contains tool calls
  • 7d1f2d9 Merge branch 'justlovemaki:main' into fix-400-kiro
  • d390a49 Merge remote-tracking branch 'aiclient/main' into fix-400-kiro

📊 Changes

1 file changed (+29 additions, -1 deletions)

View changed files

📝 src/claude/claude-kiro.js (+29 -1)

📄 Description

When conversation history includes tool usage but current request doesn't provide tool definitions, reconstruct minimal tool specifications from history to prevent API errors. This ensures continuity in multi-turn conversations with tool calling.

  • Extract tool names from historical tool uses
  • Generate placeholder tool specs with empty schemas
  • Only apply when history has tool calls but toolsContext is empty
  • Remove obsolete Chinese comment

FIXED:

  • when do compact in opencode, because compact logic in opencode, not provide tools info, so it will make 400 errors
  • others ai agent that not send tools info but there's history tool calling

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/justlovemaki/AIClient-2-API/pull/199 **Author:** [@tickernelz](https://github.com/tickernelz) **Created:** 1/9/2026 **Status:** ✅ Merged **Merged:** 1/9/2026 **Merged by:** [@justlovemaki](https://github.com/justlovemaki) **Base:** `main` ← **Head:** `fix-400-kiro` --- ### 📝 Commits (3) - [`99472b8`](https://github.com/justlovemaki/AIClient-2-API/commit/99472b80123c6cfab33988aade4dfb77f74cd33b) fix(kiro): preserve tool definitions when history contains tool calls - [`7d1f2d9`](https://github.com/justlovemaki/AIClient-2-API/commit/7d1f2d9d2b5de4ea3ca144c24739d7fde8af9787) Merge branch 'justlovemaki:main' into fix-400-kiro - [`d390a49`](https://github.com/justlovemaki/AIClient-2-API/commit/d390a49f4ae83be3f8db77546fdcbaafdbe4c825) Merge remote-tracking branch 'aiclient/main' into fix-400-kiro ### 📊 Changes **1 file changed** (+29 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/claude/claude-kiro.js` (+29 -1) </details> ### 📄 Description When conversation history includes tool usage but current request doesn't provide tool definitions, reconstruct minimal tool specifications from history to prevent API errors. This ensures continuity in multi-turn conversations with tool calling. - Extract tool names from historical tool uses - Generate placeholder tool specs with empty schemas - Only apply when history has tool calls but toolsContext is empty - Remove obsolete Chinese comment FIXED: - when do compact in opencode, because compact logic in opencode, not provide tools info, so it will make 400 errors - others ai agent that not send tools info but there's history tool calling --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 07:18:51 +03:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/AIClient-2-API-justlovemaki#298
No description provided.