From 5f4c7adc2a428bf9a8f6ea7e6a29233354e362db Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 31 Aug 2026 19:40:47 +0000 Subject: [PATCH 1/2] Initial plan From c2f3a23c4992eeda16ed26a83b415d92b508ed96 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 31 Aug 2026 19:42:50 +0000 Subject: [PATCH 2/2] fix(llm): resolve two compile errors causing CI build failure - llama_wrapper.cpp:1770: remove const from draft_token local variable so llama_batch_get_one() can accept a non-const llama_token* pointer. - inference_engine_enhanced.cpp:2263: draft_model_id was used in trySpeculativeGeneration() but never declared there (it only exists in the caller). Derive the id from draft_plugin->getModelInfo() at the call site instead. Fixes CI build run 33417130814 (issue #6095). Co-authored-by: makr-code <150588092+makr-code@users.noreply.github.com> --- src/llm/inference_engine_enhanced.cpp | 3 +++ src/llm/llama_wrapper.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/llm/inference_engine_enhanced.cpp b/src/llm/inference_engine_enhanced.cpp index fb7d2be977..d03ef46289 100644 --- a/src/llm/inference_engine_enhanced.cpp +++ b/src/llm/inference_engine_enhanced.cpp @@ -2257,6 +2257,9 @@ bool InferenceEngineEnhanced::trySpeculativeGeneration( supportsTokenizerlessNativeDraftTokens(draft_plugin); if (!tok_fn_copy && !allow_native_draft_tokens) { + const auto draft_info = draft_plugin ? draft_plugin->getModelInfo() : std::nullopt; + const std::string draft_model_id = (draft_info && !draft_info->model_id.empty()) + ? draft_info->model_id : "(unknown draft model)"; spdlog::info("Speculative draft model '{}' has no tokenizer bridge or " "known native draft-token implementation; falling back " "to target generation", diff --git a/src/llm/llama_wrapper.cpp b/src/llm/llama_wrapper.cpp index d18aa4e41e..ff2fa2510b 100644 --- a/src/llm/llama_wrapper.cpp +++ b/src/llm/llama_wrapper.cpp @@ -1766,7 +1766,7 @@ std::vector> LlamaWrapper::computeTargetLogitsForTokens( "Draft token out of target vocabulary range"); } - const auto draft_token = static_cast(token_id); + auto draft_token = static_cast(token_id); const auto batch = llama_batch_get_one(&draft_token, 1); if (llama_decode(context_handle, batch) != 0) { throw std::runtime_error(