[Frontend] Move engine/protocol.py out openai folder (#54492)

Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
Signed-off-by: wang.yuqi <noooop@126.com>
Co-authored-by: Cyrus Leung <cyrus.tl.leung@gmail.com>
This commit is contained in:
wang.yuqi
2026-08-31 10:13:50 +00:00
committed by GitHub
co-authored by Cyrus Leung
parent d8de4ae322
commit eeb549a74d
194 changed files with 550 additions and 585 deletions
+1 -1
View File
@@ -13,10 +13,10 @@ import json
from collections.abc import Sequence
from dataclasses import dataclass, field
from vllm.entrypoints.generate.base.protocol import DeltaMessage
from vllm.entrypoints.openai.chat_completion.protocol import (
ChatCompletionRequest,
)
from vllm.entrypoints.openai.engine.protocol import DeltaMessage
@dataclass
+1 -1
View File
@@ -6,7 +6,7 @@ from __future__ import annotations
from typing import Any
from vllm.entrypoints.openai.engine.protocol import DeltaMessage
from vllm.entrypoints.generate.base.protocol import DeltaMessage
def _build_token_id_map(parser) -> dict[str, int]:
@@ -14,10 +14,10 @@ from tests.parser.engine.streaming_helpers import (
collect_tool_arguments,
simulate_tool_streaming,
)
from vllm.entrypoints.generate.base.protocol import DeltaMessage
from vllm.entrypoints.openai.chat_completion.protocol import (
ChatCompletionRequest,
)
from vllm.entrypoints.openai.engine.protocol import DeltaMessage
from vllm.parser.gemma4 import Gemma4Parser
# ── Special token IDs (arbitrary but consistent) ─────────────────────
+5 -5
View File
@@ -15,15 +15,15 @@ import pytest
import regex as re
from tests.parser.engine.conftest import make_mock_tokenizer
from vllm.entrypoints.openai.chat_completion.protocol import (
ChatCompletionRequest,
ChatCompletionToolsParam,
)
from vllm.entrypoints.openai.engine.protocol import (
from vllm.entrypoints.generate.base.protocol import (
DeltaFunctionCall,
DeltaToolCall,
FunctionDefinition,
)
from vllm.entrypoints.openai.chat_completion.protocol import (
ChatCompletionRequest,
ChatCompletionToolsParam,
)
from vllm.parser.abstract_parser import DelegatingParser
from vllm.parser.engine.adapters import make_adapters
from vllm.parser.engine.events import EventType, SemanticEvent
+4 -4
View File
@@ -25,16 +25,16 @@ from mistral_common.protocol.instruct.tool_calls import (
)
from partial_json_parser.core.options import Allow
from vllm.entrypoints.openai.chat_completion.protocol import (
ChatCompletionRequest,
)
from vllm.entrypoints.openai.engine.protocol import (
from vllm.entrypoints.generate.base.protocol import (
DeltaFunctionCall,
DeltaMessage,
DeltaToolCall,
ExtractedToolCallInformation,
StructuralTagResponseFormat,
)
from vllm.entrypoints.openai.chat_completion.protocol import (
ChatCompletionRequest,
)
from vllm.parser.engine.events import EventType
from vllm.parser.engine.streaming_parser_engine import StreamingParserEngine
from vllm.parser.mistral import _DEFAULT_JSON_SCHEMA, MistralParser, mistral_config
+1 -1
View File
@@ -15,8 +15,8 @@ from openai_harmony import (
from transformers import AutoTokenizer, GenerationConfig
from vllm.config import StructuredOutputsConfig, VllmConfig
from vllm.entrypoints.generate.base.protocol import FunctionCall
from vllm.entrypoints.openai.chat_completion.protocol import ChatCompletionRequest
from vllm.entrypoints.openai.engine.protocol import FunctionCall
from vllm.entrypoints.openai.parser.harmony_utils import (
get_encoding,
)
+1 -1
View File
@@ -10,8 +10,8 @@ import json
import pytest
from vllm.entrypoints.generate.base.protocol import DeltaMessage
from vllm.entrypoints.openai.chat_completion.protocol import ChatCompletionRequest
from vllm.entrypoints.openai.engine.protocol import DeltaMessage
from vllm.entrypoints.openai.responses.protocol import ResponsesRequest
from vllm.parser.abstract_parser import DelegatingParser
from vllm.reasoning.basic_parsers import BaseThinkingReasoningParser
+1 -1
View File
@@ -6,8 +6,8 @@ from types import SimpleNamespace
import pytest
from vllm.entrypoints.generate.base.protocol import DeltaMessage
from vllm.entrypoints.openai.chat_completion.protocol import ChatCompletionRequest
from vllm.entrypoints.openai.engine.protocol import DeltaMessage
from vllm.parser.abstract_parser import DelegatingParser
from vllm.parser.engine.registered_adapters import Qwen3ParserReasoningAdapter
from vllm.reasoning.basic_parsers import BaseThinkingReasoningParser