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 |
|---|---|---|
| .. | ||
| alpha_search_request.go | Loading commit data... | |
| audio.go | Loading commit data... | |
| billing_usage.go | Loading commit data... | |
| billing_usage_test.go | Loading commit data... | |
| channel_settings.go | Loading commit data... | |
| channel_settings_test.go | Loading commit data... | |
| claude.go | Loading commit data... | |
| embedding.go | Loading commit data... | |
| error.go | Loading commit data... | |
| gemini.go | Loading commit data... | |
| gemini_generation_config_test.go | Loading commit data... | |
| gemini_isstream_test.go | Loading commit data... | |
| gemini_response_test.go | Loading commit data... | |
| notify.go | Loading commit data... | |
| openai_compaction.go | Loading commit data... | |
| openai_image.go | Loading commit data... | |
| openai_request.go | Loading commit data... | |
| openai_request_zero_value_test.go | Loading commit data... | |
| openai_response.go | Loading commit data... | |
| openai_responses_compaction_request.go | Loading commit data... | |
| openai_video.go | Loading commit data... | |
| playground.go | Loading commit data... | |
| pricing.go | Loading commit data... | |
| ratio_sync.go | Loading commit data... | |
| realtime.go | Loading commit data... | |
| reasoning_state.go | Loading commit data... | |
| request_common.go | Loading commit data... | |
| rerank.go | Loading commit data... | |
| sensitive.go | Loading commit data... | |
| usage_merge.go | Loading commit data... | |
| usage_merge_test.go | Loading commit data... | |
| user_settings.go | Loading commit data... | |
| values.go | Loading commit data... |