Skip to content

Unable to use Kimi K2: error due to parsing of tool calls #929

@KTibow

Description

@KTibow

If you're using Kimi K2 through OpenRouter, and it tries to use any tools, you'll see this error:

Image

*Would copy paste it instead of screenshotting it, but can't due to #927.

The error seems to say that the delta from OpenRouter is being validated (why is unknown), and during validation, it's surprised that "type" is not "function" (there is currently no other "type" than "function" so this is needlessly unforgiving).

*This is technically due to "something wrong" with Novita, the fact that their "type" is incorrect. We will need to wait for either OpenRouter to special case this or for the AI SDK to resolve this.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions