Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from openai.types.responses import ResponseFunctionToolCall, ResponseReasoningItem
from openai_harmony import Author, Message, Role, TextContent

from vllm.entrypoints.harmony_utils import (
from vllm.entrypoints.openai.parser.harmony_utils import (
has_custom_tools,
parse_input_to_harmony_message,
parse_output_message,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ async def test_function_calling_required(client: OpenAI, model_name: str):
@pytest.mark.asyncio
@pytest.mark.parametrize("model_name", [MODEL_NAME])
async def test_system_message_with_tools(client: OpenAI, model_name: str):
from vllm.entrypoints.harmony_utils import get_system_message
from vllm.entrypoints.openai.parser.harmony_utils import get_system_message

# Test with custom tools enabled - commentary channel should be available
sys_msg = get_system_message(with_custom_tools=True)
Expand Down
2 changes: 1 addition & 1 deletion vllm/entrypoints/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from vllm.entrypoints.chat_utils import (
ChatTemplateContentFormatOption,
)
from vllm.entrypoints.harmony_utils import (
from vllm.entrypoints.openai.parser.harmony_utils import (
get_encoding,
get_streamable_parser_for_assistant,
render_for_completion,
Comment on lines +22 to 25

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve compatibility for harmony_utils import

Moving harmony_utils under vllm.entrypoints.openai.parser removes the previous vllm.entrypoints.harmony_utils module, but tests/entrypoints/openai/test_response_api_with_harmony.py still imports the old path at line 729, so running the responses test suite now fails immediately with an ImportError. Either update that call site or add a compatibility shim at the old module path to keep the tests runnable.

Useful? React with 👍 / 👎.

Expand Down
4 changes: 2 additions & 2 deletions vllm/entrypoints/openai/serving_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
get_history_tool_calls_cnt,
make_tool_call_id,
)
from vllm.entrypoints.harmony_utils import (
from vllm.entrypoints.logger import RequestLogger
from vllm.entrypoints.openai.parser.harmony_utils import (
get_developer_message,
get_stop_tokens_for_assistant_actions,
get_streamable_parser_for_assistant,
Expand All @@ -30,7 +31,6 @@
parse_input_to_harmony_message,
render_for_completion,
)
from vllm.entrypoints.logger import RequestLogger
from vllm.entrypoints.openai.protocol import (
ChatCompletionLogProb,
ChatCompletionLogProbs,
Expand Down
4 changes: 2 additions & 2 deletions vllm/entrypoints/openai/serving_responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@
SimpleContext,
StreamingHarmonyContext,
)
from vllm.entrypoints.harmony_utils import (
from vllm.entrypoints.logger import RequestLogger
from vllm.entrypoints.openai.parser.harmony_utils import (
construct_harmony_previous_input_messages,
get_developer_message,
get_stop_tokens_for_assistant_actions,
Expand All @@ -76,7 +77,6 @@
parse_response_input,
render_for_completion,
)
from vllm.entrypoints.logger import RequestLogger
from vllm.entrypoints.openai.protocol import (
DeltaMessage,
ErrorResponse,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from collections.abc import Sequence
from typing import TYPE_CHECKING

from vllm.entrypoints.harmony_utils import parse_output_into_messages
from vllm.entrypoints.openai.parser.harmony_utils import parse_output_into_messages
from vllm.entrypoints.openai.protocol import (
ChatCompletionRequest,
DeltaMessage,
Expand Down
2 changes: 1 addition & 1 deletion vllm/reasoning/gptoss_reasoning_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from transformers import PreTrainedTokenizerBase

from vllm.entrypoints.harmony_utils import parse_chat_output
from vllm.entrypoints.openai.parser.harmony_utils import parse_chat_output
from vllm.entrypoints.openai.protocol import ChatCompletionRequest, DeltaMessage
from vllm.entrypoints.tool_server import ToolServer
from vllm.logger import init_logger
Expand Down