Skip to content

Conversation

@RixAPI
Copy link
Contributor

@RixAPI RixAPI commented Oct 14, 2025

Summary by CodeRabbit

  • New Features

    • Responses can now include a video URL (video_url) when available, allowing clients to access associated or generated videos directly.
    • The video URL is optional, preserving backward compatibility.
  • Improvements

    • Model search/filtering has been made more reliable, reducing ambiguous matches when querying available models.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 14, 2025

Walkthrough

Adds an optional video_url field to two response/data structs and qualifies column names in a model search WHERE clause. No runtime behavior, branching, or control-flow changes were introduced.

Changes

Cohort / File(s) Summary
DTO schema update
dto/openai_video.go
Added exported field VideoUrl string with JSON tag "video_url,omitempty" to OpenAIVideo.
Sora adaptor response payload
relay/channel/task/sora/adaptor.go
Added exported field VideoUrl string with JSON tag "video_url,omitempty" to responseTask.
Model search query
model/model_meta.go
Updated SearchModels WHERE clause to use fully qualified column names (models.model_name, models.description, models.tags) instead of unqualified names.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • xyfacai
  • feitianbubu
  • seefs001

Poem

A rabbit in code with a floppy-eared grin,
I tucked a new URL so movies jump in.
No logic disturbed, just a gentle new field—
Now videos can travel, all tidy and sealed. 🐇📽️

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "获取上游视频链接" (Get upstream video links) is directly related to the primary changes in the changeset. The two main modifications add a new VideoUrl field to both the OpenAIVideo struct and the responseTask structure, enabling these data models to carry and return video URL information from upstream sources. The title is concise, specific, and clearly conveys the main objective of the changes. While the model_meta.go change involves SQL column qualification and appears tangential, it does not significantly detract from the fact that the title accurately summarizes the core purpose of the PR.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 556d8f1 and 0d3b15d.

📒 Files selected for processing (1)
  • model/model_meta.go (1 hunks)
🔇 Additional comments (1)
model/model_meta.go (1)

131-131: LGTM! Good defensive SQL practice.

Qualifying the column names with the models. prefix prevents potential ambiguity when the JOIN vendors clause is executed (line 137). This change is consistent with other qualified references in the function (lines 135, 137, 144) and improves query maintainability.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@seefs001
Copy link
Collaborator

现在已经是原样返回

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants