LocalAI/core
lif 8bd7143a44
fix: propagate validation errors (#7787)
fix: validate MCP configuration in model config

Fixes #7334

The Validate() function was not checking if MCP configuration
(mcp.stdio and mcp.remote) contains valid JSON. This caused
malformed JSON with missing commas to be silently accepted.

Changes:
- Add MCP configuration validation to ModelConfig.Validate()
- Properly report validation errors instead of discarding them
- Add test cases for valid and invalid MCP configurations

The fix ensures that malformed JSON in MCP config sections
will now be caught and reported during validation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: majiayu000 <1835304752@qq.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-30 09:54:27 +01:00
..
application feat: disable force eviction (#7725) 2025-12-25 14:26:18 +01:00
backend chore(refactor): move logging to common package based on slog (#7668) 2025-12-21 19:33:13 +01:00
cli feat(api): Allow tracing of requests and responses (#7609) 2025-12-29 11:06:06 +01:00
clients feat(store): add Golang client (#1977) 2024-04-16 15:54:14 +02:00
config fix: propagate validation errors (#7787) 2025-12-30 09:54:27 +01:00
dependencies_manager fix: be consistent in downloading files, check for scanner errors (#3108) 2024-08-02 20:06:25 +02:00
explorer chore(refactor): move logging to common package based on slog (#7668) 2025-12-21 19:33:13 +01:00
gallery fix: add nil checks before mergo.Merge to prevent panic in gallery model installation (#7785) 2025-12-30 09:51:45 +01:00
http fix: Usage for image generation is incorrect (and causes error in LiteLLM) (#7786) 2025-12-30 09:53:05 +01:00
p2p chore(refactor): move logging to common package based on slog (#7668) 2025-12-21 19:33:13 +01:00
schema fix: Usage for image generation is incorrect (and causes error in LiteLLM) (#7786) 2025-12-30 09:53:05 +01:00
services chore(refactor): move logging to common package based on slog (#7668) 2025-12-21 19:33:13 +01:00
startup chore(refactor): move logging to common package based on slog (#7668) 2025-12-21 19:33:13 +01:00
templates chore(refactor): move logging to common package based on slog (#7668) 2025-12-21 19:33:13 +01:00