Skip to content

Fix/veo3 - #1795

Merged
seefs001 merged 3 commits into
QuantumNous:alphafrom
seefs001:fix/veo3
Sep 13, 2025
Merged

Fix/veo3#1795
seefs001 merged 3 commits into
QuantumNous:alphafrom
seefs001:fix/veo3

Conversation

@seefs001

@seefs001 seefs001 commented Sep 13, 2025

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • Enhanced Vertex integration with long‑running task support and improved status handling for more reliable task processing.
  • Bug Fixes

    • Standardized server address usage across the app to ensure correct links and redirects, including:
      • Password reset emails and status endpoint
      • OIDC login redirect
      • Payment flows (Stripe/Epay) success/cancel and callbacks
      • Top-up links and quota notifications
      • Midjourney forwarded image URLs
    • Improves reliability of links, email URLs, and payment return paths across environments.

@coderabbitai

coderabbitai Bot commented Sep 13, 2025

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

Walkthrough

Replaces references to setting.ServerAddress with system_setting.ServerAddress across controllers, services, relay, and model option management. Refactors the Vertex TaskAdaptor to a stateful, RelayInfo-driven long-running prediction flow, updates method signatures, aligns status mapping to model constants, and adds a public FetchTask method. Renames package to system_setting.

Changes

Cohort / File(s) Summary of Changes
Server address source switch
controller/midjourney.go, controller/misc.go, controller/oidc.go, controller/topup.go, controller/topup_stripe.go, service/epay.go, service/quota.go, relay/mjproxy_handler.go, model/option.go, setting/system_setting/system_setting_old.go
Replaced references to setting.ServerAddress (and related worker options) with system_setting.ServerAddress/worker settings; adjusted imports; no public signatures changed; package name switched to system_setting for system settings.
Vertex TaskAdaptor refactor
relay/channel/task/vertex/adaptor.go
Converted adaptor to stateful with ChannelType, apiKey, baseURL; migrated from TaskRelayInfo to RelayInfo; updated all method signatures; rebuilt URL/header/body construction for Vertex long-running predictions; standardized status mapping via model.TaskStatus*; added public FetchTask for operation polling; reorganized helpers and payload structs.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant Client
    participant API as Relay API
    participant Adaptor as Vertex TaskAdaptor
    participant Vertex as Vertex predictLongRunning

    Client->>API: Submit task request
    API->>Adaptor: Init(info: RelayInfo)
    API->>Adaptor: ValidateRequestAndSetAction(...)
    API->>Adaptor: BuildRequestURL/Header/Body
    Adaptor->>Vertex: POST predictLongRunning (authorized)
    Vertex-->>Adaptor: submitResponse (operation name)
    Adaptor-->>API: DoResponse (local task ID, IN_PROGRESS)
    API-->>Client: 202 Accepted (task ID)
    note over Client,API: Client polls status separately
Loading
sequenceDiagram
    autonumber
    participant Poller as Client/Worker
    participant API as Relay API
    participant Adaptor as Vertex TaskAdaptor
    participant Ops as Vertex operations.get

    Poller->>API: Fetch task status
    API->>Adaptor: FetchTask(baseURL, key, body)
    Adaptor->>Ops: GET operation status (authorized)
    Ops-->>Adaptor: operationResponse (status/result)
    Adaptor-->>API: Raw HTTP response
    API-->>Poller: Task status mapped to SUCCESS/IN_PROGRESS/FAILURE
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • feat: vertex veo (#1450) #1659 — Also refactors the Vertex TaskAdaptor and its method signatures for long-running predictions.
  • veo #1792 — Modifies relay/channel/task/vertex/adaptor.go with structural changes to adaptor behavior.
  • task_relay_info #1656 — Migrates from TaskRelayInfo to RelayInfo in adaptor interfaces and flow.

Suggested reviewers

  • creamlike1024
  • Calcium-Ion
  • xyfacai

Poem

A rabbit taps code with a gentle thump—
Swaps settings’ burrow, a tidy jump.
Vertex now learns to wait and fetch,
Long-running dreams we calmly sketch.
URLs align, the paths are clean—
Hippity-hop to a smoother machine. 🐇✨

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • 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 6628fd9 and da6f24a.

📒 Files selected for processing (11)
  • controller/midjourney.go (3 hunks)
  • controller/misc.go (2 hunks)
  • controller/oidc.go (1 hunks)
  • controller/topup.go (2 hunks)
  • controller/topup_stripe.go (2 hunks)
  • model/option.go (4 hunks)
  • relay/channel/task/vertex/adaptor.go (10 hunks)
  • relay/mjproxy_handler.go (2 hunks)
  • service/epay.go (1 hunks)
  • service/quota.go (2 hunks)
  • setting/system_setting/system_setting_old.go (1 hunks)

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
seefs001 merged commit aea732a into QuantumNous:alpha Sep 13, 2025
1 check was pending
@ghostg00

Copy link
Copy Markdown

代码没提交完吧,很多 setting.EnableWorker() 都没改完。。

@coderabbitai coderabbitai Bot mentioned this pull request Sep 14, 2025
@seefs001

Copy link
Copy Markdown
Collaborator Author

代码没提交完吧,很多 setting.EnableWorker() 都没改完。。

好啦

x22x22 pushed a commit to x22x22/new-api that referenced this pull request Apr 24, 2026
jiutubaba pushed a commit to jiutubaba/fx-api that referenced this pull request May 17, 2026
…i-sync

feat(openai): 同步生图 API 支持并接入图片计费调度
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.

3 participants