Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6c074ef8
authored
Mar 22, 2026
by
Seefs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: disable doubao coding plan selection
parent
deff59a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
web/src/components/table/channels/modals/EditChannelModal.jsx
+19
-2
No files found.
web/src/components/table/channels/modals/EditChannelModal.jsx
View file @
6c074ef8
...
...
@@ -124,6 +124,8 @@ const PARAM_OVERRIDE_OPERATIONS_TEMPLATE = {
],
};
const
DEPRECATED_DOUBAO_CODING_PLAN_BASE_URL
=
'doubao-coding-plan'
;
// 支持并且已适配通过接口获取模型列表的渠道类型
const
MODEL_FETCHABLE_TYPES
=
new
Set
([
1
,
4
,
14
,
34
,
17
,
26
,
27
,
24
,
47
,
25
,
20
,
23
,
31
,
40
,
42
,
48
,
43
,
...
...
@@ -413,9 +415,21 @@ const EditChannelModal = (props) => {
];
const
formContainerRef
=
useRef
(
null
);
const
doubaoApiClickCountRef
=
useRef
(
0
);
const
initialBaseUrlRef
=
useRef
(
''
);
const
initialModelsRef
=
useRef
([]);
const
initialModelMappingRef
=
useRef
(
''
);
const
initialStatusCodeMappingRef
=
useRef
(
''
);
const
doubaoCodingPlanDeprecationMessage
=
'Doubao Coding Plan 不再允许新增。根据火山方舟文档,Coding 套餐额度仅适用于 AI Coding 产品内调用,不适用于单独 API 调用;在非 AI Coding 产品中使用对应的 Base URL 和 API Key 可能被视为违规,并可能导致订阅停用或账号封禁。'
;
const
canKeepDeprecatedDoubaoCodingPlan
=
initialBaseUrlRef
.
current
===
DEPRECATED_DOUBAO_CODING_PLAN_BASE_URL
;
const
doubaoCodingPlanOptionLabel
=
(
<
Tooltip
content=
{
doubaoCodingPlanDeprecationMessage
}
position=
'left'
>
<
span
className=
'inline-flex items-center gap-2'
>
<
span
>
Doubao Coding Plan
</
span
>
</
span
>
</
Tooltip
>
);
// 2FA状态更新辅助函数
const
updateTwoFAState
=
(
updates
)
=>
{
...
...
@@ -946,6 +960,7 @@ const EditChannelModal = (props) => {
data
.
base_url
=
'https://ark.cn-beijing.volces.com'
;
}
initialBaseUrlRef
.
current
=
data
.
base_url
||
''
;
setInputs
(
data
);
if
(
formApiRef
.
current
)
{
formApiRef
.
current
.
setValues
(
data
);
...
...
@@ -1260,6 +1275,7 @@ const EditChannelModal = (props) => {
fetchModels
().
then
();
fetchGroups
().
then
();
if
(
!
isEdit
)
{
initialBaseUrlRef
.
current
=
''
;
setInputs
(
originInputs
);
if
(
formApiRef
.
current
)
{
formApiRef
.
current
.
setValues
(
originInputs
);
...
...
@@ -3062,8 +3078,9 @@ const EditChannelModal = (props) => {
'https://ark.ap-southeast.bytepluses.com'
,
},
{
value
:
'doubao-coding-plan'
,
label
:
'Doubao Coding Plan'
,
value
:
DEPRECATED_DOUBAO_CODING_PLAN_BASE_URL
,
label
:
doubaoCodingPlanOptionLabel
,
disabled
:
!
canKeepDeprecatedDoubaoCodingPlan
,
},
]
}
defaultValue=
'https://ark.cn-beijing.volces.com'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment