mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-29 09:37:37 +08:00
Update Longcat presets to LongCat-2.0 (#4838)
* Update Longcat presets to LongCat-2.0 * fix(proxy): classify LongCat-2.0 as text-only for media sanitizer The Longcat presets now use LongCat-2.0, but the known_text_only_model allowlist still only matched the retired longcat-flash-chat tail. Without this, images pasted into a text-only LongCat-2.0 session are forwarded upstream instead of being replaced with the unsupported-image marker, causing a hard rejection. Add longcat-2.0 (keeping the retired name for saved configs) and a regression test. --------- Co-authored-by: chengzifeng <chengzifeng@meituan.com> Co-authored-by: Jason <farion1231@gmail.com>
This commit is contained in:
@@ -1054,12 +1054,15 @@ export const opencodeProviderPresets: OpenCodeProviderPreset[] = [
|
||||
npm: "@ai-sdk/openai-compatible",
|
||||
name: "Longcat",
|
||||
options: {
|
||||
baseURL: "https://api.longcat.chat/v1",
|
||||
baseURL: "https://api.longcat.chat/openai/v1",
|
||||
apiKey: "",
|
||||
setCacheKey: true,
|
||||
},
|
||||
models: {
|
||||
"LongCat-Flash-Chat": { name: "LongCat Flash Chat" },
|
||||
"LongCat-2.0": {
|
||||
name: "LongCat 2.0",
|
||||
options: { thinking: { type: "disabled" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
category: "cn_official",
|
||||
@@ -1068,8 +1071,8 @@ export const opencodeProviderPresets: OpenCodeProviderPreset[] = [
|
||||
templateValues: {
|
||||
baseURL: {
|
||||
label: "Base URL",
|
||||
placeholder: "https://api.longcat.chat/v1",
|
||||
defaultValue: "https://api.longcat.chat/v1",
|
||||
placeholder: "https://api.longcat.chat/openai/v1",
|
||||
defaultValue: "https://api.longcat.chat/openai/v1",
|
||||
editorValue: "",
|
||||
},
|
||||
apiKey: {
|
||||
|
||||
Reference in New Issue
Block a user