Skip to content
Open
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
6 changes: 6 additions & 0 deletions fastdeploy/entrypoints/openai/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,9 @@ class CompletionRequest(BaseModel):

collect_metrics: Optional[bool] = False

# NOTE(Wanglongzhi2001): temporary parameter for video understanding benchmark
video_fps: Optional[float] = None
Comment on lines +551 to +552
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

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

当前 PR 标题使用了 [Other],但仓库 PR 模板的 tag list 中是 [Others](见 .github/pull_request_template.md 的 Checklist)。建议把标题 tag 调整为已有的 [Others] 或新增语义更明确的 tag,以满足仓库约定。

Copilot uses AI. Check for mistakes.

Comment on lines +551 to +553
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

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

这里新增的 video_fps 目前只会被透传进 to_dict_for_infer() 的 req_dict,但在仓库内的输入处理链路中未找到任何地方读取/应用该字段(搜索仅在 protocol.py 中出现)。这会导致基准测试传入 video_fps 也不会影响实际抽帧逻辑。建议在预处理阶段将其映射到视频 item 的 fps(如 messages/multimodal_data 的 video part),或改为复用现有的 mm_processor_kwargs.video_fps 机制并在处理器侧消费该参数。

Copilot uses AI. Check for mistakes.
def to_dict_for_infer(self, request_id=None, prompt=None):
"""
Convert the request parameters into a dictionary
Expand Down Expand Up @@ -734,6 +737,9 @@ class ChatCompletionRequest(BaseModel):

collect_metrics: Optional[bool] = False

# NOTE(Wanglongzhi2001): temporary parameter for video understanding benchmark
video_fps: Optional[float] = None

Comment on lines +740 to +742
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

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

新增请求字段后建议补充单测覆盖:例如验证当用户传入 video_fps 时,CompletionRequest/ChatCompletionRequest.to_dict_for_infer() 的输出会包含该字段(且为预期类型/取值)。仓库已有 openai protocol 相关测试(tests/entrypoints/openai/*),增加回归测试能避免后续重构导致该临时参数被悄然丢弃。

Copilot uses AI. Check for mistakes.
def to_dict_for_infer(self, request_id=None):
"""
Convert the request parameters into a dictionary
Expand Down
Loading