feat: kling2.6 支持有声视频生成 - #2921
Conversation
…etchModels fix: remove Minimax from FETCHABLE channels
…tchModels fix(gemini): fetch model list via native v1beta/models endpoint
* feat: /v1/chat/completion -> /v1/response
…-auto-disable feat: status code auto-disable configuration
* fix: setting ui * fix: rm global.chat_completions_to_responses_policy * fix: rm global.chat_completions_to_responses_policy
…Names fix: clean propertyNames for gemini function
…t-param-override feat: channel testing supports parameter overriding
* feat: codex channel * feat: codex channel * feat: codex oauth flow * feat: codex refresh cred * feat: codex usage * fix: codex err message detail * fix: codex setting ui * feat: codex refresh cred task * fix: import err * fix: codex store must be false * fix: chat -> responses tool call * fix: chat -> responses tool call
…sing Claude's rendering logs, the two approaches handle input rendering differently.
common.GetRequestBody(c) read bod is null
…turned an index of 0
…062b85a4ee06a0b324ba9ec91f6
…fo-input-token fix: 使用openai兼容接口调用部分渠道在最终端点为claude原生端点下还是走了openai扣减input_token的逻辑
fix: 补全 streaming message_delta 事件缺失的 input_tokens 和 cache 相关字段
…sponses feat: /v1/messages -> /v1/responses
…ion-configurable feat: make 5m cache-creation ratio configurable
fix: 如果模型管理有自定义配置则不合并默认配置
fix: 修复模型管理"参与官方同步"与"状态"开关无法保存的问题
…inity-tips optimize: channel affinity tips
Replace icon-based language options with plain text labels in both the header dropdown and preferences settings to keep the UI clean and avoid potential controversies. Remove unused country-flag-icons dependency.
Bumps [axios](https://github.com/axios/axios) from 1.12.0 to 1.13.5. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](axios/axios@v1.12.0...v1.13.5) --- updated-dependencies: - dependency-name: axios dependency-version: 1.13.5 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
…nd_yarn/web/axios-1.13.5 chore(deps): bump axios from 1.12.0 to 1.13.5 in /web
* feat(localization): added zh_TW * fixed based on @coderabbitai * updated false translation for zh_TW * new workflow * revert * fixed a lot of translations * turned most zh to zh-CN * fallbacklang * bruh * eliminate ALL _ * fix: paths and other miscs thanks @Calcium-Ion * fixed translation and temp fix for preferencessettings.js * fixed translation error * fixed issue about legacy support * reverted stupid coderabbit's suggestion
* feat: logs cache field * feat: logs cache field * feat: logs cache field
# Conflicts: # README.fr.md # README.ja.md # README.md # README.zh_CN.md
WalkthroughThe Kling adaptor is enhanced to support new Kling v2.6+ features. A new WatermarkInfo struct is introduced alongside a Sound field in the request payload. The GetModelList method is updated to include additional Kling model variants (v2-1-master, v2-5-turbo, v2-6) beyond the existing ones. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. 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 |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
relay/channel/task/kling/adaptor.go (2)
5-5: 🛠️ Refactor suggestion | 🟠 MajorDirect
encoding/jsonimport violates coding guidelines.This file imports
encoding/jsonand usesjson.Marshal/json.Unmarshaldirectly in multiple places (lines 165, 189, 276, 280, 349, 383) instead of the required wrapper functions. Line 410 already correctly usescommon.Marshal. The new fields introduced in this PR (Sound,WatermarkInfo) are serialized through these non-compliant calls.Suggested fix
Replace all direct
json.Marshal/json.Unmarshalcalls withcommon.Marshal/common.Unmarshal, and remove theencoding/jsonimport (keeping only type references likejson.RawMessageif needed — though none appear used here).- "encoding/json"- data, err := json.Marshal(body) + data, err := common.Marshal(body)- err = json.Unmarshal(responseBody, &kResp) + err = common.Unmarshal(responseBody, &kResp)- medaBytes, err := json.Marshal(metadata) + medaBytes, err := common.Marshal(metadata)- err = json.Unmarshal(medaBytes, &r) + err = common.Unmarshal(medaBytes, &r)- err := json.Unmarshal(respBody, &resPayload) + err := common.Unmarshal(respBody, &resPayload)- if err := json.Unmarshal(originTask.Data, &klingResp); err != nil { + if err := common.Unmarshal(originTask.Data, &klingResp); err != nil {As per coding guidelines, "All JSON marshal/unmarshal operations MUST use the wrapper functions in
common/json.go:common.Marshal(),common.Unmarshal()... Do NOT directly import or callencoding/jsonin business code."
256-284:⚠️ Potential issue | 🔴 CriticalReplace direct
json.Marshal/json.Unmarshalcalls withcommon.Marshalandcommon.Unmarshalwrappers.Lines 276 and 280 use
json.Marshal()andjson.Unmarshal()directly. Per coding guidelines, all JSON operations must use the wrapper functions fromcommon/json.go:common.Marshal()andcommon.Unmarshal(). Apply this fix to all JSON operations in this file.The metadata unmarshal pattern for
SoundandWatermarkInfois correct — these fields are intentionally populated via the metadata pass-through mechanism, which is consistent withTaskSubmitReq.Metadatabeingmap[string]interface{}.
https://app.klingai.com/cn/dev/document-api/apiReference/model/textToVideo

sound=on
mode=pro
Summary by CodeRabbit