Skip to content

sync(upstream): 9 commits from upstream - #63

Merged
mergify[bot] merged 12 commits into
mainfrom
sync/upstream-cae3676ec6f4-b80d633cf586
Sep 1, 2026
Merged

mergify[bot] merged 12 commits into
mainfrom
sync/upstream-cae3676ec6f4-b80d633cf586

Conversation

@clyang82

Copy link
Copy Markdown

Upstream Sync: 9 Commits

Upstream Commits

SHA Intent Type Risk
cae3676ec6f4 Enable OpenAI Responses API (/v1/responses) relay mode for the Zhipu GLM channel by adding its endpoint URL and passing the request through instead of returning not-implemented feature medium
e468b73915e5 Update GitHub issue/PR templates, add hidden agent-only issue and PR templates, and remove the PR Check CI workflow internal low
692e8d6ee6a9 Restore admins' ability to unbind built-in OAuth providers (e.g. LinuxDo) in the user-binding dialog by aligning the admin binding provider types, backed by new tests. bugfix medium
ac381acf4bf4 Fix time-based billing rule expressions that were always evaluating to true, causing multipliers to apply all day instead of only within the configured time windows; adds validation, tests, and i18n strings for the corrected behavior. bugfix medium
7037ac15bd8a Fix the dev Docker build by adding the local relaykit submodule's go.mod to the build context so go mod download can resolve the module graph (relaykit is referenced via a replace directive). internal low
eb48396d5fe9 Replaces the hard-coded Go task adaptors (ali, doubao, gemini, hailuo, jimeng, kling, sora, suno, vertex, vidu) with a sandboxed JavaScript plugin system: a sobek-based JS engine and registry, a generic jsplugin relay adaptor, a plugin protocol/host API (v1 docs + schema), admin plugin management and marketplace UI, plus supporting channel constraints, task artifacts, and usage-based billing expressions. feature high
0f2a2075ab07 Return HTTP 400 (Bad Request) with skip-retry when relay request parameter validation fails, instead of a generic error without an explicit status code bugfix low
98d50d5383a3 Remove localStorage persistence of the setup-status check so setup completion is re-validated against the current server instance on every page reload, while still skipping redundant checks within the same page session bugfix medium
b80d633cf586 Adds RSA-based transport encryption for password login: server generates/persists a keypair, exposes the public key via a new API route, the web client encrypts passwords before submission, and the login controller decrypts them server-side. feature medium

Affected Surfaces

  • Adaptor.ConvertOpenAIResponsesRequest
  • Adaptor.GetRequestURL
  • MATCH_EQ
  • MATCH_GTE
  • MATCH_RANGE
  • New HTTP routes: plugin router, task-plugin protocol router, task plugin management endpoints
  • New dependency: github.com/grafana/sobek (MIT)
  • New setting/config keys in setting/task_plugin.go and constant/env.go
  • Relay HTTP error status code for invalid request parameters
  • Removed packages: relay/channel/task/{ali,doubao,gemini,hailuo,jimeng,kling,sora,suno,vertex,vidu}
  • RequestCondition
  • RequestRuleGroup
  • Task artifact store/access service and types
  • TimeCondition
  • TimeFunc
  • UserBindingDialog
  • Zhipu GLM /api/v1/responses endpoint routing
  • billingexpr usage-based pricing surface (compile/types)
  • buildRequestRuleExpr
  • common.ErrPasswordEncryptionInvalid
  • common.GeneratePasswordEncryptionPrivateKey
  • common.LoadPasswordEncryptionPrivateKey
  • docs/plugin-api/v1 plugin host API contract (v1.md, v1.d.ts, v1.schema.json)
  • dto.PluginProtocol* / dto.TaskPlugin* (new wire types)
  • localStorage key 'setup_status_checked' (removed)
  • login request wire format (encrypted password field)
  • model.ChannelConstraint (new DB entity)
  • model.TaskPlugin (new DB entity)
  • new HTTP endpoint for password-encryption public key (router/api-router.go)
  • persisted password-encryption key in model layer (model/password_crypto.go)
  • pkg/jsplugin.Engine (new exported JS sandbox engine)
  • pkg/jsplugin.Registry (new exported plugin registry)
  • relay/channel/task/jsplugin.Adaptor (new generic task adaptor)
  • tryParseRequestRuleExpr

Transformations Applied

Downstream File Confidence Notes
relay/channel/zhipu_4v/adaptor.go high upstream diff applied directly via git apply
.agents/github/ISSUE.md high upstream diff applied directly via git apply
.agents/github/PR.md high upstream diff applied directly via git apply
.github/ISSUE_TEMPLATE/bug_report.yml high upstream diff applied directly via git apply
.github/ISSUE_TEMPLATE/bug_report_en.yml high upstream diff applied directly via git apply
.github/ISSUE_TEMPLATE/feature_request.yml high upstream diff applied directly via git apply
.github/ISSUE_TEMPLATE/feature_request_en.yml high upstream diff applied directly via git apply
.github/PULL_REQUEST_TEMPLATE/en.md high upstream diff applied directly via git apply
.github/workflows/pr-check.yml high upstream diff applied directly via git apply
AGENTS.md high upstream diff applied directly via git apply
.github/PULL_REQUEST_TEMPLATE.md low Downstream file contents were empty, so the full post-patch file is returned as new-file content, reconstructed from the upstream diff's added/kept lines. Two adaptations per fork conventions: (1) the Issues/PRs links were rewritten from QuantumNous/new-api to suanova/cuberouter, since this repo is the cuberouter fork and PR checklists should reference this fork's tracker; (2) everything else kept verbatim, including the new-api-specific '功能范围' policy line (Coding Plan / reverse channels / Codex channel), since no downstream convention overrides it. Note this commit also references .agents/github/PR.md and .github/PULL_REQUEST_TEMPLATE/en.md which are added by other files in the same upstream commit and are not part of this file's resolution.
web/src/features/users/components/dialogs/__tests__/user-binding-dialog.test.tsx high upstream diff applied directly via git apply
web/src/features/users/components/dialogs/user-binding-dialog.tsx high upstream diff applied directly via git apply
web/src/features/pricing/lib/__tests__/time-rule-expr.test.ts high upstream diff applied directly via git apply
web/src/features/pricing/lib/billing-expr.ts high upstream diff applied directly via git apply
web/src/features/system-settings/models/tiered-pricing-editor.tsx high upstream diff applied directly via git apply
web/src/i18n/locales/en.json high upstream diff applied directly via git apply
web/src/i18n/locales/zh-TW.json high upstream diff applied directly via git apply
web/src/i18n/locales/zh.json high upstream diff applied directly via git apply
Dockerfile.dev low Dockerfile.dev does not exist downstream at all (git apply failed with 'No such file or directory', and the file contents were empty), so this must be created as a new file. Only the region shown in the upstream diff hunk is verified verbatim: the 'ENV GOEXPERIMENT=greenteagc' line, 'WORKDIR /build', 'ADD go.mod go.sum ./', the new relaykit go.mod ADD (with its comment), 'RUN go mod download', and 'COPY . .'. The surrounding lines (base image, ~11 header lines before the hunk, and everything after 'COPY . .') could not be recovered from the diff and were reconstructed following a conventional multi-stage Go build for this project (module path github.com/QuantumNous/new-api, binary serving on port 3000). The upstream intent — making relaykit/go.mod available before 'go mod download' — is fully captured. A human should verify the header/footer stages against the actual upstream Dockerfile.dev or this fork's main Dockerfile, since the fork may use a different base image, build tags, or frontend build stage.
CLAUDE.md high upstream diff applied directly via git apply
THIRD-PARTY-LICENSES.md high upstream diff applied directly via git apply
common/api_type.go high upstream diff applied directly via git apply
common/api_type_task_plugin_test.go high upstream diff applied directly via git apply
common/init.go high upstream diff applied directly via git apply
common/trusted_proxies.go high upstream diff applied directly via git apply
constant/channel_test.go high upstream diff applied directly via git apply
constant/context_key.go high upstream diff applied directly via git apply
constant/env.go high upstream diff applied directly via git apply
constant/task.go high upstream diff applied directly via git apply
constant/task_test.go high upstream diff applied directly via git apply
controller/billing_option_test.go high upstream diff applied directly via git apply
controller/channel-billing.go high upstream diff applied directly via git apply
controller/channel-test.go high upstream diff applied directly via git apply
controller/channel.go high upstream diff applied directly via git apply
controller/channel_pin_retry_test.go high upstream diff applied directly via git apply
controller/channel_task_plugin_bind_test.go high upstream diff applied directly via git apply
controller/channel_task_plugin_validation_test.go high upstream diff applied directly via git apply
controller/channel_upstream_update.go high upstream diff applied directly via git apply
controller/log.go high upstream diff applied directly via git apply
controller/model.go high upstream diff applied directly via git apply
controller/plugin_endpoint_test.go high upstream diff applied directly via git apply
controller/plugin_native_e2e_test.go high upstream diff applied directly via git apply
controller/plugin_protocol.go high upstream diff applied directly via git apply
controller/plugin_protocol_limiter.go high upstream diff applied directly via git apply
controller/plugin_protocol_limiter_test.go high upstream diff applied directly via git apply
controller/plugin_protocol_sdk_test.go high upstream diff applied directly via git apply
controller/plugin_protocol_test.go high upstream diff applied directly via git apply
controller/relay.go high upstream diff applied directly via git apply
controller/relay_task_plugin_test.go high upstream diff applied directly via git apply
controller/task.go high upstream diff applied directly via git apply
controller/task_generic_test.go high upstream diff applied directly via git apply
controller/task_log_view_test.go high upstream diff applied directly via git apply
controller/task_plugin.go high upstream diff applied directly via git apply
controller/task_plugin_debug.go high upstream diff applied directly via git apply
controller/task_plugin_debug_test.go high upstream diff applied directly via git apply
controller/task_plugin_test.go high upstream diff applied directly via git apply
controller/video_proxy_gemini.go high upstream diff applied directly via git apply
docs/plugin-api/README.md high upstream diff applied directly via git apply
docs/plugin-api/v1.d.ts high upstream diff applied directly via git apply
docs/plugin-api/v1.md high upstream diff applied directly via git apply
docs/plugin-api/v1.schema.json high upstream diff applied directly via git apply
dto/channel_constraints.go high upstream diff applied directly via git apply
dto/channel_constraints_test.go high upstream diff applied directly via git apply
dto/plugin_protocol.go high upstream diff applied directly via git apply
dto/task.go high upstream diff applied directly via git apply
dto/task_plugin.go high upstream diff applied directly via git apply
e2e/doc_parse_test.go high upstream diff applied directly via git apply
logger/logger.go high upstream diff applied directly via git apply
main.go high upstream diff applied directly via git apply
middleware/auth.go high upstream diff applied directly via git apply
middleware/body_cleanup.go high upstream diff applied directly via git apply
middleware/distributor.go high upstream diff applied directly via git apply
middleware/distributor_test.go high upstream diff applied directly via git apply
middleware/jimeng_adapter.go high upstream diff applied directly via git apply
middleware/kling_adapter.go high upstream diff applied directly via git apply
middleware/logger.go high upstream diff applied directly via git apply
middleware/task_artifact_access.go high upstream diff applied directly via git apply
middleware/task_artifact_access_test.go high upstream diff applied directly via git apply
middleware/task_plugin.go high upstream diff applied directly via git apply
middleware/task_plugin_origin_task_test.go high upstream diff applied directly via git apply
middleware/task_plugin_test.go high upstream diff applied directly via git apply
middleware/trusted_proxies.go high upstream diff applied directly via git apply
middleware/utils.go high upstream diff applied directly via git apply
model/ability.go high upstream diff applied directly via git apply
model/channel.go high upstream diff applied directly via git apply
model/channel_cache.go high upstream diff applied directly via git apply
model/channel_constraint.go high upstream diff applied directly via git apply
model/channel_constraint_test.go high upstream diff applied directly via git apply
model/log.go high upstream diff applied directly via git apply
model/log_format_test.go high upstream diff applied directly via git apply
model/main.go high upstream diff applied directly via git apply
model/option_task_plugin_test.go high upstream diff applied directly via git apply
model/pricing.go high upstream diff applied directly via git apply
model/pricing_usage_schema_test.go high upstream diff applied directly via git apply
model/task.go high upstream diff applied directly via git apply
model/task_cas_test.go high upstream diff applied directly via git apply
model/task_openai_video_test.go high upstream diff applied directly via git apply
model/task_plugin.go high upstream diff applied directly via git apply
model/task_plugin_channel_select_test.go high upstream diff applied directly via git apply
model/task_plugin_test.go high upstream diff applied directly via git apply
pkg/billingexpr/compile.go high upstream diff applied directly via git apply
pkg/billingexpr/compile_usage_test.go high upstream diff applied directly via git apply
pkg/billingexpr/expr.md high upstream diff applied directly via git apply
pkg/billingexpr/run.go high upstream diff applied directly via git apply
pkg/billingexpr/settle.go high upstream diff applied directly via git apply
pkg/billingexpr/task_usage_test.go high upstream diff applied directly via git apply
pkg/billingexpr/types.go high upstream diff applied directly via git apply
pkg/jsplugin/cli.go high upstream diff applied directly via git apply
pkg/jsplugin/cli_test.go high upstream diff applied directly via git apply
pkg/jsplugin/engine.go high upstream diff applied directly via git apply
pkg/jsplugin/engine_test.go high upstream diff applied directly via git apply
pkg/jsplugin/fixture.go high upstream diff applied directly via git apply
pkg/jsplugin/fixture_test.go high upstream diff applied directly via git apply
pkg/jsplugin/protocol_supports_test.go high upstream diff applied directly via git apply
pkg/jsplugin/registry.go high upstream diff applied directly via git apply
pkg/jsplugin/registry_disabled_factory_test.go high upstream diff applied directly via git apply
pkg/jsplugin/registry_master_enabled_test.go high upstream diff applied directly via git apply
pkg/jsplugin/registry_test.go high upstream diff applied directly via git apply
pkg/jsplugin/request.go high upstream diff applied directly via git apply
pkg/jsplugin/routing.go high upstream diff applied directly via git apply
pkg/jsplugin/routing_test.go high upstream diff applied directly via git apply
pkg/jsplugin/utils.go high upstream diff applied directly via git apply
plugins/.oxfmtrc.json high upstream diff applied directly via git apply
plugins/.oxlintrc.json high upstream diff applied directly via git apply
plugins/alibaba_responses_test.go high upstream diff applied directly via git apply
plugins/builtin_plugins_test.go high upstream diff applied directly via git apply
plugins/doubao_responses_test.go high upstream diff applied directly via git apply
plugins/embed.go high upstream diff applied directly via git apply
plugins/google_responses_test.go high upstream diff applied directly via git apply
plugins/hailuo_responses_test.go high upstream diff applied directly via git apply
plugins/jimeng_responses_test.go high upstream diff applied directly via git apply
plugins/kling_responses_test.go high upstream diff applied directly via git apply
plugins/sora_responses_test.go high upstream diff applied directly via git apply
plugins/sunoapi_responses_test.go high upstream diff applied directly via git apply
plugins/tasks/alibaba/plugin.js high upstream diff applied directly via git apply
plugins/tasks/doubao/plugin.js high upstream diff applied directly via git apply
plugins/tasks/google/plugin.js high upstream diff applied directly via git apply
plugins/tasks/hailuo/plugin.js high upstream diff applied directly via git apply
plugins/tasks/jimeng/plugin.js high upstream diff applied directly via git apply
plugins/tasks/kling/plugin.js high upstream diff applied directly via git apply
plugins/tasks/sora/plugin.js high upstream diff applied directly via git apply
plugins/tasks/sunoapi/plugin.js high upstream diff applied directly via git apply
plugins/tasks/vertex-ai/plugin.js high upstream diff applied directly via git apply
plugins/tasks/vidu/plugin.js high upstream diff applied directly via git apply
plugins/vertex_ai_responses_test.go high upstream diff applied directly via git apply
plugins/video_responses_test_helpers_test.go high upstream diff applied directly via git apply
plugins/vidu_responses_test.go high upstream diff applied directly via git apply
relay/channel/api_request.go high upstream diff applied directly via git apply
relay/channel/minimax/relay-minimax.go high upstream diff applied directly via git apply
relay/channel/replicate/adaptor.go high upstream diff applied directly via git apply
relay/channel/task/ali/adaptor.go high upstream diff applied directly via git apply
relay/channel/task/ali/adaptor_test.go high upstream diff applied directly via git apply
relay/channel/task/ali/constants.go high upstream diff applied directly via git apply
relay/channel/task/doubao/constants.go high upstream diff applied directly via git apply
relay/channel/task/gemini/adaptor.go high upstream diff applied directly via git apply
relay/channel/task/gemini/billing.go high upstream diff applied directly via git apply
relay/channel/task/gemini/dto.go high upstream diff applied directly via git apply
relay/channel/task/gemini/image.go high upstream diff applied directly via git apply
relay/channel/task/hailuo/adaptor.go high upstream diff applied directly via git apply
relay/channel/task/hailuo/constants.go high upstream diff applied directly via git apply
relay/channel/task/hailuo/models.go high upstream diff applied directly via git apply
relay/channel/task/jimeng/adaptor.go high upstream diff applied directly via git apply
relay/channel/task/jsplugin/adaptor.go high upstream diff applied directly via git apply
relay/channel/task/jsplugin/adaptor_test.go high upstream diff applied directly via git apply
relay/channel/task/jsplugin/auth.go high upstream diff applied directly via git apply
relay/channel/task/jsplugin/auth_test.go high upstream diff applied directly via git apply
relay/channel/task/kling/adaptor.go high upstream diff applied directly via git apply
relay/channel/task/sora/adaptor.go high upstream diff applied directly via git apply
relay/channel/task/sora/adaptor_test.go high upstream diff applied directly via git apply
relay/channel/task/sora/constants.go high upstream diff applied directly via git apply
relay/channel/task/suno/adaptor.go high upstream diff applied directly via git apply
relay/channel/task/suno/models.go high upstream diff applied directly via git apply
relay/channel/task/vertex/adaptor.go high upstream diff applied directly via git apply
relay/channel/task/vidu/adaptor.go high upstream diff applied directly via git apply
relay/channel/volcengine/adaptor.go high upstream diff applied directly via git apply
relay/channel/zhipu_4v/adaptor.go high upstream diff applied directly via git apply
relay/common/relay_info.go high upstream diff applied directly via git apply
relay/common/relay_utils.go high upstream diff applied directly via git apply
relay/common/relay_utils_test.go high upstream diff applied directly via git apply
relay/constant/relay_mode.go high upstream diff applied directly via git apply
relay/plugin_protocol.go high upstream diff applied directly via git apply
relay/plugin_protocol_test.go high upstream diff applied directly via git apply
relay/relay_adaptor_jsplugin_test.go high upstream diff applied directly via git apply
relay/relay_task.go high upstream diff applied directly via git apply
relay/relay_task_test.go high upstream diff applied directly via git apply
relay/task_platform_error_test.go high upstream diff applied directly via git apply
relay/task_platform_test.go high upstream diff applied directly via git apply
relaykit/dto/channel_settings.go high upstream diff applied directly via git apply
router/api-router.go high upstream diff applied directly via git apply
router/plugin-router.go high upstream diff applied directly via git apply
router/plugin_router_test.go high upstream diff applied directly via git apply
router/relay-router.go high upstream diff applied directly via git apply
router/retired_frontend_routes_test.go high upstream diff applied directly via git apply
router/task-plugin-protocol-router.go high upstream diff applied directly via git apply
router/task-router.go high upstream diff applied directly via git apply
router/task_plugin_options_router_test.go high upstream diff applied directly via git apply
router/task_plugin_protocol_router_test.go high upstream diff applied directly via git apply
router/task_router_test.go high upstream diff applied directly via git apply
router/video_router_test.go high upstream diff applied directly via git apply
router/web-router.go high upstream diff applied directly via git apply
service/authz/authz_test.go high upstream diff applied directly via git apply
service/authz/resources_task_plugin.go high upstream diff applied directly via git apply
service/channel_select.go high upstream diff applied directly via git apply
service/channel_select_test.go high upstream diff applied directly via git apply
service/codex_channel_models.go high upstream diff applied directly via git apply
service/task_artifact_access.go high upstream diff applied directly via git apply
service/task_artifact_access_test.go high upstream diff applied directly via git apply
service/task_artifact_store.go high upstream diff applied directly via git apply
service/task_artifact_store_test.go high upstream diff applied directly via git apply
service/task_billing.go high upstream diff applied directly via git apply
service/task_billing_test.go high upstream diff applied directly via git apply
service/task_plugin_audit.go high upstream diff applied directly via git apply
service/task_plugin_view.go high upstream diff applied directly via git apply
service/task_plugin_view_test.go high upstream diff applied directly via git apply
service/task_polling.go high upstream diff applied directly via git apply
service/task_polling_test.go high upstream diff applied directly via git apply
setting/billing_setting/tiered_billing.go high upstream diff applied directly via git apply
setting/billing_setting/tiered_billing_test.go high upstream diff applied directly via git apply
setting/system_setting/system_setting_old.go high upstream diff applied directly via git apply
setting/system_setting/task_artifact.go high upstream diff applied directly via git apply
setting/system_setting/task_artifact_store.go high upstream diff applied directly via git apply
setting/system_setting/task_artifact_store_test.go high upstream diff applied directly via git apply
setting/system_setting/task_artifact_test.go high upstream diff applied directly via git apply
setting/task_plugin.go high upstream diff applied directly via git apply
setting/task_plugin_test.go high upstream diff applied directly via git apply
setting/task_pricing_setting/config.go high upstream diff applied directly via git apply
setting/task_pricing_setting/config_test.go high upstream diff applied directly via git apply
types/task_artifact.go high upstream diff applied directly via git apply
web/.gitignore high upstream diff applied directly via git apply
web/bun.lock high upstream diff applied directly via git apply
web/package.json high upstream diff applied directly via git apply
web/scripts/sync-i18n.mjs high upstream diff applied directly via git apply
web/src/components/ai-elements/code-block.tsx high upstream diff applied directly via git apply
web/src/features/channels/api.ts high upstream diff applied directly via git apply
web/src/features/channels/components/drawers/channel-mutate-drawer.tsx high upstream diff applied directly via git apply
web/src/features/channels/lib/__tests__/channel-type-options.test.ts high upstream diff applied directly via git apply
web/src/features/channels/lib/channel-form.ts high upstream diff applied directly via git apply
web/src/features/pricing/__tests__/breakdown-tier-match.test.ts high upstream diff applied directly via git apply
web/src/features/pricing/__tests__/dynamic-price.test.ts high upstream diff applied directly via git apply
web/src/features/pricing/__tests__/task-expr.test.ts high upstream diff applied directly via git apply
web/src/features/pricing/__tests__/task-matrix-display.test.ts high upstream diff applied directly via git apply
web/src/features/pricing/__tests__/task-matrix.test.ts high upstream diff applied directly via git apply
web/src/features/pricing/components/dynamic-pricing-breakdown.tsx high upstream diff applied directly via git apply
web/src/features/pricing/components/model-billing-mode-badge.tsx high upstream diff applied directly via git apply
web/src/features/pricing/components/model-card.tsx high upstream diff applied directly via git apply
web/src/features/pricing/components/model-details.tsx high upstream diff applied directly via git apply
web/src/features/pricing/components/pricing-columns.tsx high upstream diff applied directly via git apply
web/src/features/pricing/components/pricing-sidebar.tsx high upstream diff applied directly via git apply
web/src/features/pricing/constants.ts high upstream diff applied directly via git apply
web/src/features/pricing/hooks/use-pricing-data.ts high upstream diff applied directly via git apply
web/src/features/pricing/lib/billing-expr.ts high upstream diff applied directly via git apply
web/src/features/pricing/lib/billing-mode.ts high upstream diff applied directly via git apply
web/src/features/pricing/lib/breakdown-tier-match.ts high upstream diff applied directly via git apply
web/src/features/pricing/lib/dynamic-price.ts high upstream diff applied directly via git apply
web/src/features/pricing/lib/filters.ts high upstream diff applied directly via git apply
web/src/features/pricing/lib/task-expr.ts high upstream diff applied directly via git apply
web/src/features/pricing/lib/task-matrix-display.ts high upstream diff applied directly via git apply
web/src/features/pricing/types.ts high upstream diff applied directly via git apply
web/src/features/system-settings/__tests__/task-public-address.test.ts high upstream diff applied directly via git apply
web/src/features/system-settings/general/system-info-section.tsx high upstream diff applied directly via git apply
web/src/features/system-settings/general/task-public-address.ts high upstream diff applied directly via git apply
web/src/features/system-settings/models/model-pricing-sheet.tsx high upstream diff applied directly via git apply
web/src/features/system-settings/models/model-ratio-table-columns.tsx high upstream diff applied directly via git apply
web/src/features/system-settings/models/model-ratio-visual-editor.tsx high upstream diff applied directly via git apply
web/src/features/system-settings/models/task-pricing-matrix.tsx high upstream diff applied directly via git apply
web/src/features/system-settings/models/task-usage-pricing-editor.tsx high upstream diff applied directly via git apply
web/src/features/system-settings/site/section-registry.tsx high upstream diff applied directly via git apply
web/src/features/task-plugins/__tests__/enabled-option.test.ts high upstream diff applied directly via git apply
web/src/features/task-plugins/__tests__/marketplace-panel.test.tsx high upstream diff applied directly via git apply
web/src/features/task-plugins/__tests__/marketplace.test.ts high upstream diff applied directly via git apply
web/src/features/task-plugins/__tests__/plugin-card.test.tsx high upstream diff applied directly via git apply
web/src/features/task-plugins/__tests__/plugin-detail-sheet.test.tsx high upstream diff applied directly via git apply
web/src/features/task-plugins/__tests__/plugin-icon.test.ts high upstream diff applied directly via git apply
web/src/features/task-plugins/__tests__/plugin-url.test.ts high upstream diff applied directly via git apply
web/src/features/task-plugins/__tests__/upload-dialog.test.tsx high upstream diff applied directly via git apply
web/src/features/task-plugins/__tests__/usage-schema-table.test.tsx high upstream diff applied directly via git apply
web/src/features/task-plugins/api.ts high upstream diff applied directly via git apply
web/src/features/task-plugins/components/javascript-viewer.tsx high upstream diff applied directly via git apply
web/src/features/task-plugins/components/marketplace-capabilities.tsx high upstream diff applied directly via git apply
web/src/features/task-plugins/components/marketplace-install-dialog.tsx high upstream diff applied directly via git apply
web/src/features/task-plugins/components/marketplace-panel.tsx high upstream diff applied directly via git apply
web/src/features/task-plugins/components/marketplace-plugin-card.tsx high upstream diff applied directly via git apply
web/src/features/task-plugins/components/marketplace-sources-dialog.tsx high upstream diff applied directly via git apply
web/src/features/task-plugins/components/plugin-card.tsx high upstream diff applied directly via git apply
web/src/features/task-plugins/components/plugin-detail-sheet.tsx high upstream diff applied directly via git apply
web/src/features/task-plugins/components/plugin-icon.tsx high upstream diff applied directly via git apply
web/src/features/task-plugins/components/plugin-metadata-card.tsx high upstream diff applied directly via git apply
web/src/features/task-plugins/components/plugin-sandbox.tsx high upstream diff applied directly via git apply
web/src/features/task-plugins/components/plugin-source-picker.tsx high upstream diff applied directly via git apply
web/src/features/task-plugins/components/plugin-url-import-field.tsx high upstream diff applied directly via git apply
web/src/features/task-plugins/components/plugins-table.tsx high upstream diff applied directly via git apply
web/src/features/task-plugins/components/source-diff.tsx high upstream diff applied directly via git apply
web/src/features/task-plugins/components/upload-dialog.tsx high upstream diff applied directly via git apply
web/src/features/task-plugins/components/usage-schema-table.tsx high upstream diff applied directly via git apply
web/src/features/task-plugins/index.tsx high upstream diff applied directly via git apply
web/src/features/task-plugins/lib/host-protocols.ts high upstream diff applied directly via git apply
web/src/features/task-plugins/lib/marketplace.ts high upstream diff applied directly via git apply
web/src/features/task-plugins/lib/plugin-icon.ts high upstream diff applied directly via git apply
web/src/features/task-plugins/lib/plugin-url.ts high upstream diff applied directly via git apply
web/src/features/task-plugins/types.ts high upstream diff applied directly via git apply
web/src/features/usage-logs/__tests__/access.test.ts high upstream diff applied directly via git apply
web/src/features/usage-logs/__tests__/artifacts.test.ts high upstream diff applied directly via git apply
web/src/features/usage-logs/__tests__/mobile-layout.test.ts high upstream diff applied directly via git apply
web/src/features/usage-logs/__tests__/task-details.test.ts high upstream diff applied directly via git apply
web/src/features/usage-logs/api.ts high upstream diff applied directly via git apply
web/src/features/usage-logs/components/__tests__/usage-facts.test.tsx high upstream diff applied directly via git apply
web/src/features/usage-logs/components/columns/common-logs-columns.tsx high upstream diff applied directly via git apply
web/src/features/usage-logs/components/columns/task-logs-columns.tsx high upstream diff applied directly via git apply
web/src/features/usage-logs/components/dialogs/details-dialog.tsx high upstream diff applied directly via git apply
web/src/features/usage-logs/components/dialogs/task-details-dialog.tsx high upstream diff applied directly via git apply
web/src/features/usage-logs/components/plugin-author-link.tsx high upstream diff applied directly via git apply
web/src/features/usage-logs/components/task-artifacts.tsx high upstream diff applied directly via git apply
web/src/features/usage-logs/components/timing-metrics-cell.tsx high upstream diff applied directly via git apply
web/src/features/usage-logs/components/usage-logs-mobile-card.tsx high upstream diff applied directly via git apply
web/src/features/usage-logs/components/usage-logs-provider.tsx high upstream diff applied directly via git apply
web/src/features/usage-logs/components/usage-logs-table.tsx high upstream diff applied directly via git apply
web/src/features/usage-logs/constants.ts high upstream diff applied directly via git apply
web/src/features/usage-logs/lib/columns.ts high upstream diff applied directly via git apply
web/src/features/usage-logs/lib/query-params.ts high upstream diff applied directly via git apply
web/src/features/usage-logs/lib/task-artifacts.ts high upstream diff applied directly via git apply
web/src/features/usage-logs/lib/task-details.ts high upstream diff applied directly via git apply
web/src/features/usage-logs/lib/task-mobile-layout.ts high upstream diff applied directly via git apply
web/src/features/usage-logs/lib/utils.ts high upstream diff applied directly via git apply
web/src/features/usage-logs/types.ts high upstream diff applied directly via git apply
web/src/i18n/static-keys.ts high upstream diff applied directly via git apply
web/src/lib/__tests__/localized-text.test.ts high upstream diff applied directly via git apply
web/src/lib/admin-permissions.ts high upstream diff applied directly via git apply
web/src/lib/localized-text.ts high upstream diff applied directly via git apply
web/src/routeTree.gen.ts high upstream diff applied directly via git apply
web/src/routes/_authenticated/task-plugins/index.tsx high upstream diff applied directly via git apply
model/option.go high The downstream file matches the upstream context at all six hunk sites; the apply failure was caused by surrounding drift (downstream fork additions like Alipay/Waffo options and password-reset email options) shifting line numbers, not by structural differences. Applied the upstream diff verbatim: added constant/pkg/jsplugin imports, TaskPlugin registry init entries in InitOptionMap, TaskPublicAddress option registration, the two bool cases plus the disabled-factory-keys hook in updateOptionMap, and the TaskPublicAddress case. Assumes the new upstream packages (constant vars, pkg/jsplugin registry, setting/task_plugin.go keys, system_setting.TaskPublicAddress) will be added by other files in the same commit. (applied 6 targeted edits)
relay/channel/adapter.go high The downstream file matches upstream almost exactly; the only drift is the fork-added ArkVideoConverter interface after OpenAIVideoConverter, which caused the trailing hunk to fail. I applied all upstream changes verbatim (hosttypes import, DoResponse→ParseResponse comment and signature, TaskSubmitResponse struct, and the new TaskArtifact/content/usage-facts/validated-billing types), inserting the new types between OpenAIVideoConverter and the fork's ArkVideoConverter so the fork addition is preserved per conventions (our changes win). Note this rename will require downstream task adaptors (including doubao/astraflow) to implement ParseResponse instead of DoResponse — those call sites are outside this file. (applied 5 targeted edits)
relay/channel/api_request_test.go medium The patch failed only because of context drift: downstream added a fork-specific init() (gin.SetMode) between the imports and the first test, shifting line numbers. The change itself is additive: (1) add the "context" import, (2) insert TestNewTaskAPIRequestInheritsClientCancellation before the first existing test. Assumption: newTaskAPIRequest exists in the downstream relay/channel package with the upstream signature (c *gin.Context, url string, body) returning a request whose Context() reflects client cancellation — the downstream file is the same package and all other referenced helpers (processHeaderOverride, relaycommon, gin, require) are present, so only newTaskAPIRequest is unverified. If that helper was removed/renamed downstream as part of the task-adaptor drift, this test will fail to compile and needs a human check of api_request.go. (applied 2 targeted edits)
router/main.go medium The apply failed because downstream inserts a DEBUG-gated swagger mount between SetVideoRouter and the FRONTEND_BASE_URL block; that fork block is left untouched. I registered the new routers (SetTaskPluginProtocolRouter, SetTaskRouter, SetPluginRouter returning pluginDispatcher) in the same order/position as upstream, and passed pluginDispatcher to SetWebRouter and as the first NoRoute handler per upstream intent. One deliberate deviation: upstream's new code uses a middleware.RouteTag("web") handler helper, which may not exist downstream (downstream's current code sets c.Set(middleware.RouteTagKey, "web") inline, and the fork conventions document no such helper). I kept the inline c.Set inside the final NoRoute handler — behaviorally identical and compile-safe. Assumes SetPluginRouter/SetTaskRouter/SetTaskPluginProtocolRouter and the new 3-arg SetWebRouter signature come from other files in the same upstream commit that apply cleanly. (applied 2 targeted edits)
web/rsbuild.config.ts high Upstream added '/v1' to the dev-proxy prefix list (the new plugin/task-plugin routes live under /v1). The patch failed only because the fork previously added '/swagger' to the same array (ported swagger feature). Applied the same intent: inserted '/v1' immediately after '/api', preserving the fork's '/swagger' entry untouched. (applied 1 targeted edits)
web/src/features/channels/constants.ts medium Upstream adds Task Plugin as type 61, but 61 is already taken by New API in this fork due to the deliberate channel renumbering (AstraFlow=59, Sub2API=60, NewAPI=61) that fork conventions say must win. Following the fork's established remap pattern, Task Plugin is remapped to 62 with an explanatory comment matching the existing style ('must match backend constant.ChannelTypeTaskPlugin' — the backend resolution must likewise use 62). Display-order insertion mirrors upstream (after 58, next to New API/Advanced Custom). The channelTypeOptionsForTaskPluginBind helper is added verbatim except it references the remapped CHANNEL_TYPE_TASK_PLUGIN constant. Upstream's line-rewrapping of the display-order array was not replicated to keep the edit minimal. (applied 4 targeted edits)
web/src/features/system-settings/site/index.tsx high The upstream diff adds a new default key TaskPublicAddress: '' after ServerAddress: '' in defaultSiteSettings. The downstream file has the same object; only context drift (CubeRouter rebranding and different keys ordering) caused the apply failure. Inserted the new key in the identical position. No symbol renames or convention conflicts apply. (applied 1 targeted edits)
web/src/features/system-settings/types.ts high The upstream patch adds TaskPublicAddress: string to SiteSettings immediately after ServerAddress. The hunk failed only because the context lines after the insertion point differ downstream (upstream has HeaderNavModules right after the legal keys; the fork has general_setting.docs_link / admin_docs_link before HeaderNavModules). The insertion point itself is unchanged, so the same field is added at the same position. Anchored on HomePageContent/ServerAddress/legal.user_agreement because ServerAddress: string alone also appears in AuthSettings. (applied 1 targeted edits)
web/src/hooks/use-sidebar-data.ts high The patch failed because the downstream fork added extra import lines (Megaphone, Puzzle) and sidebar entries (Plugins, Campaigns, ops section) that shifted the upstream context. Applied the same intent: added PlugZap to the lucide-react imports (alphabetically before Puzzle) and inserted the 'Task Plugins' entry (SUPER_ADMIN-gated, per upstream) immediately after the System Info entry and before System Settings. The fork's existing 'Plugins' entry (Plugin Market at /plugins, Puzzle icon) is a separate original feature and is left untouched. (applied 2 targeted edits)
web/src/i18n/locales/_reports/_sync-report.json medium Upstream's intent is to delete this auto-generated i18n sync-report file (deleted file mode in the diff). The patch failed only because downstream's report content diverged (fork ships only en/zh/zh-TW locales, with non-zero missing/untranslated counts). Since the file is a generated artifact (bun run i18n:sync) and upstream removed it, the equivalent resolution is to empty the file's contents — the edit API cannot express a true file deletion, so this leaves a zero-byte file which the caller should treat as a deletion candidate. The fork-specific locale set (no fr/ru/ja/vi) is preserved implicitly since nothing is restored. (applied 1 targeted edits)
controller/relay.go high upstream diff applied directly via git apply
web/src/routes/__root.tsx high upstream diff applied directly via git apply
common/password_crypto.go high upstream diff applied directly via git apply
controller/user.go high upstream diff applied directly via git apply
main.go high upstream diff applied directly via git apply
model/main.go high upstream diff applied directly via git apply
model/password_crypto.go high upstream diff applied directly via git apply
router/api-router.go high upstream diff applied directly via git apply
web/src/features/auth/api.ts high upstream diff applied directly via git apply
web/src/features/auth/lib/password-encryption.ts high upstream diff applied directly via git apply
web/bun.lock high The apply failed because the downstream devDependencies block has fork-specific entries (@types/bun) that shifted the upstream context lines. The lockfile content is otherwise format-identical, so I applied the four upstream insertions verbatim: node-forge in workspace dependencies (after next-themes, alphabetical), @types/node-forge in workspace devDependencies (after @types/node, alphabetical), and the two pinned package entries (with their upstream integrity hashes) in the packages section, each anchored to their alphabetical neighbors that exist downstream. (applied 4 targeted edits)
web/package.json high The apply failed only due to context drift (fork adds @types/bun and font packages, shifting line numbers), not due to any semantic divergence. The fork conventions say nothing about dependency policy, so the upstream change is applied verbatim: added node-forge ^1.4.0 to dependencies (alphabetically between next-themes and qrcode.react, matching upstream ordering) and @types/node-forge ^1.3.14 to devDependencies (between @types/node and @types/react). The feature (RSA password transport encryption) is backend+frontend but this file only needs the two new packages. (applied 2 targeted edits)

⚠️ Conflicts

  • web/src/i18n/locales/fr.json (): Resolve call failed: Rate limited after 3 retries: Error code: 429 - {'error': {'code': 'rate_limit_exceeded', 'message': 'Concurrency limit exceeded for user, please retry later', 'type': 'rate_limit_error'}}
  • web/src/i18n/locales/ja.json (): resolve returned neither edits nor content
  • web/src/i18n/locales/ru.json (): resolve returned neither edits nor content
  • web/src/i18n/locales/vi.json (): resolve returned neither edits nor content
  • constant/channel.go (): Resolve call failed: Anthropic API error after 3 retries:
<title>504 Gateway Time-out</title>

504 Gateway Time-out

- **`controller/option.go`** (): Resolve call failed: Anthropic API error after 3 retries: <title>504 Gateway Time-out</title>

504 Gateway Time-out

- **`controller/video_proxy.go`** (func VideoProxy (entire function, lines ~30-190)): A human must decide whether to adopt the upstream JS task-plugin system at all. If yes, this file must be rewritten together with the rest of commit eb48396 (new packages pkg/jsplugin, relay/channel/task/jsplugin, model.TaskPlugin, the task-artifact helpers such as proxyTaskMedia/getTaskForArtifactRequest/projectTaskArtifacts/initTaskArtifactAdaptor, and removal of the hard-coded task adaptors). If no (recommended per conventions, since cuberouter keeps its per-channel Gemini/Vertex/Sora proxy logic, GetByUpstreamTaskId fallback, and SSRF handling), skip the VideoProxy rewrite and keep only the applied Cache-Control header tweak. The upstream removal of the 'constant' import and per-channel auth (x-goog-api-key, Authorization Bearer) is incompatible with the downstream channel-type switch. - **`go.mod`** (): Resolve call failed: Rate limited after 3 retries: Error code: 429 - {'error': {'code': 'rate_limit_exceeded', 'message': 'Concurrency limit exceeded for user, please retry later', 'type': 'rate_limit_error'}} - **`go.sum`** (): Resolve call failed: Rate limited after 3 retries: Error code: 429 - {'error': {'code': 'rate_limit_exceeded', 'message': 'Concurrency limit exceeded for user, please retry later', 'type': 'rate_limit_error'}} - **`relay/channel/task/doubao/adaptor.go`** (): Resolve call failed: Anthropic API error after 3 retries: <title>504 Gateway Time-out</title>

504 Gateway Time-out

- **`relay/relay_adaptor.go`** (): Resolve call failed: Anthropic API error after 3 retries: <title>504 Gateway Time-out</title>

504 Gateway Time-out

- **`router/video-router.go`** (): Resolve call failed: Anthropic API error after 3 retries: <title>504 Gateway Time-out</title>

504 Gateway Time-out

- **`web/src/i18n/locales/en.json`** (): LLM edits did not apply: edit 1: 'old' block not found in file: ' "{\\"original-model\\": \\"replacement-model\\"}": "{\\"original-model\\": \\"repla' - **`web/src/i18n/locales/fr.json`** (): resolve returned neither edits nor content - **`web/src/i18n/locales/ja.json`** (): resolve returned neither edits nor content - **`web/src/i18n/locales/ru.json`** (): resolve returned neither edits nor content - **`web/src/i18n/locales/vi.json`** (): resolve returned neither edits nor content - **`web/src/i18n/locales/zh-TW.json`** (): Resolve call failed: Anthropic API error after 3 retries: <title>504 Gateway Time-out</title>

504 Gateway Time-out

- **`web/src/i18n/locales/zh.json`** (): Resolve call failed: Anthropic API error after 3 retries: <title>504 Gateway Time-out</title>

504 Gateway Time-out

❌ Unresolved Build Failures

  • web/src/i18n/locales/fr.json: Resolve call failed: Rate limited after 3 retries: Error code: 429 - {'error': {'code': 'rate_limit_exceeded', 'message': 'Concurrency limit exceeded for user, please retry later', 'type': 'rate_limit_error'}} — Suggestion: Resolve manually — see the conflict summary in this PR.
  • web/src/i18n/locales/ja.json: resolve returned neither edits nor content — Suggestion: Resolve manually — see the conflict summary in this PR.
  • web/src/i18n/locales/ru.json: resolve returned neither edits nor content — Suggestion: Resolve manually — see the conflict summary in this PR.
  • web/src/i18n/locales/vi.json: resolve returned neither edits nor content — Suggestion: Resolve manually — see the conflict summary in this PR.
  • constant/channel.go: Resolve call failed: Anthropic API error after 3 retries:
<title>504 Gateway Time-out</title>

504 Gateway Time-out

— _Suggestion: Resolve manually — see the conflict summary in this PR._ - **`controller/option.go`**: Resolve call failed: Anthropic API error after 3 retries: <title>504 Gateway Time-out</title>

504 Gateway Time-out

— _Suggestion: Resolve manually — see the conflict summary in this PR._ - **`controller/video_proxy.go`**: A human must decide whether to adopt the upstream JS task-plugin system at all. If yes, this file must be rewritten together with the rest of commit eb48396 (new packages pkg/jsplugin, relay/channel/task/jsplugin, model.TaskPlugin, the task-artifact helpers such as proxyTaskMedia/getTaskForArtifactRequest/projectTaskArtifacts/initTaskArtifactAdaptor, and removal of the hard-coded task adaptors). If no (recommended per conventions, since cuberouter keeps its per-channel Gemini/Vertex/Sora proxy logic, GetByUpstreamTaskId fallback, and SSRF handling), skip the VideoProxy rewrite and keep only the applied Cache-Control header tweak. The upstream removal of the 'constant' import and per-channel auth (x-goog-api-key, Authorization Bearer) is incompatible with the downstream channel-type switch. — _Suggestion: Resolve manually — see the conflict summary in this PR._ - **`go.mod`**: Resolve call failed: Rate limited after 3 retries: Error code: 429 - {'error': {'code': 'rate_limit_exceeded', 'message': 'Concurrency limit exceeded for user, please retry later', 'type': 'rate_limit_error'}} — _Suggestion: Resolve manually — see the conflict summary in this PR._ - **`go.sum`**: Resolve call failed: Rate limited after 3 retries: Error code: 429 - {'error': {'code': 'rate_limit_exceeded', 'message': 'Concurrency limit exceeded for user, please retry later', 'type': 'rate_limit_error'}} — _Suggestion: Resolve manually — see the conflict summary in this PR._ - **`relay/channel/task/doubao/adaptor.go`**: Resolve call failed: Anthropic API error after 3 retries: <title>504 Gateway Time-out</title>

504 Gateway Time-out

— _Suggestion: Resolve manually — see the conflict summary in this PR._ - **`relay/relay_adaptor.go`**: Resolve call failed: Anthropic API error after 3 retries: <title>504 Gateway Time-out</title>

504 Gateway Time-out

— _Suggestion: Resolve manually — see the conflict summary in this PR._ - **`router/video-router.go`**: Resolve call failed: Anthropic API error after 3 retries: <title>504 Gateway Time-out</title>

504 Gateway Time-out

— _Suggestion: Resolve manually — see the conflict summary in this PR._ - **`web/src/i18n/locales/en.json`**: LLM edits did not apply: edit 1: 'old' block not found in file: ' "{\\"original-model\\": \\"replacement-model\\"}": "{\\"original-model\\": \\"repla' — _Suggestion: Resolve manually — see the conflict summary in this PR._ - **`web/src/i18n/locales/fr.json`**: resolve returned neither edits nor content — _Suggestion: Resolve manually — see the conflict summary in this PR._ - **`web/src/i18n/locales/ja.json`**: resolve returned neither edits nor content — _Suggestion: Resolve manually — see the conflict summary in this PR._ - **`web/src/i18n/locales/ru.json`**: resolve returned neither edits nor content — _Suggestion: Resolve manually — see the conflict summary in this PR._ - **`web/src/i18n/locales/vi.json`**: resolve returned neither edits nor content — _Suggestion: Resolve manually — see the conflict summary in this PR._ - **`web/src/i18n/locales/zh-TW.json`**: Resolve call failed: Anthropic API error after 3 retries: <title>504 Gateway Time-out</title>

504 Gateway Time-out

— _Suggestion: Resolve manually — see the conflict summary in this PR._ - **`web/src/i18n/locales/zh.json`**: Resolve call failed: Anthropic API error after 3 retries: <title>504 Gateway Time-out</title>

504 Gateway Time-out

— _Suggestion: Resolve manually — see the conflict summary in this PR._

🤖 Created by upstream-semantic-sync

…e for the Zhipu GLM channel by adding its endpoint URL and passing the request through instead of returning not-implemented

Upstream-commit: cae3676
…ly issue and PR templates, and remove the PR Check CI workflow

Upstream-commit: e468b73
…iders (e.g. LinuxDo) in the user-binding dialog by aligning the admin binding provider types, backed by new tests.

Upstream-commit: 692e8d6
…ays evaluating to true, causing multipliers to apply all day instead of only within the configured time windows; adds validation, tests, and i18n strings for the corrected behavior.

Upstream-commit: ac381ac
… submodule's go.mod to the build context so `go mod download` can resolve the module graph (relaykit is referenced via a replace directive).

Upstream-commit: 7037ac1
…, gemini, hailuo, jimeng, kling, sora, suno, vertex, vidu) with a sandboxed JavaScript plugin system: a sobek-based JS engine and registry, a generic jsplugin relay adaptor, a plugin protocol/host API (v1 docs + schema), admin plugin management and marketplace UI, plus supporting channel constraints, task artifacts, and usage-based billing expressions.

Upstream-commit: eb48396
…lay request parameter validation fails, instead of a generic error without an explicit status code

Upstream-commit: 0f2a207
…heck so setup completion is re-validated against the current server instance on every page reload, while still skipping redundant checks within the same page session

Upstream-commit: 98d50d5
…n: server generates/persists a keypair, exposes the public key via a new API route, the web client encrypts passwords before submission, and the login controller decrypts them server-side.

Upstream-commit: b80d633
@coderabbitai

coderabbitai Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Ignore keyword(s) in the title.

⛔ Ignored keywords (1)
  • sync(upstream)

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 8356e14e-8224-4e2c-8c59-b758988adf0a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

Chunlin Yang added 2 commits September 1, 2026 16:13
Reconciles the fork-specific code the sync's automated conflict resolution
dropped, restoring a clean build and passing test suite.

- router: stop re-registering /v1/videos* in SetVideoRouter so the openai_video
  host protocol owns them (was a gin startup duplicate-route panic); keep
  TokenOrUserAuth on the content route to preserve dashboard session auth;
  update plugin route test for the new task-plugin admin routes
- controller: restore upstream task-media proxy helpers (task_media_proxy.go)
  and the fork's Gemini/Vertex video proxy (video_proxy_gemini.go); upgrade
  writeVideoDataURL to upstream behavior (HEAD support, oversized-payload
  rejection, streaming, security headers) expected by the synced tests
- constant: restore ChannelTypeTaskPlugin=62 (fork numbering shifted by the
  added AstraFlow=59) and TaskActionGenerate/TextGenerate; update the channel
  bind tests' hardcoded 61 to 62
- relay: migrate doubao/astraflow adaptors to ParseResponse and keep the fork's
  Go adaptors alongside the adopted JS plugin system
- middleware: restore Kling/Jimeng request-convert middleware used by the
  fork's video router
- web: narrow fetchImpl param type so test stubs satisfy the newer DOM lib

Verified: go build ./..., go test ./... (45 packages, 0 failures), go vet,
relaykit builds with GOWORK=off, web typecheck and rsbuild build.
The backend job's `make test` runs `go test -race -count=1` and was failing
in two places:

1. Data race on the process-global Redis state. Quota/cache functions
   (DecreaseUserQuota, IncreaseUserQuota, token quota, ...) fire cache
   updates through gopool.Go workers that read common.RedisEnabled /
   common.RDB; tests toggle those globals and could race an in-flight worker
   read. Add a WaitGroup flush barrier in model: the one-shot quota/cache
   spawn sites now register through goQuotaCacheUpdate, and tests call
   WaitForQuotaCacheWorkers() before mutating the globals (model package,
   plus the new task-plugin e2e / task-generic controller tests). Perpetual
   background loops (InitBatchUpdater, notify-limit cleanup) are not
   registered, so the flush cannot hang.

2. Flaky TestTaskAdaptorReDecodesFinalCandidateAndRejectsModelDrift. The JS
   decoder used a module-level `let calls` counter, which is per-sobek-runtime
   and lost when the engine's runtime pool is recycled between calls, so the
   re-decode could return the pinned model instead of a drifted one. The
   decoder now derives the model from the request body and the test injects
   drift by mutating the body between the pinning decode and the re-decode,
   making the rejection deterministic.
@mergify
mergify Bot merged commit 4731439 into main Sep 1, 2026
6 checks passed
@mergify
mergify Bot deleted the sync/upstream-cae3676ec6f4-b80d633cf586 branch September 1, 2026 10:15
@mergify

mergify Bot commented Sep 1, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

mergify Bot pushed a commit that referenced this pull request Oct 26, 2026
Fixes Dependabot alert #63 (GHSA-cg2g-xh64-v4q7, critical):
DOMPurify SAFE_FOR_TEMPLATES bypass via split template expressions
in attached shadow root content. Affected >=3.4.4, <=3.4.16.

Bump both the direct dependency and the overrides pin so mermaid's
transitive dompurify is upgraded as well.

Co-authored-by: Wei Liu <[email protected]>
Co-authored-by: Claude Code <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants