mirror of
https://github.com/justlovemaki/AIClient-2-API.git
synced 2026-04-26 18:05:48 +03:00
[GH-ISSUE #21] 使用kiro api报错400 #19
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/AIClient-2-API-justlovemaki#19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kingjh on GitHub (Aug 6, 2025).
Original GitHub issue: https://github.com/justlovemaki/AIClient-2-API/issues/21
输入:
curl http://localhost:3000/v1/chat/completions
-H "Content-Type: application/json"
-H "Authorization: Bearer 123456"
-d '{
"model": "claude-sonnet-4-20250514",
"messages": [
{"role": "system", "content": "你是一只名叫 Neko 的猫。"},
{"role": "user", "content": "你好,你叫什么名字?"}
]
}'
返回:
{"error":{"message":"Client error (400): Request failed with status code 400","code":400,"suggestions":["Check your request format and parameters"],"details":"<html>\r\n<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n<center>The plain HTTP request was sent to curl http://localhost:3000/healthn</html>\r\n"}}请问应该如何解决?
@justlovemaki commented on GitHub (Aug 7, 2025):
同样的问题 #11
需要不设置https_proxy, 或者代码里增加proxy=false
@kingjh commented on GitHub (Aug 7, 2025):
谢谢,在src/claude/claude-kiro.js的axios.create加上proxy: false就行了
@justlovemaki commented on GitHub (Aug 7, 2025):
只设置http_proxy,不设置https_proxy试过吗?
@kingjh commented on GitHub (Aug 7, 2025):
然后现在是refresh token时候报错400了,应该还要在哪里禁用代理?

@justlovemaki commented on GitHub (Aug 7, 2025):
你咋有三个client_id配置文件,保留你token对应的那个,把其它的移出去。
@kingjh commented on GitHub (Aug 7, 2025):
删去其他配置文件+把http_proxy去掉后,报错429,是否因为aws账号没开通kiro?
@kingjh commented on GitHub (Aug 7, 2025):
看到返回了Kiro temporarily paused new builderId users at this time -_-

@justlovemaki commented on GitHub (Aug 8, 2025):
@kingjh kiro新注册的不能用,刚出的那段时间注册的号可以用,而且要开始收费了