From f270ff7c3d7d7589a1ee6ebe29ed5f7abd150818 Mon Sep 17 00:00:00 2001 From: tzhouam Date: Thu, 10 Sep 2026 01:06:25 +0800 Subject: [PATCH] test(minicpmo): teach the audio_embeds tokenizer stub the 0.29 token-id contract main's #5730 added tests/model_executor/models/minicpmo_4_5/test_audio_embeds_input.py with an identity tokenizer double that only implements encode/decode. On this branch MiniCPMO45OmniLLMMultiModalProcessor._get_prompt_updates follows the vLLM 0.29 prompt-update contract (PromptUpdateDetails.select_text is gone), so it resolves the placeholder id once via tokenizer.convert_tokens_to_ids(""), which the double lacks: AttributeError: '_IdentityTokenizer' object has no attribute 'convert_tokens_to_ids' Give the double that method. The tests still read only the placeholder text from PromptUpdateDetails.full, so the returned id is irrelevant to them. Branch-only rebase fallout; no production code changed. Validation: the four failing cases in test_audio_embeds_input.py pass (5 passed); tests/model_executor/models/minicpmo_4_5 otherwise unchanged. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01MpXe2LeRrUQGjZfKFaocMZ Signed-off-by: tzhouam --- .../models/minicpmo_4_5/test_audio_embeds_input.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/model_executor/models/minicpmo_4_5/test_audio_embeds_input.py b/tests/model_executor/models/minicpmo_4_5/test_audio_embeds_input.py index d25b58e48..48d3bd9a3 100644 --- a/tests/model_executor/models/minicpmo_4_5/test_audio_embeds_input.py +++ b/tests/model_executor/models/minicpmo_4_5/test_audio_embeds_input.py @@ -1,5 +1,5 @@ # SPDX-License-Identifier: Apache-2.0 -# SPDX-FileCopyrightText: Copyright contributors to the vLLM project +# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project """Regression tests for the MiniCPM-o 4.5 ``audio_embeds`` input path. Two defects made the OpenAI ``audio_embeds`` content part unusable with this model: @@ -71,6 +71,12 @@ class _IdentityTokenizer: def decode(self, tokens: str) -> str: return tokens + def convert_tokens_to_ids(self, token: str) -> int: + # vLLM 0.29 prompt updates select placeholder positions by token id, + # so the processor resolves ```` once; the value is irrelevant here. + assert token == "" + return 0 + def _processing_info() -> MiniCPMO45OmniLLMProcessingInfo: processor = _FakeProcessor()