[GH-ISSUE #7] Add support for Cline #7

Closed
opened 2026-02-27 07:17:22 +03:00 by kerem · 4 comments
Owner

Originally created by @mzazon on GitHub (Dec 17, 2025).
Original GitHub issue: https://github.com/jwadow/kiro-gateway/issues/7

Added as a custom openai provider, seeing this in the logs:

2025-12-17 11:33:01 | INFO | kiro_gateway.routes:chat_completions:195 - Request to /v1/chat/completions (model=claude-sonnet-4-5-20250929, stream=True)
2025-12-17 11:33:02 | ERROR | kiro_gateway.routes:chat_completions:259 - Error from Kiro API: 400 - {"message":"Improperly formed request.","reason":null}
2025-12-17 11:33:02 | WARNING | kiro_gateway.routes:chat_completions:273 - HTTP 400 - POST /v1/chat/completions - Improperly formed request. (reason: None)
2025-12-17 11:33:02 | INFO | logging:callHandlers:1706 - 127.0.0.1:51781 - "POST /v1/chat/completions HTTP/1.1" 400
2025-12-17 11:33:57 | INFO | logging:callHandlers:1706 - 127.0.0.1:51975 - "GET /v1//models HTTP/1.1" 404

Originally created by @mzazon on GitHub (Dec 17, 2025). Original GitHub issue: https://github.com/jwadow/kiro-gateway/issues/7 Added as a custom openai provider, seeing this in the logs: 2025-12-17 11:33:01 | INFO | kiro_gateway.routes:chat_completions:195 - Request to /v1/chat/completions (model=claude-sonnet-4-5-20250929, stream=True) 2025-12-17 11:33:02 | ERROR | kiro_gateway.routes:chat_completions:259 - Error from Kiro API: 400 - {"message":"Improperly formed request.","reason":null} 2025-12-17 11:33:02 | WARNING | kiro_gateway.routes:chat_completions:273 - HTTP 400 - POST /v1/chat/completions - Improperly formed request. (reason: None) 2025-12-17 11:33:02 | INFO | logging:callHandlers:1706 - 127.0.0.1:51781 - "POST /v1/chat/completions HTTP/1.1" 400 2025-12-17 11:33:57 | INFO | logging:callHandlers:1706 - 127.0.0.1:51975 - "GET /v1//models HTTP/1.1" 404
kerem 2026-02-27 07:17:22 +03:00
  • closed this issue
  • added the
    bug
    fixed
    labels
Author
Owner

@jwadow commented on GitHub (Dec 17, 2025):

Hey @mzazon, need more info to debug this.

Can you enable debug logging and share all files from debug_logs? Add this to your .env:
DEBUG_MODE=errors

Then reproduce the error and share all files from the debug_logs/ folder (especially request_body.json, kiro_request_body.json, app_logs.txt).

Also, the second error GET /v1//models has a double slash — looks like a Cline config issue, not related to the main problem.

<!-- gh-comment-id:3666208094 --> @jwadow commented on GitHub (Dec 17, 2025): Hey @mzazon, need more info to debug this. Can you enable debug logging and share all files from `debug_logs`? Add this to your .env: `DEBUG_MODE=errors` Then reproduce the error and share all files from the debug_logs/ folder (especially request_body.json, kiro_request_body.json, app_logs.txt). Also, the second error GET /v1//models has a double slash — looks like a Cline config issue, not related to the main problem.
Author
Owner

@mzazon commented on GitHub (Dec 17, 2025):

➜  ~ curl http://localhost:8000/v1/chat/completions \
  -H "Authorization: Bearer XXXXXXXXXXXX" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-5",
    "messages": [{"role": "user", "content": "Hello!"}],
    "stream": true
  }'
data: {"id": "chatcmpl-a04ea89f54ae420d88ecfc6c6fb30aa5", "object": "chat.completion.chunk", "created": 1765989511, "model": "claude-sonnet-4-5", "choices": [{"index": 0, "delta": {"content": "Hello! How can I help you today", "role": "assistant"}, "finish_reason": null}]}

data: {"id": "chatcmpl-a04ea89f54ae420d88ecfc6c6fb30aa5", "object": "chat.completion.chunk", "created": 1765989511, "model": "claude-sonnet-4-5", "choices": [{"index": 0, "delta": {"content": "?"}, "finish_reason": null}]}

data: {"id": "chatcmpl-a04ea89f54ae420d88ecfc6c6fb30aa5", "object": "chat.completion.chunk", "created": 1765989511, "model": "claude-sonnet-4-5", "choices": [{"index": 0, "delta": {}, "finish_reason": "stop"}], "usage": {"prompt_tokens": 16, "completion_tokens": 10, "total_tokens": 26}}

data: [DONE]

It does work otherwise via cURL / API

<!-- gh-comment-id:3666208196 --> @mzazon commented on GitHub (Dec 17, 2025): ``` ➜ ~ curl http://localhost:8000/v1/chat/completions \ -H "Authorization: Bearer XXXXXXXXXXXX" \ -H "Content-Type: application/json" \ -d '{ "model": "claude-sonnet-4-5", "messages": [{"role": "user", "content": "Hello!"}], "stream": true }' data: {"id": "chatcmpl-a04ea89f54ae420d88ecfc6c6fb30aa5", "object": "chat.completion.chunk", "created": 1765989511, "model": "claude-sonnet-4-5", "choices": [{"index": 0, "delta": {"content": "Hello! How can I help you today", "role": "assistant"}, "finish_reason": null}]} data: {"id": "chatcmpl-a04ea89f54ae420d88ecfc6c6fb30aa5", "object": "chat.completion.chunk", "created": 1765989511, "model": "claude-sonnet-4-5", "choices": [{"index": 0, "delta": {"content": "?"}, "finish_reason": null}]} data: {"id": "chatcmpl-a04ea89f54ae420d88ecfc6c6fb30aa5", "object": "chat.completion.chunk", "created": 1765989511, "model": "claude-sonnet-4-5", "choices": [{"index": 0, "delta": {}, "finish_reason": "stop"}], "usage": {"prompt_tokens": 16, "completion_tokens": 10, "total_tokens": 26}} data: [DONE] ``` It does work otherwise via cURL / API
Author
Owner

@mzazon commented on GitHub (Dec 17, 2025):

app_logs.txt
error_info.json
kiro_request_body.json
request_body.json

Cline is obviously token heavy :-)

<!-- gh-comment-id:3666366612 --> @mzazon commented on GitHub (Dec 17, 2025): [app_logs.txt](https://github.com/user-attachments/files/24218545/app_logs.txt) [error_info.json](https://github.com/user-attachments/files/24218542/error_info.json) [kiro_request_body.json](https://github.com/user-attachments/files/24218544/kiro_request_body.json) [request_body.json](https://github.com/user-attachments/files/24218543/request_body.json) Cline is obviously token heavy :-)
Author
Owner

@jwadow commented on GitHub (Dec 17, 2025):

Hello again @mzazon

Thanks for the logs, that helped a lot

Fixed it - Cline was sending some tool schemas that Kiro didn't like. Should work now in v1.0.6

<!-- gh-comment-id:3666498076 --> @jwadow commented on GitHub (Dec 17, 2025): Hello again @mzazon Thanks for the logs, that helped a lot Fixed it - Cline was sending some tool schemas that Kiro didn't like. Should work now in [v1.0.6](https://github.com/jwadow/kiro-openai-gateway/releases/tag/v1.0.6)
Sign in to join this conversation.
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/kiro-gateway-jwadow#7
No description provided.