[GH-ISSUE #267] Status: 400, Code: ERR_BAD_REQUEST #184

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

Originally created by @candowu on GitHub (Jan 19, 2026).
Original GitHub issue: https://github.com/justlovemaki/AIClient-2-API/issues/267

2026/1/20 07:46:55
[Server] Received request: POST http://localhost:3000/claude-kiro-oauth/v1/messages?beta=true
[Config] MODEL_PROVIDER overridden by path segment to: claude-kiro-oauth
[API Service] Using pooled configuration for claude-kiro-oauth: 03b5517d-363a-4aa9-96bd-3c2e46c0a1fd
[Adapter] getServiceAdapter, provider: claude-kiro-oauth, uuid: 03b5517d-363a-4aa9-96bd-3c2e46c0a1fd
[Content Generation] Model: claude-haiku-4-5-20251001, Stream: true
[Adapter] getServiceAdapter, provider: claude-kiro-oauth, uuid: 03b5517d-363a-4aa9-96bd-3c2e46c0a1fd
[Content Generation] Re-selected service adapter based on model: claude-haiku-4-5-20251001
[Request Convert] Request format matches backend provider. No conversion needed.
[System Prompt Manager] System prompt updated in file for provider 'claude'.
kiroApiService not initialized, attempting to re-initialize...
[Kiro] Initializing Kiro API Service...
[Kiro Auth] Loading credentials from directory: ./configs/kiro/1768735635971_kiro-auth-token
[Kiro Auth] Successfully loaded OAuth credentials from ./configs/kiro/1768735635971_kiro-auth-token/1768735635971_kiro-auth-token.json
[Kiro] Calling generateContentStream with model: claude-opus-4-5 (real streaming)
[Kiro] Removing last assistant with "{" message from processedMessages
[Kiro] History does not end with assistantResponseMessage, adding empty one

2026/1/20 07:46:55
[Server] Received request: POST http://localhost:3000/claude-kiro-oauth/v1/messages?beta=true
[Config] MODEL_PROVIDER overridden by path segment to: claude-kiro-oauth
[API Service] Using pooled configuration for claude-kiro-oauth: 03b5517d-363a-4aa9-96bd-3c2e46c0a1fd
[Adapter] getServiceAdapter, provider: claude-kiro-oauth, uuid: 03b5517d-363a-4aa9-96bd-3c2e46c0a1fd
[Content Generation] Model: claude-sonnet-4-5, Stream: true
[Adapter] getServiceAdapter, provider: claude-kiro-oauth, uuid: 03b5517d-363a-4aa9-96bd-3c2e46c0a1fd
[Content Generation] Re-selected service adapter based on model: claude-sonnet-4-5
[Request Convert] Request format matches backend provider. No conversion needed.
[System Prompt Manager] System prompt updated in file for provider 'claude'.
[Kiro] Calling generateContentStream with model: claude-sonnet-4-5 (real streaming)
[Kiro] Ignoring tool: WebSearch
[Kiro] Truncated tool 'Bash' description: 9777 -> 9219 chars
[Kiro] Truncated tool 'TodoWrite' description: 9701 -> 9219 chars
[Kiro] Truncated 2 tool description(s) to max 9216 chars
[ProviderPoolManager] configs/provider_pools.json updated successfully for types: claude-kiro-oauth
[Kiro] Stream API call failed (Status: 400, Code: ERR_BAD_REQUEST): Request failed with status code 400
[Kiro] Error in streaming generation: AxiosError: Request failed with status code 400
at settle (file:///Users/candowu/code/AIClient-2-API/node_modules/axios/lib/core/settle.js:19:12)
at RedirectableRequest.handleResponse (file:///Users/candowu/code/AIClient-2-API/node_modules/axios/lib/adapters/http.js:547:9)
at RedirectableRequest.emit (node:events:530:35)
at RedirectableRequest._processResponse (/Users/candowu/code/AIClient-2-API/node_modules/follow-redirects/index.js:409:10)
at RedirectableRequest._onNativeResponse (/Users/candowu/code/AIClient-2-API/node_modules/follow-redirects/index.js:102:12)
at Object.onceWrapper (node:events:633:26)
at ClientRequest.emit (node:events:518:28)
at HTTPParser.parserOnIncomingClient (node:_http_client:716:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:117:17)
at TLSSocket.socketOnData (node:_http_client:558:22)
at Axios.request (file:///Users/candowu/code/AIClient-2-API/node_modules/axios/lib/core/Axios.js:45:41)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async KiroApiService.streamApiReal (file:///Users/candowu/code/AIClient-2-API/src/providers/claude/claude-kiro.js:1806:30)
at async KiroApiService.generateContentStream (file:///Users/candowu/code/AIClient-2-API/src/providers/claude/claude-kiro.js:2078:30)
at async KiroApiServiceAdapter.generateContentStream (file:///Users/candowu/code/AIClient-2-API/src/providers/adapter.js:353:9)
at async handleStreamRequest (file:///Users/candowu/code/AIClient-2-API/src/utils/common.js:254:26)
at async handleContentGenerationRequest (file:///Users/candowu/code/AIClient-2-API/src/utils/common.js:678:9)
at async handleAPIRequests (file:///Users/candowu/code/AIClient-2-API/src/services/api-manager.js:52:13)
at async Server.requestHandler (file:///Users/candowu/code/AIClient-2-API/src/handlers/request-handler.js:232:32) {
code: 'ERR_BAD_REQUEST',
config: {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
},
adapter: [ 'xhr', 'http', 'fetch' ],
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 120000,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
env: { FormData: [Function [FormData]], Blob: [class Blob] },
validateStatus: [Function: validateStatus],
headers: Object [AxiosHeaders] {
Accept: 'application/json',
'Content-Type': 'application/json',
'amz-sdk-request': 'attempt=1; max=1',
'x-amzn-kiro-agent-mode': 'vibe',
'x-amz-user-agent': 'aws-sdk-js/1.0.0 KiroIDE-0.8.140-bd135ba212d5229116cb16001d81ad631384402087a8037ac27019be0c0df47c',
'user-agent': 'aws-sdk-js/1.0.0 ua/2.1 os/macos#24.3.0 lang/js md/nodejs#22.14.0 api/codewhispererruntime#1.0.0 m/E KiroIDE-0.8.140-bd135ba212d5229116cb16001d81ad631384402087a8037ac27019be0c0df47c',
Connection: 'close',
Authorization: 'Bearer aoaAAAAAGluzw0I_37Pu6Swwd0meCdBIFbJ67Lyl4sSwiyvIgGyOzLmRp-kKQscRoKGSGgFdganfjAGAeZQY0o1F4Bkc0:MGQCMFdTbVmaxUhMc1GIwVLpFXqWEreAYOF15kkDyis+ixOjJw26ZWCH4DAdL6CD5qN1IAIwT+wpaOQ2okkdtd7BZ/+UtYw/GWmYtZA7awfKRnsDI9rC6onm99Ja5/MbAGJeMkdC',
'amz-sdk-invocation-id': '90ac55d5-53cf-4447-aca4-dd9046591e49',
'Content-Length': '872',
'Accept-Encoding': 'gzip, compress, deflate, br'
},
httpAgent: Agent {
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
defaultPort: 80,
protocol: 'http:',
options: [Object: null prototype],
requests: [Object: null prototype] {},
sockets: [Object: null prototype] {},
freeSockets: [Object: null prototype] {},
keepAliveMsecs: 1000,
keepAlive: true,
maxSockets: 100,
maxFreeSockets: 5,
scheduling: 'lifo',
maxTotalSockets: Infinity,
totalSocketCount: 0,
[Symbol(shapeMode)]: false,
[Symbol(kCapture)]: false
},
httpsAgent: Agent {
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
defaultPort: 443,
protocol: 'https:',
options: [Object: null prototype],
requests: [Object: null prototype] {},
sockets: [Object: null prototype],
freeSockets: [Object: null prototype] {},
keepAliveMsecs: 1000,
keepAlive: true,
maxSockets: 100,
maxFreeSockets: 5,
scheduling: 'lifo',
maxTotalSockets: Infinity,
totalSocketCount: 2,
maxCachedSessions: 100,
_sessionCache: [Object],
[Symbol(shapeMode)]: false,
[Symbol(kCapture)]: false
},
proxy: false,
responseType: 'stream',
method: 'post',
url: 'https://q.us-east-1.amazonaws.com/generateAssistantResponse',
data: {"conversationState":{"chatTriggerType":"MANUAL","conversationId":"0074ddaf-afd3-4afb-b6e7-decc5f90b8d5","currentMessage":{"userInputMessage":{"content":"hello","modelId":"claude-opus-4.5","origin":"AI_EDITOR"}},"history":[{"userInputMessage":{"content":"You are Claude Code, Anthropic's official CLI for Claude.Analyze if this message indicates a new conversation topic. If it does, extract a 2-3 word title that captures the new topic. Format your response as a JSON object with two fields: 'isNewTopic' (boolean) and 'title' (string, or null if isNewTopic is false). Only include these fields, no other text. ONLY generate the JSON object, no other text (eg. no markdown).\\n\\nhello","modelId":"claude-opus-4.5","origin":"AI_EDITOR"}},{"assistantResponseMessage":{"content":"Continue"}}]},"profileArn":"arn:aws:codewhisperer:us-east-1:699475941385:profile/EHGA3GRVQMUK"},
allowAbsoluteUrls: true
},
request: <ref *1> ClientRequest {
_events: [Object: null prototype] {
abort: [Function (anonymous)],
aborted: [Function (anonymous)],
connect: [Function (anonymous)],
error: [Function (anonymous)],
socket: [Function (anonymous)],
timeout: [Function (anonymous)],
finish: [Function: requestOnFinish]
},
_eventsCount: 7,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
strictContentLength: false,
_contentLength: '872',
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
_closed: false,
_header: 'POST /generateAssistantResponse HTTP/1.1\r\n' +
'Accept: application/json\r\n' +
'Content-Type: application/json\r\n' +
'amz-sdk-request: attempt=1; max=1\r\n' +
'x-amzn-kiro-agent-mode: vibe\r\n' +
'x-amz-user-agent: aws-sdk-js/1.0.0 KiroIDE-0.8.140-bd135ba212d5229116cb16001d81ad631384402087a8037ac27019be0c0df47c\r\n' +
'user-agent: aws-sdk-js/1.0.0 ua/2.1 os/macos#24.3.0 lang/js md/nodejs#22.14.0 api/codewhispererruntime#1.0.0 m/E KiroIDE-0.8.140-bd135ba212d5229116cb16001d81ad631384402087a8037ac27019be0c0df47c\r\n' +
'Connection: close\r\n' +
'Authorization: Bearer aoaAAAAAGluzw0I_37Pu6Swwd0meCdBIFbJ67Lyl4sSwiyvIgGyOzLmRp-kKQscRoKGSGgFdganfjAGAeZQY0o1F4Bkc0:MGQCMFdTbVmaxUhMc1GIwVLpFXqWEreAYOF15kkDyis+ixOjJw26ZWCH4DAdL6CD5qN1IAIwT+wpaOQ2okkdtd7BZ/+UtYw/GWmYtZA7awfKRnsDI9rC6onm99Ja5/MbAGJeMkdC\r\n' +
'amz-sdk-invocation-id: 90ac55d5-53cf-4447-aca4-dd9046591e49\r\n' +
'Content-Length: 872\r\n' +
'Accept-Encoding: gzip, compress, deflate, br\r\n' +
'Host: q.us-east-1.amazonaws.com\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: Agent {
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
defaultPort: 443,
protocol: 'https:',
options: [Object: null prototype],
requests: [Object: null prototype] {},
sockets: [Object: null prototype],
freeSockets: [Object: null prototype] {},
keepAliveMsecs: 1000,
keepAlive: true,
maxSockets: 100,
maxFreeSockets: 5,
scheduling: 'lifo',
maxTotalSockets: Infinity,
totalSocketCount: 2,
maxCachedSessions: 100,
_sessionCache: [Object],
[Symbol(shapeMode)]: false,
[Symbol(kCapture)]: false
},
socketPath: undefined,
method: 'POST',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
joinDuplicateHeaders: undefined,
path: '/generateAssistantResponse',
_ended: false,
res: IncomingMessage {
_events: [Object],
_readableState: [ReadableState],
_maxListeners: undefined,
socket: [TLSSocket],
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
rawHeaders: [Array],
rawTrailers: [],
joinDuplicateHeaders: undefined,
aborted: false,
upgrade: false,
url: '',
method: null,
statusCode: 400,
statusMessage: 'Bad Request',
client: [TLSSocket],
_consuming: false,
_dumped: false,
req: [Circular *1],
_eventsCount: 4,
responseUrl: 'https://q.us-east-1.amazonaws.com/generateAssistantResponse',
redirects: [],
[Symbol(shapeMode)]: true,
[Symbol(kCapture)]: false,
[Symbol(kHeaders)]: [Object],
[Symbol(kHeadersCount)]: 22,
[Symbol(kTrailers)]: null,
[Symbol(kTrailersCount)]: 0
},
aborted: false,
timeoutCb: [Function: emitRequestTimeout],
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: 'q.us-east-1.amazonaws.com',
protocol: 'https:',
_redirectable: Writable {
_events: [Object],
_writableState: [WritableState],
_maxListeners: undefined,
_options: [Object],
_ended: true,
_ending: true,
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 872,
_requestBodyBuffers: [],
_eventsCount: 3,
_onNativeResponse: [Function (anonymous)],
_currentRequest: [Circular *1],
_currentUrl: 'https://q.us-east-1.amazonaws.com/generateAssistantResponse',
_timeout: null,
[Symbol(shapeMode)]: true,
[Symbol(kCapture)]: false
},
[Symbol(shapeMode)]: false,
[Symbol(kCapture)]: false,
[Symbol(kBytesWritten)]: 0,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kChunkedBuffer)]: [],
[Symbol(kChunkedLength)]: 0,
[Symbol(kSocket)]: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
secureConnecting: false,
_SNICallback: null,
servername: 'q.us-east-1.amazonaws.com',
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 9,
connecting: false,
_hadError: false,
_parent: null,
_host: 'q.us-east-1.amazonaws.com',
_closeAfterHandlingError: false,
_readableState: [ReadableState],
_writableState: [WritableState],
allowHalfOpen: false,
_maxListeners: undefined,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
timeout: 120000,
parser: null,
_httpMessage: [Circular *1],
autoSelectFamilyAttemptedAddresses: [Array],
handle: [TLSWrap],
[Symbol(alpncallback)]: null,
[Symbol(res)]: [TLSWrap],
[Symbol(verified)]: true,
[Symbol(pendingSession)]: null,
[Symbol(async_id_symbol)]: 2455,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: Timeout {
_idleTimeout: 120000,
_idlePrev: [TimersList],
_idleNext: [Timeout],
_idleStart: 34322,
_onTimeout: [Function: bound ],
_timerArgs: undefined,
_repeat: null,
_destroyed: false,
[Symbol(refed)]: false,
[Symbol(kHasPrimitive)]: false,
[Symbol(asyncId)]: 2396,
[Symbol(triggerId)]: 2388,
[Symbol(kAsyncContextFrame)]: undefined
},
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(shapeMode)]: true,
[Symbol(kCapture)]: false,
[Symbol(kSetNoDelay)]: false,
[Symbol(kSetKeepAlive)]: true,
[Symbol(kSetKeepAliveInitialDelay)]: 60,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object]
},
[Symbol(kOutHeaders)]: [Object: null prototype] {
accept: [Array],
'content-type': [Array],
'amz-sdk-request': [Array],
'x-amzn-kiro-agent-mode': [Array],
'x-amz-user-agent': [Array],
'user-agent': [Array],
connection: [Array],
authorization: [Array],
'amz-sdk-invocation-id': [Array],
'content-length': [Array],
'accept-encoding': [Array],
host: [Array]
},
[Symbol(errored)]: null,
[Symbol(kHighWaterMark)]: 65536,
[Symbol(kRejectNonStandardBodyWrites)]: false,
[Symbol(kUniqueHeaders)]: null
},
response: {
status: 400,
statusText: 'Bad Request',
headers: Object [AxiosHeaders] {
date: 'Mon, 19 Jan 2026 23:46:57 GMT',
'content-type': 'application/json',
'content-length': '101',
connection: 'close',
'x-amzn-requestid': '4ff513df-343d-4395-a250-d35820a30edd',
'x-xss-protection': '1; mode=block',
'strict-transport-security': 'max-age=47304000; includeSubDomains',
'x-frame-options': 'DENY',
'x-amzn-errortype': 'ValidationException:http://internal.amazon.com/coral/com.amazon.aws.codewhisperer/',
'cache-control': 'no-cache',
'x-content-type-options': 'nosniff'
},
config: {
transitional: [Object],
adapter: [Array],
transformRequest: [Array],
transformResponse: [Array],
timeout: 120000,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
env: [Object],
validateStatus: [Function: validateStatus],
headers: [Object [AxiosHeaders]],
httpAgent: [Agent],
httpsAgent: [Agent],
proxy: false,
responseType: 'stream',
method: 'post',
url: 'https://q.us-east-1.amazonaws.com/generateAssistantResponse',
data: {"conversationState":{"chatTriggerType":"MANUAL","conversationId":"0074ddaf-afd3-4afb-b6e7-decc5f90b8d5","currentMessage":{"userInputMessage":{"content":"hello","modelId":"claude-opus-4.5","origin":"AI_EDITOR"}},"history":[{"userInputMessage":{"content":"You are Claude Code, Anthropic's official CLI for Claude.Analyze if this message indicates a new conversation topic. If it does, extract a 2-3 word title that captures the new topic. Format your response as a JSON object with two fields: 'isNewTopic' (boolean) and 'title' (string, or null if isNewTopic is false). Only include these fields, no other text. ONLY generate the JSON object, no other text (eg. no markdown).\\n\\nhello","modelId":"claude-opus-4.5","origin":"AI_EDITOR"}},{"assistantResponseMessage":{"content":"Continue"}}]},"profileArn":"arn:aws:codewhisperer:us-east-1:699475941385:profile/EHGA3GRVQMUK"},
allowAbsoluteUrls: true
},
request: <ref *1> ClientRequest {
_events: [Object: null prototype],
_eventsCount: 7,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
strictContentLength: false,
_contentLength: '872',
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
_closed: false,
_header: 'POST /generateAssistantResponse HTTP/1.1\r\n' +
'Accept: application/json\r\n' +
'Content-Type: application/json\r\n' +
'amz-sdk-request: attempt=1; max=1\r\n' +
'x-amzn-kiro-agent-mode: vibe\r\n' +
'x-amz-user-agent: aws-sdk-js/1.0.0 KiroIDE-0.8.140-bd135ba212d5229116cb16001d81ad631384402087a8037ac27019be0c0df47c\r\n' +
'user-agent: aws-sdk-js/1.0.0 ua/2.1 os/macos#24.3.0 lang/js md/nodejs#22.14.0 api/codewhispererruntime#1.0.0 m/E KiroIDE-0.8.140-bd135ba212d5229116cb16001d81ad631384402087a8037ac27019be0c0df47c\r\n' +
'Connection: close\r\n' +
'Authorization: Bearer aoaAAAAAGluzw0I_37Pu6Swwd0meCdBIFbJ67Lyl4sSwiyvIgGyOzLmRp-kKQscRoKGSGgFdganfjAGAeZQY0o1F4Bkc0:MGQCMFdTbVmaxUhMc1GIwVLpFXqWEreAYOF15kkDyis+ixOjJw26ZWCH4DAdL6CD5qN1IAIwT+wpaOQ2okkdtd7BZ/+UtYw/GWmYtZA7awfKRnsDI9rC6onm99Ja5/MbAGJeMkdC\r\n' +
'amz-sdk-invocation-id: 90ac55d5-53cf-4447-aca4-dd9046591e49\r\n' +
'Content-Length: 872\r\n' +
'Accept-Encoding: gzip, compress, deflate, br\r\n' +
'Host: q.us-east-1.amazonaws.com\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [Agent],
socketPath: undefined,
method: 'POST',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
joinDuplicateHeaders: undefined,
path: '/generateAssistantResponse',
_ended: false,
res: [IncomingMessage],
aborted: false,
timeoutCb: [Function: emitRequestTimeout],
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: 'q.us-east-1.amazonaws.com',
protocol: 'https:',
_redirectable: [Writable],
[Symbol(shapeMode)]: false,
[Symbol(kCapture)]: false,
[Symbol(kBytesWritten)]: 0,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kChunkedBuffer)]: [],
[Symbol(kChunkedLength)]: 0,
[Symbol(kSocket)]: [TLSSocket],
[Symbol(kOutHeaders)]: [Object: null prototype],
[Symbol(errored)]: null,
[Symbol(kHighWaterMark)]: 65536,
[Symbol(kRejectNonStandardBodyWrites)]: false,
[Symbol(kUniqueHeaders)]: null
},
data: IncomingMessage {
_events: [Object],
_readableState: [ReadableState],
_maxListeners: undefined,
socket: [TLSSocket],
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
rawHeaders: [Array],
rawTrailers: [],
joinDuplicateHeaders: undefined,
aborted: false,
upgrade: false,
url: '',
method: null,
statusCode: 400,
statusMessage: 'Bad Request',
client: [TLSSocket],
_consuming: false,
_dumped: false,
req: [ClientRequest],
_eventsCount: 4,
responseUrl: 'https://q.us-east-1.amazonaws.com/generateAssistantResponse',
redirects: [],
[Symbol(shapeMode)]: true,
[Symbol(kCapture)]: false,
[Symbol(kHeaders)]: [Object],
[Symbol(kHeadersCount)]: 22,
[Symbol(kTrailers)]: null,
[Symbol(kTrailersCount)]: 0
}
},
status: 400
}

[Server] Error during stream processing: Error: Error processing response: Request failed with status code 400
at KiroApiService.generateContentStream (file:///Users/candowu/code/AIClient-2-API/src/providers/claude/claude-kiro.js:2329:19)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async KiroApiServiceAdapter.generateContentStream (file:///Users/candowu/code/AIClient-2-API/src/providers/adapter.js:353:9)
at async handleStreamRequest (file:///Users/candowu/code/AIClient-2-API/src/utils/common.js:254:26)
at async handleContentGenerationRequest (file:///Users/candowu/code/AIClient-2-API/src/utils/common.js:678:9)
at async handleAPIRequests (file:///Users/candowu/code/AIClient-2-API/src/services/api-manager.js:52:13)
at async Server.requestHandler (file:///Users/candowu/code/AIClient-2-API/src/handlers/request-handler.js:232:32)
[Provider Pool] Marking claude-kiro-oauth as unhealthy due to stream error (status: unknown)
[ProviderPoolManager] Provider 03b5517d-363a-4aa9-96bd-3c2e46c0a1fd for type claude-kiro-oauth error count: 1/3. Still healthy.
[Stream Retry] Credential marked unhealthy. Waiting 1050ms before retry 1/5 with different credential...
[ProviderPoolManager] configs/provider_pools.json updated successfully for types: claude-kiro-oauth
[Adapter] getServiceAdapter, provider: claude-kiro-oauth, uuid: 03b5517d-363a-4aa9-96bd-3c2e46c0a1fd
[Stream Retry] No different healthy credential available. Same credential selected.

Originally created by @candowu on GitHub (Jan 19, 2026). Original GitHub issue: https://github.com/justlovemaki/AIClient-2-API/issues/267 2026/1/20 07:46:55 [Server] Received request: POST http://localhost:3000/claude-kiro-oauth/v1/messages?beta=true [Config] MODEL_PROVIDER overridden by path segment to: claude-kiro-oauth [API Service] Using pooled configuration for claude-kiro-oauth: 03b5517d-363a-4aa9-96bd-3c2e46c0a1fd [Adapter] getServiceAdapter, provider: claude-kiro-oauth, uuid: 03b5517d-363a-4aa9-96bd-3c2e46c0a1fd [Content Generation] Model: claude-haiku-4-5-20251001, Stream: true [Adapter] getServiceAdapter, provider: claude-kiro-oauth, uuid: 03b5517d-363a-4aa9-96bd-3c2e46c0a1fd [Content Generation] Re-selected service adapter based on model: claude-haiku-4-5-20251001 [Request Convert] Request format matches backend provider. No conversion needed. [System Prompt Manager] System prompt updated in file for provider 'claude'. kiroApiService not initialized, attempting to re-initialize... [Kiro] Initializing Kiro API Service... [Kiro Auth] Loading credentials from directory: ./configs/kiro/1768735635971_kiro-auth-token [Kiro Auth] Successfully loaded OAuth credentials from ./configs/kiro/1768735635971_kiro-auth-token/1768735635971_kiro-auth-token.json [Kiro] Calling generateContentStream with model: claude-opus-4-5 (real streaming) [Kiro] Removing last assistant with "{" message from processedMessages [Kiro] History does not end with assistantResponseMessage, adding empty one 2026/1/20 07:46:55 [Server] Received request: POST http://localhost:3000/claude-kiro-oauth/v1/messages?beta=true [Config] MODEL_PROVIDER overridden by path segment to: claude-kiro-oauth [API Service] Using pooled configuration for claude-kiro-oauth: 03b5517d-363a-4aa9-96bd-3c2e46c0a1fd [Adapter] getServiceAdapter, provider: claude-kiro-oauth, uuid: 03b5517d-363a-4aa9-96bd-3c2e46c0a1fd [Content Generation] Model: claude-sonnet-4-5, Stream: true [Adapter] getServiceAdapter, provider: claude-kiro-oauth, uuid: 03b5517d-363a-4aa9-96bd-3c2e46c0a1fd [Content Generation] Re-selected service adapter based on model: claude-sonnet-4-5 [Request Convert] Request format matches backend provider. No conversion needed. [System Prompt Manager] System prompt updated in file for provider 'claude'. [Kiro] Calling generateContentStream with model: claude-sonnet-4-5 (real streaming) [Kiro] Ignoring tool: WebSearch [Kiro] Truncated tool 'Bash' description: 9777 -> 9219 chars [Kiro] Truncated tool 'TodoWrite' description: 9701 -> 9219 chars [Kiro] Truncated 2 tool description(s) to max 9216 chars [ProviderPoolManager] configs/provider_pools.json updated successfully for types: claude-kiro-oauth [Kiro] Stream API call failed (Status: 400, Code: ERR_BAD_REQUEST): Request failed with status code 400 [Kiro] Error in streaming generation: AxiosError: Request failed with status code 400 at settle (file:///Users/candowu/code/AIClient-2-API/node_modules/axios/lib/core/settle.js:19:12) at RedirectableRequest.handleResponse (file:///Users/candowu/code/AIClient-2-API/node_modules/axios/lib/adapters/http.js:547:9) at RedirectableRequest.emit (node:events:530:35) at RedirectableRequest._processResponse (/Users/candowu/code/AIClient-2-API/node_modules/follow-redirects/index.js:409:10) at RedirectableRequest._onNativeResponse (/Users/candowu/code/AIClient-2-API/node_modules/follow-redirects/index.js:102:12) at Object.onceWrapper (node:events:633:26) at ClientRequest.emit (node:events:518:28) at HTTPParser.parserOnIncomingClient (node:_http_client:716:27) at HTTPParser.parserOnHeadersComplete (node:_http_common:117:17) at TLSSocket.socketOnData (node:_http_client:558:22) at Axios.request (file:///Users/candowu/code/AIClient-2-API/node_modules/axios/lib/core/Axios.js:45:41) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async KiroApiService.streamApiReal (file:///Users/candowu/code/AIClient-2-API/src/providers/claude/claude-kiro.js:1806:30) at async KiroApiService.generateContentStream (file:///Users/candowu/code/AIClient-2-API/src/providers/claude/claude-kiro.js:2078:30) at async KiroApiServiceAdapter.generateContentStream (file:///Users/candowu/code/AIClient-2-API/src/providers/adapter.js:353:9) at async handleStreamRequest (file:///Users/candowu/code/AIClient-2-API/src/utils/common.js:254:26) at async handleContentGenerationRequest (file:///Users/candowu/code/AIClient-2-API/src/utils/common.js:678:9) at async handleAPIRequests (file:///Users/candowu/code/AIClient-2-API/src/services/api-manager.js:52:13) at async Server.requestHandler (file:///Users/candowu/code/AIClient-2-API/src/handlers/request-handler.js:232:32) { code: 'ERR_BAD_REQUEST', config: { transitional: { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }, adapter: [ 'xhr', 'http', 'fetch' ], transformRequest: [ [Function: transformRequest] ], transformResponse: [ [Function: transformResponse] ], timeout: 120000, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, env: { FormData: [Function [FormData]], Blob: [class Blob] }, validateStatus: [Function: validateStatus], headers: Object [AxiosHeaders] { Accept: 'application/json', 'Content-Type': 'application/json', 'amz-sdk-request': 'attempt=1; max=1', 'x-amzn-kiro-agent-mode': 'vibe', 'x-amz-user-agent': 'aws-sdk-js/1.0.0 KiroIDE-0.8.140-bd135ba212d5229116cb16001d81ad631384402087a8037ac27019be0c0df47c', 'user-agent': 'aws-sdk-js/1.0.0 ua/2.1 os/macos#24.3.0 lang/js md/nodejs#22.14.0 api/codewhispererruntime#1.0.0 m/E KiroIDE-0.8.140-bd135ba212d5229116cb16001d81ad631384402087a8037ac27019be0c0df47c', Connection: 'close', Authorization: 'Bearer aoaAAAAAGluzw0I_37Pu6Swwd0meCdBIFbJ67Lyl4sSwiyvIgGyOzLmRp-kKQscRoKGSGgFdganfjAGAeZQY0o1F4Bkc0:MGQCMFdTbVmaxUhMc1GIwVLpFXqWEreAYOF15kkDyis+ixOjJw26ZWCH4DAdL6CD5qN1IAIwT+wpaOQ2okkdtd7BZ/+UtYw/GWmYtZA7awfKRnsDI9rC6onm99Ja5/MbAGJeMkdC', 'amz-sdk-invocation-id': '90ac55d5-53cf-4447-aca4-dd9046591e49', 'Content-Length': '872', 'Accept-Encoding': 'gzip, compress, deflate, br' }, httpAgent: Agent { _events: [Object: null prototype], _eventsCount: 2, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object: null prototype], requests: [Object: null prototype] {}, sockets: [Object: null prototype] {}, freeSockets: [Object: null prototype] {}, keepAliveMsecs: 1000, keepAlive: true, maxSockets: 100, maxFreeSockets: 5, scheduling: 'lifo', maxTotalSockets: Infinity, totalSocketCount: 0, [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false }, httpsAgent: Agent { _events: [Object: null prototype], _eventsCount: 2, _maxListeners: undefined, defaultPort: 443, protocol: 'https:', options: [Object: null prototype], requests: [Object: null prototype] {}, sockets: [Object: null prototype], freeSockets: [Object: null prototype] {}, keepAliveMsecs: 1000, keepAlive: true, maxSockets: 100, maxFreeSockets: 5, scheduling: 'lifo', maxTotalSockets: Infinity, totalSocketCount: 2, maxCachedSessions: 100, _sessionCache: [Object], [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false }, proxy: false, responseType: 'stream', method: 'post', url: 'https://q.us-east-1.amazonaws.com/generateAssistantResponse', data: `{"conversationState":{"chatTriggerType":"MANUAL","conversationId":"0074ddaf-afd3-4afb-b6e7-decc5f90b8d5","currentMessage":{"userInputMessage":{"content":"hello","modelId":"claude-opus-4.5","origin":"AI_EDITOR"}},"history":[{"userInputMessage":{"content":"You are Claude Code, Anthropic's official CLI for Claude.Analyze if this message indicates a new conversation topic. If it does, extract a 2-3 word title that captures the new topic. Format your response as a JSON object with two fields: 'isNewTopic' (boolean) and 'title' (string, or null if isNewTopic is false). Only include these fields, no other text. ONLY generate the JSON object, no other text (eg. no markdown).\\n\\nhello","modelId":"claude-opus-4.5","origin":"AI_EDITOR"}},{"assistantResponseMessage":{"content":"Continue"}}]},"profileArn":"arn:aws:codewhisperer:us-east-1:699475941385:profile/EHGA3GRVQMUK"}`, allowAbsoluteUrls: true }, request: <ref *1> ClientRequest { _events: [Object: null prototype] { abort: [Function (anonymous)], aborted: [Function (anonymous)], connect: [Function (anonymous)], error: [Function (anonymous)], socket: [Function (anonymous)], timeout: [Function (anonymous)], finish: [Function: requestOnFinish] }, _eventsCount: 7, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: false, _last: true, chunkedEncoding: false, shouldKeepAlive: false, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: '872', _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: false, _header: 'POST /generateAssistantResponse HTTP/1.1\r\n' + 'Accept: application/json\r\n' + 'Content-Type: application/json\r\n' + 'amz-sdk-request: attempt=1; max=1\r\n' + 'x-amzn-kiro-agent-mode: vibe\r\n' + 'x-amz-user-agent: aws-sdk-js/1.0.0 KiroIDE-0.8.140-bd135ba212d5229116cb16001d81ad631384402087a8037ac27019be0c0df47c\r\n' + 'user-agent: aws-sdk-js/1.0.0 ua/2.1 os/macos#24.3.0 lang/js md/nodejs#22.14.0 api/codewhispererruntime#1.0.0 m/E KiroIDE-0.8.140-bd135ba212d5229116cb16001d81ad631384402087a8037ac27019be0c0df47c\r\n' + 'Connection: close\r\n' + 'Authorization: Bearer aoaAAAAAGluzw0I_37Pu6Swwd0meCdBIFbJ67Lyl4sSwiyvIgGyOzLmRp-kKQscRoKGSGgFdganfjAGAeZQY0o1F4Bkc0:MGQCMFdTbVmaxUhMc1GIwVLpFXqWEreAYOF15kkDyis+ixOjJw26ZWCH4DAdL6CD5qN1IAIwT+wpaOQ2okkdtd7BZ/+UtYw/GWmYtZA7awfKRnsDI9rC6onm99Ja5/MbAGJeMkdC\r\n' + 'amz-sdk-invocation-id: 90ac55d5-53cf-4447-aca4-dd9046591e49\r\n' + 'Content-Length: 872\r\n' + 'Accept-Encoding: gzip, compress, deflate, br\r\n' + 'Host: q.us-east-1.amazonaws.com\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: Agent { _events: [Object: null prototype], _eventsCount: 2, _maxListeners: undefined, defaultPort: 443, protocol: 'https:', options: [Object: null prototype], requests: [Object: null prototype] {}, sockets: [Object: null prototype], freeSockets: [Object: null prototype] {}, keepAliveMsecs: 1000, keepAlive: true, maxSockets: 100, maxFreeSockets: 5, scheduling: 'lifo', maxTotalSockets: Infinity, totalSocketCount: 2, maxCachedSessions: 100, _sessionCache: [Object], [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false }, socketPath: undefined, method: 'POST', maxHeaderSize: undefined, insecureHTTPParser: undefined, joinDuplicateHeaders: undefined, path: '/generateAssistantResponse', _ended: false, res: IncomingMessage { _events: [Object], _readableState: [ReadableState], _maxListeners: undefined, socket: [TLSSocket], httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, rawHeaders: [Array], rawTrailers: [], joinDuplicateHeaders: undefined, aborted: false, upgrade: false, url: '', method: null, statusCode: 400, statusMessage: 'Bad Request', client: [TLSSocket], _consuming: false, _dumped: false, req: [Circular *1], _eventsCount: 4, responseUrl: 'https://q.us-east-1.amazonaws.com/generateAssistantResponse', redirects: [], [Symbol(shapeMode)]: true, [Symbol(kCapture)]: false, [Symbol(kHeaders)]: [Object], [Symbol(kHeadersCount)]: 22, [Symbol(kTrailers)]: null, [Symbol(kTrailersCount)]: 0 }, aborted: false, timeoutCb: [Function: emitRequestTimeout], upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: 'q.us-east-1.amazonaws.com', protocol: 'https:', _redirectable: Writable { _events: [Object], _writableState: [WritableState], _maxListeners: undefined, _options: [Object], _ended: true, _ending: true, _redirectCount: 0, _redirects: [], _requestBodyLength: 872, _requestBodyBuffers: [], _eventsCount: 3, _onNativeResponse: [Function (anonymous)], _currentRequest: [Circular *1], _currentUrl: 'https://q.us-east-1.amazonaws.com/generateAssistantResponse', _timeout: null, [Symbol(shapeMode)]: true, [Symbol(kCapture)]: false }, [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false, [Symbol(kBytesWritten)]: 0, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kChunkedBuffer)]: [], [Symbol(kChunkedLength)]: 0, [Symbol(kSocket)]: TLSSocket { _tlsOptions: [Object], _secureEstablished: true, _securePending: false, _newSessionPending: false, _controlReleased: true, secureConnecting: false, _SNICallback: null, servername: 'q.us-east-1.amazonaws.com', alpnProtocol: false, authorized: true, authorizationError: null, encrypted: true, _events: [Object: null prototype], _eventsCount: 9, connecting: false, _hadError: false, _parent: null, _host: 'q.us-east-1.amazonaws.com', _closeAfterHandlingError: false, _readableState: [ReadableState], _writableState: [WritableState], allowHalfOpen: false, _maxListeners: undefined, _sockname: null, _pendingData: null, _pendingEncoding: '', server: undefined, _server: null, ssl: null, _requestCert: true, _rejectUnauthorized: true, timeout: 120000, parser: null, _httpMessage: [Circular *1], autoSelectFamilyAttemptedAddresses: [Array], handle: [TLSWrap], [Symbol(alpncallback)]: null, [Symbol(res)]: [TLSWrap], [Symbol(verified)]: true, [Symbol(pendingSession)]: null, [Symbol(async_id_symbol)]: 2455, [Symbol(kHandle)]: [TLSWrap], [Symbol(lastWriteQueueSize)]: 0, [Symbol(timeout)]: Timeout { _idleTimeout: 120000, _idlePrev: [TimersList], _idleNext: [Timeout], _idleStart: 34322, _onTimeout: [Function: bound ], _timerArgs: undefined, _repeat: null, _destroyed: false, [Symbol(refed)]: false, [Symbol(kHasPrimitive)]: false, [Symbol(asyncId)]: 2396, [Symbol(triggerId)]: 2388, [Symbol(kAsyncContextFrame)]: undefined }, [Symbol(kBuffer)]: null, [Symbol(kBufferCb)]: null, [Symbol(kBufferGen)]: null, [Symbol(shapeMode)]: true, [Symbol(kCapture)]: false, [Symbol(kSetNoDelay)]: false, [Symbol(kSetKeepAlive)]: true, [Symbol(kSetKeepAliveInitialDelay)]: 60, [Symbol(kBytesRead)]: 0, [Symbol(kBytesWritten)]: 0, [Symbol(connect-options)]: [Object] }, [Symbol(kOutHeaders)]: [Object: null prototype] { accept: [Array], 'content-type': [Array], 'amz-sdk-request': [Array], 'x-amzn-kiro-agent-mode': [Array], 'x-amz-user-agent': [Array], 'user-agent': [Array], connection: [Array], authorization: [Array], 'amz-sdk-invocation-id': [Array], 'content-length': [Array], 'accept-encoding': [Array], host: [Array] }, [Symbol(errored)]: null, [Symbol(kHighWaterMark)]: 65536, [Symbol(kRejectNonStandardBodyWrites)]: false, [Symbol(kUniqueHeaders)]: null }, response: { status: 400, statusText: 'Bad Request', headers: Object [AxiosHeaders] { date: 'Mon, 19 Jan 2026 23:46:57 GMT', 'content-type': 'application/json', 'content-length': '101', connection: 'close', 'x-amzn-requestid': '4ff513df-343d-4395-a250-d35820a30edd', 'x-xss-protection': '1; mode=block', 'strict-transport-security': 'max-age=47304000; includeSubDomains', 'x-frame-options': 'DENY', 'x-amzn-errortype': 'ValidationException:http://internal.amazon.com/coral/com.amazon.aws.codewhisperer/', 'cache-control': 'no-cache', 'x-content-type-options': 'nosniff' }, config: { transitional: [Object], adapter: [Array], transformRequest: [Array], transformResponse: [Array], timeout: 120000, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, env: [Object], validateStatus: [Function: validateStatus], headers: [Object [AxiosHeaders]], httpAgent: [Agent], httpsAgent: [Agent], proxy: false, responseType: 'stream', method: 'post', url: 'https://q.us-east-1.amazonaws.com/generateAssistantResponse', data: `{"conversationState":{"chatTriggerType":"MANUAL","conversationId":"0074ddaf-afd3-4afb-b6e7-decc5f90b8d5","currentMessage":{"userInputMessage":{"content":"hello","modelId":"claude-opus-4.5","origin":"AI_EDITOR"}},"history":[{"userInputMessage":{"content":"You are Claude Code, Anthropic's official CLI for Claude.Analyze if this message indicates a new conversation topic. If it does, extract a 2-3 word title that captures the new topic. Format your response as a JSON object with two fields: 'isNewTopic' (boolean) and 'title' (string, or null if isNewTopic is false). Only include these fields, no other text. ONLY generate the JSON object, no other text (eg. no markdown).\\n\\nhello","modelId":"claude-opus-4.5","origin":"AI_EDITOR"}},{"assistantResponseMessage":{"content":"Continue"}}]},"profileArn":"arn:aws:codewhisperer:us-east-1:699475941385:profile/EHGA3GRVQMUK"}`, allowAbsoluteUrls: true }, request: <ref *1> ClientRequest { _events: [Object: null prototype], _eventsCount: 7, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: false, _last: true, chunkedEncoding: false, shouldKeepAlive: false, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: '872', _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: false, _header: 'POST /generateAssistantResponse HTTP/1.1\r\n' + 'Accept: application/json\r\n' + 'Content-Type: application/json\r\n' + 'amz-sdk-request: attempt=1; max=1\r\n' + 'x-amzn-kiro-agent-mode: vibe\r\n' + 'x-amz-user-agent: aws-sdk-js/1.0.0 KiroIDE-0.8.140-bd135ba212d5229116cb16001d81ad631384402087a8037ac27019be0c0df47c\r\n' + 'user-agent: aws-sdk-js/1.0.0 ua/2.1 os/macos#24.3.0 lang/js md/nodejs#22.14.0 api/codewhispererruntime#1.0.0 m/E KiroIDE-0.8.140-bd135ba212d5229116cb16001d81ad631384402087a8037ac27019be0c0df47c\r\n' + 'Connection: close\r\n' + 'Authorization: Bearer aoaAAAAAGluzw0I_37Pu6Swwd0meCdBIFbJ67Lyl4sSwiyvIgGyOzLmRp-kKQscRoKGSGgFdganfjAGAeZQY0o1F4Bkc0:MGQCMFdTbVmaxUhMc1GIwVLpFXqWEreAYOF15kkDyis+ixOjJw26ZWCH4DAdL6CD5qN1IAIwT+wpaOQ2okkdtd7BZ/+UtYw/GWmYtZA7awfKRnsDI9rC6onm99Ja5/MbAGJeMkdC\r\n' + 'amz-sdk-invocation-id: 90ac55d5-53cf-4447-aca4-dd9046591e49\r\n' + 'Content-Length: 872\r\n' + 'Accept-Encoding: gzip, compress, deflate, br\r\n' + 'Host: q.us-east-1.amazonaws.com\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: [Agent], socketPath: undefined, method: 'POST', maxHeaderSize: undefined, insecureHTTPParser: undefined, joinDuplicateHeaders: undefined, path: '/generateAssistantResponse', _ended: false, res: [IncomingMessage], aborted: false, timeoutCb: [Function: emitRequestTimeout], upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: 'q.us-east-1.amazonaws.com', protocol: 'https:', _redirectable: [Writable], [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false, [Symbol(kBytesWritten)]: 0, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kChunkedBuffer)]: [], [Symbol(kChunkedLength)]: 0, [Symbol(kSocket)]: [TLSSocket], [Symbol(kOutHeaders)]: [Object: null prototype], [Symbol(errored)]: null, [Symbol(kHighWaterMark)]: 65536, [Symbol(kRejectNonStandardBodyWrites)]: false, [Symbol(kUniqueHeaders)]: null }, data: IncomingMessage { _events: [Object], _readableState: [ReadableState], _maxListeners: undefined, socket: [TLSSocket], httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, rawHeaders: [Array], rawTrailers: [], joinDuplicateHeaders: undefined, aborted: false, upgrade: false, url: '', method: null, statusCode: 400, statusMessage: 'Bad Request', client: [TLSSocket], _consuming: false, _dumped: false, req: [ClientRequest], _eventsCount: 4, responseUrl: 'https://q.us-east-1.amazonaws.com/generateAssistantResponse', redirects: [], [Symbol(shapeMode)]: true, [Symbol(kCapture)]: false, [Symbol(kHeaders)]: [Object], [Symbol(kHeadersCount)]: 22, [Symbol(kTrailers)]: null, [Symbol(kTrailersCount)]: 0 } }, status: 400 } [Server] Error during stream processing: Error: Error processing response: Request failed with status code 400 at KiroApiService.generateContentStream (file:///Users/candowu/code/AIClient-2-API/src/providers/claude/claude-kiro.js:2329:19) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async KiroApiServiceAdapter.generateContentStream (file:///Users/candowu/code/AIClient-2-API/src/providers/adapter.js:353:9) at async handleStreamRequest (file:///Users/candowu/code/AIClient-2-API/src/utils/common.js:254:26) at async handleContentGenerationRequest (file:///Users/candowu/code/AIClient-2-API/src/utils/common.js:678:9) at async handleAPIRequests (file:///Users/candowu/code/AIClient-2-API/src/services/api-manager.js:52:13) at async Server.requestHandler (file:///Users/candowu/code/AIClient-2-API/src/handlers/request-handler.js:232:32) [Provider Pool] Marking claude-kiro-oauth as unhealthy due to stream error (status: unknown) [ProviderPoolManager] Provider 03b5517d-363a-4aa9-96bd-3c2e46c0a1fd for type claude-kiro-oauth error count: 1/3. Still healthy. [Stream Retry] Credential marked unhealthy. Waiting 1050ms before retry 1/5 with different credential... [ProviderPoolManager] configs/provider_pools.json updated successfully for types: claude-kiro-oauth [Adapter] getServiceAdapter, provider: claude-kiro-oauth, uuid: 03b5517d-363a-4aa9-96bd-3c2e46c0a1fd [Stream Retry] No different healthy credential available. Same credential selected.
kerem closed this issue 2026-02-27 07:18:23 +03:00
Author
Owner

@williamleecn commented on GitHub (Jan 20, 2026):

#270

<!-- gh-comment-id:3771327250 --> @williamleecn commented on GitHub (Jan 20, 2026): #270
Author
Owner

@justlovemaki commented on GitHub (Jan 20, 2026):

#269

<!-- gh-comment-id:3771746706 --> @justlovemaki commented on GitHub (Jan 20, 2026): #269
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#184
No description provided.