Kimi K3 injects tools mid-conversation via a system message that carries a `tools` array. `dto.Message` had no such field, so the tools were silently dropped during the parse/re-marshal round trip and the upstream rejected the request with `'tool_choice'='required' requires a 'tools' field`. - add `Message.Tools` (json.RawMessage passthrough) - omit the `content` key only for tool-loading messages with nil content, as Kimi rejects `tools` next to `content`; all other messages keep emitting `"content": null` - count message-level tools in token estimation - skip tool-loading messages in channel system prompt injection and make the compatible handler reuse applySystemPromptIfNeeded - add kimi-k3 to the moonshot model list Fixes #7235
| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| convmeta | Loading commit data... | |
| internal | Loading commit data... | |
| kitutil | Loading commit data... | |
| reasoning | Loading commit data... | |
| testdata/golden | Loading commit data... | |
| boundary_test.go | Loading commit data... | |
| claude_default_max_tokens_test.go | Loading commit data... | |
| golden_test.go | Loading commit data... | |
| media.go | Loading commit data... | |
| request_compat.go | Loading commit data... | |
| request_registry.go | Loading commit data... | |
| request_registry_test.go | Loading commit data... | |
| response_compat.go | Loading commit data... | |
| response_registry.go | Loading commit data... | |
| response_registry_test.go | Loading commit data... | |
| safety_settings_test.go | Loading commit data... | |
| terminal_stream_test.go | Loading commit data... | |
| text_converter_registry.go | Loading commit data... | |
| text_converter_registry_test.go | Loading commit data... | |
| tool_loss_policy_test.go | Loading commit data... |