Repository navigation
sync(upstream): 8 commits from upstream - #69
Conversation
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
6db68a9 to
fde829a
Compare
…y normalization, Claude cache-creation field sync, usage-merge clamping/estimated-flag handling) plus completion of conversion paths: Claude channel now serves Gemini-format requests, legacy pseudo tool names are decoded, upstream Gemini usage rides the billing_usage sidecar, and per-request stream conversion state moves from gin.Context onto RelayInfo so retries reset cleanly. Upstream-commit: bbd9744
…iluo task plugin with in-builder request validation, and fix query hooks to receive ctx.model/ctx.upstreamModel from persisted task properties during polling Upstream-commit: aece11d
…or the project owner use the standard human PR templates instead of the agent-specific PR body file. Upstream-commit: d8ca0ed
…ests also report input media consumption (reference images and input video seconds) in addition to output duration/resolution. Upstream-commit: 73afad5
…art and public content endpoints by adding weak-ETag/304 revalidation to public JSON responses and client-side session-hint caching Upstream-commit: 219c9e0
…user-visibility branch and mutating normalizeLegacyAdminFields, centralizing legacy sensitive-key filtering in one shared list, and returning original JSON when nothing was stripped (preserving large-integer lexemes); also logs rejected OtherRatios keys instead of silently dropping them. Upstream-commit: 9f506dd
…QueryContext, classify upstream HTTP statuses in the host before invoking plugins, and fail/refund tasks after a bounded count of consecutive poll failures instead of letting unrecognized or error responses sit IN_PROGRESS until the 24h timeout. Upstream-commit: 9df450f
…tent (seeded with the Go module path) into weak ETags, so ETag values stay stable regardless of which JSON serialization package renders the response. Upstream-commit: 36dbbf0
…riggering git tag (GITHUB_REF) instead of relying solely on `git describe --tags`, with a `v[0-9]*`-matched describe fallback for non-tag runs. Upstream-commit: 8f5ab8e
e986236 to
f6a4c15
Compare
…ling contract
The sync landed the ported channel.TaskAdaptor interface and host call sites
(relay/relay_task.go) but left the implementations and legacy polling paths on
the old map[string]any contract, so vet/build failed on the
DoTaskApiRequest interface assertions:
- astraflow/doubao: FetchTask/ParseTaskResult now take the persisted task row
(task.GetUpstreamTaskID()) instead of the fetch body map; tests updated.
- jsplugin: rebuild query hooks on a persisted TaskQueryContext (no requestBody,
model identities/data/plugin state from the task row, key override from
PrivateData.Key), batch queries pass task objects, parse hooks receive the
HTTP {status,headers} response, and returned plugin state is persisted via
encodeReturnedPluginState (including submit responses).
- service/task_polling.go: classify upstream HTTP statuses before invoking
parse hooks (classifyPollHTTP), track PollFailures and fail/refund tasks
after constant.TaskPollMaxFailures consecutive failures, treat UNKNOWN as a
terminal escape hatch instead of erroring, and persist PluginState from
poll results; drop the legacy empty-status/429 error branch.
- controller/video_proxy_gemini.go: call the migrated FetchTask/ParseTaskResult.
- task_billing_test.go: drop the LogOther-era .Snapshot() call so the map-based
taskBillingOther result is asserted directly.
Bring in main's post-merge-base changes so the PR is mergeable: - #84: tool_use-id normalization (normalizeToolUseIDsPayload + ToolUseToken on stream and non-stream Claude response paths), resolved against the sync's Claude/Gemini conversion rework by keeping the new Gemini-format case and applying the normalization to the Claude-format case. - #85: verification codes stored in the shared Redis. Also picks up their relaykit/convmeta and controller changes. Build, vet, and the full make test suite pass on the merged tree.
|
Tick the box to add this pull request to the merge queue (same as
|
Upstream Sync: 8 Commits
Upstream Commits
bbd97446c260aece11d2f7f0d8ca0ed0bb59057f71c2336cothermap with a typedmodel.LogOtherstruct that isolates sensitive fields from user-facing serialization, updating all generators, call sites, and the web log-details view.219c9e06341f9f506dd7f9059df450fe54e18f5ab8e4048agit describe --tags, with a v*-tag-matched fallback for non-tag builds.Affected Surfaces
Adaptor.ConvertGeminiRequestChannelMeta.SendResponseCount/InitChannelMetaFormatAdminLogsFrontend session-hint mechanism for anonymous vs authenticated bootstrapJS plugin query hook context (ctx.model / ctx.upstreamModel now populated for polling and realtime fetch, with upstreamModel fallback to origin name)Log 'other' JSON wire shape consumed by web usage-logs details dialogLog.Other wire representationLogOther.JSONStringLogOther.MarshalJSONLogOther.SetPublicLogOther.SnapshotNormalizedTaskResult status enum (new "UNKNOWN" value, IN_PROGRESS fallback forbidden)RelayInfo stream conversion stateStale route-session revalidation behaviorTASK_POLL_MAX_FAILURES env config key / constant.TaskPollMaxFailures (default 20)TaskPollingAdaptor.FetchTask / BatchTaskPollingAdaptor interface signatures (now take *model.Task and *http.Response)TaskPrivateData.PluginState (new persisted per-plugin state field)TaskPrivateData.PollFailures (new consecutive poll failure counter)TaskQueryContext (plugin API type, query-side requestBody removed)Weak ETag / If-None-Match revalidation on public JSON endpoints (GetNotice, GetAbout, GetUserAgreement, GetPrivacyPolicy, GetHomePageContent)docs/plugin-api v1.d.ts / v1.md / v1.schema.json contracthailuo plugin upstream contract (MiniMax-H3 /v2/video_generation and /v2/query/video_generation/{task_id})hailuo request validation bounds (duration 4-15, resolution 768P/2K, ratio whitelist, frame/reference image-video-audio caps)legacy Gemini pseudo tool name recognition (googleSearch, codeExecution, urlContext)model.LogOther (new exported type replacing map[string]interface{} for log 'other' metadata)model.LogOther.Snapshot()parseTaskResult / parseBatchResult hook signature (new third {status, headers} argument)plugin lint rule warning on|| "IN_PROGRESS"literalplugin metadata passthrough fields (metadata.callback_url, metadata.aigc_watermark, metadata.content)service.GenerateTextOtherInfo (return type changed to *model.LogOther)task usage facts (duration, resolution reported as facts; no billing ratios)usage/billing_usage merge semantics (Estimated flag OR-ing, modality key normalization)Transformations Applied
relay/channel/claude/adaptor.gorelay/channel/claude/adaptor_test.gorelay/channel/claude/relay-claude.gorelay/channel/gemini/relay-gemini.gorelay/channel/openai/helper.gorelay/common/relay_info.gorelay/common/relay_info_test.gorelaykit/dto/billing_usage.gorelaykit/dto/billing_usage_test.gorelaykit/dto/usage_merge.gorelaykit/dto/usage_merge_test.gorelaykit/relayconvert/internal/gemini_chat/to_oai_chat_resp.gorelaykit/relayconvert/internal/oai_chat/to_claude_messages_resp.gorelaykit/relayconvert/internal/oai_chat/to_claude_messages_resp_test.gorelaykit/relayconvert/internal/oai_chat/to_gemini_chat_req.gorelaykit/relayconvert/internal/toolconv/decode.gorelaykit/relayconvert/internal/toolconv/encode.godocs/plugin-api/v1.mdplugins/hailuo_responses_test.goplugins/tasks/hailuo/plugin.jsrelay/channel/task/jsplugin/adaptor.gorelay/channel/task/jsplugin/adaptor_test.gorelay/relay_task.goservice/task_polling.goAGENTS.md.gitignorecontroller/channel-test.gocontroller/channel_test_internal_test.gocontroller/log.gocontroller/relay.gocontroller/relay_error_log_test.gomodel/log.gomodel/log_format_test.gomodel/log_other.gomodel/log_other_test.gorelay/convert_request_error_test.goservice/billing_usage.goservice/channel_affinity.goservice/midjourney.goservice/quota_saturation_test.goservice/task_billing.goservice/task_billing_test.goservice/task_plugin_audit.goservice/text_quota.goservice/text_quota_test.goservice/violation_fee.goweb/src/features/usage-logs/components/__tests__/reject-reason.test.tsxweb/src/features/usage-logs/components/dialogs/details-dialog.tsxweb/src/features/usage-logs/types.tscontroller/misc.gocontroller/revalidated_response.godocs/authentication.mdservice/auth_session.goweb/src/features/about/api.tsweb/src/features/home/api.tsweb/src/features/legal/api.tsweb/src/lib/api.tsweb/src/lib/auth-session.tsweb/src/lib/session-hint.tsweb/src/routes/(auth)/sign-in.tsxweb/src/routes/_authenticated/route.tsxmodel/log_format_test.gomodel/log_other.gomodel/log_other_test.goservice/task_billing.goservice/task_billing_test.goservice/text_quota_test.go.env.examplecommon/init.goconstant/env.gocontroller/plugin_protocol_test.gocontroller/relay.gocontroller/task_plugin_test.godocs/plugin-api/v1.d.tsdocs/plugin-api/v1.mddocs/plugin-api/v1.schema.jsonmodel/log_other.gomodel/task.gomodel/task_cas_test.gopkg/jsplugin/cli.gopkg/jsplugin/cli_test.goplugins/jimeng_responses_test.goplugins/tasks/alibaba/plugin.jsplugins/tasks/doubao/plugin.jsplugins/tasks/google/plugin.jsplugins/tasks/jimeng/plugin.jsplugins/tasks/kling/plugin.jsplugins/tasks/sora/plugin.jsplugins/tasks/sunoapi/plugin.jsplugins/tasks/vertex-ai/plugin.jsplugins/veo_poll_test.gorelay/channel/adapter.gorelay/channel/task/jsplugin/adaptor_test.gorelay/common/relay_info.gorelay/relay_task.goservice/task_billing_test.goservice/task_plugin_view_test.goservice/task_polling_test.goplugins/tasks/hailuo/plugin.jsplugins/tasks/vidu/plugin.js.github/workflows/release.yml
<title>504 Gateway Time-out</title>relay/channel/gemini/relay_gemini_usage_test.go(): 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'}}service/log_info_generate.go(): Resolve call failed: Anthropic API error after 3 retries:504 Gateway Time-out
- **`plugins/hailuo_responses_test.go`** (): 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/jsplugin/adaptor.go`** (): 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'}} - **`service/task_polling.go`** (): 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'}}❌ Unresolved Build Failures
<title>504 Gateway Time-out</title>relay/channel/gemini/relay_gemini_usage_test.go: 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.service/log_info_generate.go: Resolve call failed: Anthropic API error after 3 retries:504 Gateway Time-out
— _Suggestion: Resolve manually — see the conflict summary in this PR._ - **`plugins/hailuo_responses_test.go`**: 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/jsplugin/adaptor.go`**: 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._ - **`service/task_polling.go`**: 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._🤖 Created by upstream-semantic-sync