Skip to content

OpenAI-compatible API启用 goal tools 后,遇到 provider 错误 #353

Description

@qkunio

What version of Kimi Code is running?

0.8.0

Which open platform/subscription were you using?

provider(deepseek)

Which model were you using?

deepseek-v4-flash,其它支持OpenAI-compatible的API也会遇到

What platform is your computer?

macOS

What issue are you seeing?

Error: [provider.api_error] 400 Invalid schema for function 'SetGoalBudget': schema must be a
JSON Schema of 'type: "object"', got 'type: null'.

Image

可能的原因是:SetGoalBudgetToolInputSchema 使用了 z.discriminatedUnion('unit', ...),转换成 provider-facing JSON Schema 后,顶层不是严格的 type: "object",被部分 OpenAI-compatible provider 拒绝。

What steps can reproduce the bug?

使用OpenAI-compatible API并开启 goal 模式

What is the expected behavior?

SetGoalBudget 的 parameters schema 顶层应是合法 object schema,提高适用性。

Additional information

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions