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 |
|---|---|---|
| .. | ||
| channel | Loading commit data... | |
| common | Loading commit data... | |
| common_handler | Loading commit data... | |
| constant | Loading commit data... | |
| helper | Loading commit data... | |
| alpha_search_handler.go | Loading commit data... | |
| alpha_search_handler_test.go | Loading commit data... | |
| audio_handler.go | Loading commit data... | |
| chat_completions_via_responses.go | Loading commit data... | |
| chat_completions_via_responses_test.go | Loading commit data... | |
| claude_handler.go | Loading commit data... | |
| compatible_handler.go | Loading commit data... | |
| convert_request_error.go | Loading commit data... | |
| convert_request_error_test.go | Loading commit data... | |
| embedding_handler.go | Loading commit data... | |
| gemini_handler.go | Loading commit data... | |
| image_handler.go | Loading commit data... | |
| mjproxy_handler.go | Loading commit data... | |
| param_override_error.go | Loading commit data... | |
| plugin_protocol.go | Loading commit data... | |
| plugin_protocol_test.go | Loading commit data... | |
| relay_adaptor.go | Loading commit data... | |
| relay_adaptor_jsplugin_test.go | Loading commit data... | |
| relay_task.go | Loading commit data... | |
| relay_task_test.go | Loading commit data... | |
| request_clone_test.go | Loading commit data... | |
| rerank_handler.go | Loading commit data... | |
| responses_handler.go | Loading commit data... | |
| task_platform_error_test.go | Loading commit data... | |
| task_platform_test.go | Loading commit data... | |
| websocket.go | Loading commit data... |