Kimi K2 via Deepinfra #940

Closed
opened 2026-02-16 17:28:51 -05:00 by yindo · 3 comments
Owner

Originally created by @you-fail-me on GitHub (Jul 27, 2025).

Originally assigned to: @thdxr on GitHub.

Has anyone gotten Kimi K2 to work via Deepinfra? For me it seems to constantly break with type errors, e.g.

Error message: [{"code":"invalid_union","errors":[[{"expected":"array","code":"invalid_type","path":["choices"],"message":"Invalid input: expected array, received undefined"}],[{"expected":"object","code":"invalid_type","path":["error"],"message":"Invalid input: expected object, received undefined"}]],"path":[],"message":"Invalid input"}] name=UnknownError Server error

or

ERROR 2025-07-27T11:48:18 +1ms service=tui message=AI_TypeValidationError: Type validation failed: Value: {"error_type":"unknown_error","error_message":"Exception: list index out of range"}.
Error message: [{"code":"invalid_union","errors":[[{"expected":"array","code":"invalid_type","path":["choices"],"message":"Invalid input: expected array, received undefined"}],[{"expected":"object","code":"invalid_type","path":["error"],"message":"Invalid input: expected object, received undefined"}]],"path":[],"message":"Invalid input"}] name=UnknownError Server error

or tool use errors, e.g.

ERROR 2025-07-27T11:44:16 +4ms service=tui message=AI_NoSuchToolError: Model tried to call unavailable tool 'todoWrite'. Available tools: bash, edit, webfetch, glob, grep, list, patch, read, write, todowrite, todoread, task. name=UnknownError Server error

Is there something I can fix here or is it a fundamental problem with K2 / Deepinfra? Is there a way to get K2 working with Opencode at the moment?

Originally created by @you-fail-me on GitHub (Jul 27, 2025). Originally assigned to: @thdxr on GitHub. Has anyone gotten Kimi K2 to work via Deepinfra? For me it seems to constantly break with type errors, e.g. ``` Error message: [{"code":"invalid_union","errors":[[{"expected":"array","code":"invalid_type","path":["choices"],"message":"Invalid input: expected array, received undefined"}],[{"expected":"object","code":"invalid_type","path":["error"],"message":"Invalid input: expected object, received undefined"}]],"path":[],"message":"Invalid input"}] name=UnknownError Server error ``` or ``` ERROR 2025-07-27T11:48:18 +1ms service=tui message=AI_TypeValidationError: Type validation failed: Value: {"error_type":"unknown_error","error_message":"Exception: list index out of range"}. Error message: [{"code":"invalid_union","errors":[[{"expected":"array","code":"invalid_type","path":["choices"],"message":"Invalid input: expected array, received undefined"}],[{"expected":"object","code":"invalid_type","path":["error"],"message":"Invalid input: expected object, received undefined"}]],"path":[],"message":"Invalid input"}] name=UnknownError Server error ``` or tool use errors, e.g. ``` ERROR 2025-07-27T11:44:16 +4ms service=tui message=AI_NoSuchToolError: Model tried to call unavailable tool 'todoWrite'. Available tools: bash, edit, webfetch, glob, grep, list, patch, read, write, todowrite, todoread, task. name=UnknownError Server error ``` Is there something I can fix here or is it a fundamental problem with K2 / Deepinfra? Is there a way to get K2 working with Opencode at the moment?
yindo closed this issue 2026-02-16 17:28:51 -05:00
Author
Owner

@esafak commented on GitHub (Jul 27, 2025):

This looks like a dupe.

@esafak commented on GitHub (Jul 27, 2025): This looks like a dupe.
Author
Owner

@you-fail-me commented on GitHub (Jul 27, 2025):

This looks like a dupe.

could you share a link to the original discussion covering this then? I did an issue search before opening but of course it's possible i overlooked it

@you-fail-me commented on GitHub (Jul 27, 2025): > This looks like a dupe. could you share a link to the original discussion covering this then? I did an issue search before opening but of course it's possible i overlooked it
Author
Owner

@esafak commented on GitHub (Jul 27, 2025):

#1329 #1018 #1278 I think it's not specific to DeepInfra.

@esafak commented on GitHub (Jul 27, 2025): #1329 #1018 #1278 I think it's not specific to DeepInfra.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#940