mirror of
https://github.com/jwadow/kiro-gateway.git
synced 2026-04-25 01:15:57 +03:00
[GH-ISSUE #2] Struggling to work with OpenCode #2
Labels
No labels
bug
bug
enhancement
enhancement
fixed
fixed
invalid
needs-info
needs-testing
pull-request
question
upstream
wontfix
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/kiro-gateway-jwadow#2
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 @Ry-DS on GitHub (Dec 13, 2025).
Original GitHub issue: https://github.com/jwadow/kiro-gateway/issues/2
Hey!
I am trying to use this with OpenCode, with the following:
with
and I seem to connect fine, but the server is giving
I feel like open code is using the API in unintended ways, or they changed something recently. What are some breadcrumbs to dig more into this?
@jwadow commented on GitHub (Dec 13, 2025):
It's weird, because I already released a fix v1.0.1: https://github.com/jwadow/kiro-openai-gateway/releases/tag/v1.0.1
Are you sure that are you using v1.0.1?
The initial problem was that OpenCode was passing an inappropriately long "description" in the tool description. In release 1.0.1, I fixed this issue by detecting such long strings and moving them to system_prompt as the most logical and non-destructive solution.
If you are absolutely sure that you have the current version of the repository, then starting from version 1.0.1 the parameter is available in .env
TOOL_DESCRIPTION_MAX_LENGTHwhich default equals to 10000 (10k).Try playing with this value by adding it to .env. For example, 8000 to start, then try 5000.
TOOL_DESCRIPTION_MAX_LENGTH=8000Restart the script every time you change .env.
I'm looking for feedback about your version and the resulting values.
@lonestike commented on GitHub (Dec 13, 2025):
I get the same issue:
2025-12-13 17:46:53 | ERROR | kiro_gateway.routes:chat_completions:258 - Error from Kiro API: 400 - {"message":"Improperly formed request.","reason":null}
INFO: 127.0.0.1:50300 - "POST /v1/chat/completions HTTP/1.1" 400 Bad Request
I'm on version 1.0.1
@jwadow commented on GitHub (Dec 13, 2025):
Did you tried to set this on .env?
TOOL_DESCRIPTION_MAX_LENGTH=8000Or maybe?
TOOL_DESCRIPTION_MAX_LENGTH=5000Set less than 10000
P.S. Restart the script every time you change .env.
If it works with lower values, let me know.
@spermajohn737-web commented on GitHub (Dec 13, 2025):
i got other issue only in opencode, when it toolcalls it errors this
server response
@jwadow commented on GitHub (Dec 13, 2025):
Fixed in v1.0.2! 🎉
The
400 'Improperly formed request'error (and others) with OpenCode has been resolved.At least I didn't encounter any errors in OpenCode, I called tools, created files, read directories, etc.
Please update to the latest version and let me know if you still experience any issues.
Release: https://github.com/jwadow/kiro-openai-gateway/releases/tag/v1.0.2
@lonestike commented on GitHub (Dec 13, 2025):
thank you it works for me now!
@Ry-DS commented on GitHub (Dec 14, 2025):
legend! thanks for the quick turnaround