Complete the DoubaoVideo asset library integration on top of the
managed per-user asset groups:
- Asset endpoint resolution is an explicit three-level priority: a
hard-coded override wins, otherwise the per-channel credential
base_url from channel_asset_credentials is used verbatim (it already
contains the full /openApi/portrait path), otherwise the official
default. The channel video base URL no longer participates in asset
routing, so video (official Ark) and asset (gateway) addresses stay
fully independent. The channel form gains an "素材 API 地址" field with
a hint that the official address has no asset API, and the channel
type label becomes "豆包视频(素材网关)" to surface the split. Credential
summaries now cover DoubaoVideo channels and echo the base URL back
for editing.
- After an asset request auto-matches a channel (no existing user
binding), persist it to user_asset_channels so subsequent asset and
video requests stay on the same channel, keeping asset:// references
consistent with the upload channel. This mirrors the video-task
binding backfill; binding failure logs a warning and does not fail
the asset operation.
Co-Authored-By: ZCode <noreply@anthropic.com>
Register a DoubaoVideo asset adapter that forwards the Ark-compatible
asset API (POST /api/v1/volcengine/asset?Action=xx) to the official
/openApi/portrait endpoint with a Volcengine V4 HMAC-SHA256 signature
(canonical request over content-type/host/x-content-sha256/x-date,
date/cn-beijing/ark/request scope). The AK/SK pair and optional
project code are stored in channel_asset_credentials (pool_id holds
the project code), so asset credentials stay separate from the video
Bearer key; the channel form now accepts them for type 54.
DoubaoVideo joins the seedance asset family so a user's asset upload
channel and video task channel stay the same (asset:// references
pass through to the upstream). Both resolution chains (asset proxy
resolver and video asset family matcher) now require the asset
credential to be configured before a type-54 channel can serve,
bind, or be auto-matched for assets, falling through to compatible
channels otherwise. The /api/v3 native-path whitelist simplifies
back to the family list now that 54 is a member.
Verified end-to-end against the real upstream: CreateAssetGroup,
CreateAsset (real video upload, Processing -> Active moderation),
ListAssets/GetAsset, and a video generation task referencing the
asset via asset://video reference (succeeded, 432900 tokens).
Co-Authored-By: ZCode <noreply@anthropic.com>
Add KlingAiping usage-token settlement from upstream final_unit_deduction and duration fallback handling.
Normalize model endpoint config persistence and convert model pricing values between stored USD and display currency in the editor.
Co-Authored-By: Codex <noreply@anthropic.com>
Add candidate user selection and explicit_ids batch creation flow for overseas migration. Also add cancellable batches to release selected-user locks and extend backend, frontend, and e2e coverage for the new flow.
Co-Authored-By: Codex <noreply@anthropic.com>
- Remove advanced ratio columns from the table
- Add 'advanced ratios' button in action column
- Add edit modal with Form.InputNumber fields (same as visual editor)
- Table stays clean, advanced settings only visible on click
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add cache/image/audio ratio columns to the table
- Add advanced ratio fields to the add model modal
- Update data init, submit, and addModel to handle new fields
- Use formRef to read InputNumber values (same fix as visual editor)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace || with ?? in addOrUpdateModel to keep 0 values (0 || '' = '')
- Add null check in SubmitData to avoid writing undefined
- Fix formRef value reading to preserve 0 vs empty distinction
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Form.InputNumber values were not synced to currentModel state via
onChange, so the advanced ratio fields were always empty when saving.
Now reads values directly from formRef in onOk handler.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add cacheCreationRatio !== 0 check for row data
- Add hasCacheCreationPricing check for column visibility
- Models with cache read but no cache creation (e.g. Gemini) no longer
show empty cache creation price column
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add extraText for cache read ratio and cache creation ratio fields
- Update placeholder format to match channel pricing convention
- Add missing i18n translations for extraText and new placeholders
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add 5 new fields to output object
- Convert model data to float and populate output fields
- Serialize all fields to JSON in finalOutput
- Submit 7 total option fields (2 existing + 5 new)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add 5 advanced ratio fields to updatedModel object
- Use empty string fallback for undefined values
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add 5 advanced ratio fields to formRef.current.setValues
- Ensure existing ratio data displays correctly in edit modal
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add Form.Section with 5 advanced ratio input fields
- Configure min={0}, step={0.01} for all fields
- Add placeholders showing default values
- Only show when pricingMode === 'per-token'
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Parse 5 new JSON fields from props.options
- Extend modelNames Set to include keys from all ratio fields
- Add 5 new fields to model data objects
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add Chinese translations for 5 advanced ratio fields
- Add English translations for 5 advanced ratio fields
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>