Skip to content

获取上游视频链接 - #2044

Closed
RixAPI wants to merge 4500 commits into
QuantumNous:mainfrom
RixAPI:main
Closed

获取上游视频链接#2044
RixAPI wants to merge 4500 commits into
QuantumNous:mainfrom
RixAPI:main

Conversation

@RixAPI

@RixAPI RixAPI commented Oct 14, 2025

Copy link
Copy Markdown
Contributor

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.

RedwindA and others added 30 commits September 29, 2025 18:32
解锁deepseek补全倍率;允许deepseek渠道获取模型
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
fix: Redirect address after successful tg binding
fix: sync third-party binding state in personal settings
…ENS/CUSTOM)

Replace the legacy boolean “DisplayInCurrencyEnabled” with an injected, type-safe
configuration `general_setting.quota_display_type`, and wire it through the
backend and frontend.

Backend
- Add `QuotaDisplayType` to `operation_setting.GeneralSetting` with injected
  registration via `config.GlobalConfig.Register("general_setting", ...)`.
  Helpers: `IsCurrencyDisplay()`, `IsCNYDisplay()`, `GetQuotaDisplayType()`.
- Expose `quota_display_type` in `/api/status` and keep legacy
  `display_in_currency` for backward compatibility.
- Logger: update `LogQuota` and `FormatQuota` to support USD/CNY/TOKENS. When
  CNY is selected, convert using `operation_setting.USDExchangeRate`.
- Controllers:
  - `billing`: compute subscription/usage amounts based on the selected type
    (USD: divide by `QuotaPerUnit`; CNY: USD→CNY; TOKENS: keep raw tokens).
  - `topup` / `topup_stripe`: treat inputs as “amount” for USD/CNY and as
    token-count for TOKENS; adjust min topup and pay money accordingly.
  - `misc`: include `quota_display_type` in status payload.
- Compatibility: in `model/option.UpdateOption`, map updates to
  `DisplayInCurrencyEnabled` → `general_setting.quota_display_type`
  (true→USD, false→TOKENS). Keep exporting the legacy key in `OptionMap`.

Frontend
- Settings: replace the “display in currency” switch with a Select
  (`general_setting.quota_display_type`) offering USD / CNY / Tokens.
  Provide fallback mapping from legacy `DisplayInCurrencyEnabled`.
- Persist `quota_display_type` to localStorage (keep `display_in_currency`
  for legacy components).
- Rendering helpers: base all quota/price rendering on `quota_display_type`;
  use `usd_exchange_rate` for CNY symbol/values.
- Pricing page: default view currency follows site display type (USD/CNY),
  while TOKENS mode still allows per-view currency toggling when needed.

Notes
- No database migrations required.
- Legacy clients remain functional via compatibility fields.
feat: support claude-sonnet-4-5-20250929
…debar-perf

fix: Optimize sidebar refresh to avoid redundant loading states
…ext-editing

feat: claude context editing
…claude

fix(relay): wrong URL for claude model in GCP Vertex AI
# Conflicts:
#	web/src/components/settings/PersonalSetting.jsx
#	web/src/i18n/locales/en.json
#	web/src/i18n/locales/zh.json
@coderabbitai

coderabbitai Bot commented Oct 14, 2025

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Collaborator

现在已经是原样返回

jiutubaba pushed a commit to jiutubaba/fx-api that referenced this pull request May 17, 2026
…apikey-versioned-base-url

fix(openai): honor versioned image base URLs
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.