diff --git a/backend/cpp/ik-llama-cpp/grpc-server.cpp b/backend/cpp/ik-llama-cpp/grpc-server.cpp index 578d69034..96eea3b58 100644 --- a/backend/cpp/ik-llama-cpp/grpc-server.cpp +++ b/backend/cpp/ik-llama-cpp/grpc-server.cpp @@ -45,7 +45,9 @@ using backend::HealthMessage; ///// LLAMA.CPP server code below -using json = nlohmann::json; +// Match mtmd.h and ik_llama's server/common headers, which all use +// nlohmann::ordered_json; a plain nlohmann::json alias collides at global scope. +using json = nlohmann::ordered_json; struct server_params { diff --git a/backend/cpp/ik-llama-cpp/utils.hpp b/backend/cpp/ik-llama-cpp/utils.hpp index 4427d4b91..f0e599212 100644 --- a/backend/cpp/ik-llama-cpp/utils.hpp +++ b/backend/cpp/ik-llama-cpp/utils.hpp @@ -13,7 +13,10 @@ #include "mtmd.h" -using json = nlohmann::json; +// mtmd.h and ik_llama's entire server/common stack (chat.h, server-common.h, +// server-task.h, ...) declare `using json = nlohmann::ordered_json`, so match it +// here: a plain `nlohmann::json` alias collides with mtmd.h's at global scope. +using json = nlohmann::ordered_json; extern bool server_verbose;