[PR #150] [MERGED] fix: Kiro长上下文400错误修复 & 添加自定义代理支持 #277

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

📋 Pull Request Information

Original PR: https://github.com/justlovemaki/AIClient-2-API/pull/150
Author: @Yoahoug
Created: 1/2/2026
Status: Merged
Merged: 1/3/2026
Merged by: @justlovemaki

Base: mainHead: fix/kiro-long-context-and-custom-proxy


📝 Commits (1)

  • 8c3f8d4 fix: Kiro长上下文400错误修复 & 添加自定义代理支持

📊 Changes

18 files changed (+555 additions, -11 deletions)

View changed files

.vscode/settings.json (+2 -0)
📝 configs/config.json.example (+3 -0)
📝 package-lock.json (+66 -1)
📝 package.json (+3 -0)
📝 src/claude/claude-core.js (+4 -0)
📝 src/claude/claude-kiro.js (+158 -1)
📝 src/config-manager.js (+2 -0)
📝 src/gemini/antigravity-core.js (+19 -4)
📝 src/gemini/gemini-core.js (+19 -4)
📝 src/openai/openai-core.js (+4 -0)
📝 src/openai/openai-responses-core.js (+4 -0)
📝 src/openai/qwen-core.js (+7 -0)
src/proxy-utils.js (+128 -0)
📝 src/ui-manager.js (+7 -1)
📝 static/app/config-manager.js (+18 -0)
📝 static/app/i18n.js (+12 -0)
📝 static/app/styles.css (+59 -0)
📝 static/index.html (+40 -0)

📄 Description

Kiro 长上下文修复

  • 添加请求体大小限制(默认240KB),避免超过Kiro API限制导致400错误
  • 添加 cleanIncompleteToolCalls 方法,清理不完整的工具调用
  • 确保截断后第一条消息是user类型
  • 新增配置项 KIRO_MAX_REQUEST_SIZE_KB

自定义代理支持

  • 为各Provider添加独立的代理配置选项
  • 支持 USE_SYSTEM_PROXY_* 配置
  • UI界面添加代理配置入口
  • 新增 proxy-utils.js 代理工具模块

🔄 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/150 **Author:** [@Yoahoug](https://github.com/Yoahoug) **Created:** 1/2/2026 **Status:** ✅ Merged **Merged:** 1/3/2026 **Merged by:** [@justlovemaki](https://github.com/justlovemaki) **Base:** `main` ← **Head:** `fix/kiro-long-context-and-custom-proxy` --- ### 📝 Commits (1) - [`8c3f8d4`](https://github.com/justlovemaki/AIClient-2-API/commit/8c3f8d4e2b1acc3f7c9d1533120e7a0e7a8ce7cf) fix: Kiro长上下文400错误修复 & 添加自定义代理支持 ### 📊 Changes **18 files changed** (+555 additions, -11 deletions) <details> <summary>View changed files</summary> ➕ `.vscode/settings.json` (+2 -0) 📝 `configs/config.json.example` (+3 -0) 📝 `package-lock.json` (+66 -1) 📝 `package.json` (+3 -0) 📝 `src/claude/claude-core.js` (+4 -0) 📝 `src/claude/claude-kiro.js` (+158 -1) 📝 `src/config-manager.js` (+2 -0) 📝 `src/gemini/antigravity-core.js` (+19 -4) 📝 `src/gemini/gemini-core.js` (+19 -4) 📝 `src/openai/openai-core.js` (+4 -0) 📝 `src/openai/openai-responses-core.js` (+4 -0) 📝 `src/openai/qwen-core.js` (+7 -0) ➕ `src/proxy-utils.js` (+128 -0) 📝 `src/ui-manager.js` (+7 -1) 📝 `static/app/config-manager.js` (+18 -0) 📝 `static/app/i18n.js` (+12 -0) 📝 `static/app/styles.css` (+59 -0) 📝 `static/index.html` (+40 -0) </details> ### 📄 Description ## Kiro 长上下文修复 - 添加请求体大小限制(默认240KB),避免超过Kiro API限制导致400错误 - 添加 cleanIncompleteToolCalls 方法,清理不完整的工具调用 - 确保截断后第一条消息是user类型 - 新增配置项 KIRO_MAX_REQUEST_SIZE_KB ## 自定义代理支持 - 为各Provider添加独立的代理配置选项 - 支持 USE_SYSTEM_PROXY_* 配置 - UI界面添加代理配置入口 - 新增 proxy-utils.js 代理工具模块 --- <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:47 +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#277
No description provided.