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
Unverified
Commit
d6982c81
authored
Mar 23, 2026
by
Calcium-Ion
Committed by
GitHub
Mar 23, 2026
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3379 from seefs001/refactor/rm-coding-plan
fix: disable doubao coding plan selection
parents
deff59a5
6c074ef8
Show 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 @
d6982c81
...
@@ -124,6 +124,8 @@ const PARAM_OVERRIDE_OPERATIONS_TEMPLATE = {
...
@@ -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
([
const
MODEL_FETCHABLE_TYPES
=
new
Set
([
1
,
4
,
14
,
34
,
17
,
26
,
27
,
24
,
47
,
25
,
20
,
23
,
31
,
40
,
42
,
48
,
43
,
1
,
4
,
14
,
34
,
17
,
26
,
27
,
24
,
47
,
25
,
20
,
23
,
31
,
40
,
42
,
48
,
43
,
...
@@ -413,9 +415,21 @@ const EditChannelModal = (props) => {
...
@@ -413,9 +415,21 @@ const EditChannelModal = (props) => {
];
];
const
formContainerRef
=
useRef
(
null
);
const
formContainerRef
=
useRef
(
null
);
const
doubaoApiClickCountRef
=
useRef
(
0
);
const
doubaoApiClickCountRef
=
useRef
(
0
);
const
initialBaseUrlRef
=
useRef
(
''
);
const
initialModelsRef
=
useRef
([]);
const
initialModelsRef
=
useRef
([]);
const
initialModelMappingRef
=
useRef
(
''
);
const
initialModelMappingRef
=
useRef
(
''
);
const
initialStatusCodeMappingRef
=
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状态更新辅助函数
// 2FA状态更新辅助函数
const
updateTwoFAState
=
(
updates
)
=>
{
const
updateTwoFAState
=
(
updates
)
=>
{
...
@@ -946,6 +960,7 @@ const EditChannelModal = (props) => {
...
@@ -946,6 +960,7 @@ const EditChannelModal = (props) => {
data
.
base_url
=
'https://ark.cn-beijing.volces.com'
;
data
.
base_url
=
'https://ark.cn-beijing.volces.com'
;
}
}
initialBaseUrlRef
.
current
=
data
.
base_url
||
''
;
setInputs
(
data
);
setInputs
(
data
);
if
(
formApiRef
.
current
)
{
if
(
formApiRef
.
current
)
{
formApiRef
.
current
.
setValues
(
data
);
formApiRef
.
current
.
setValues
(
data
);
...
@@ -1260,6 +1275,7 @@ const EditChannelModal = (props) => {
...
@@ -1260,6 +1275,7 @@ const EditChannelModal = (props) => {
fetchModels
().
then
();
fetchModels
().
then
();
fetchGroups
().
then
();
fetchGroups
().
then
();
if
(
!
isEdit
)
{
if
(
!
isEdit
)
{
initialBaseUrlRef
.
current
=
''
;
setInputs
(
originInputs
);
setInputs
(
originInputs
);
if
(
formApiRef
.
current
)
{
if
(
formApiRef
.
current
)
{
formApiRef
.
current
.
setValues
(
originInputs
);
formApiRef
.
current
.
setValues
(
originInputs
);
...
@@ -3062,8 +3078,9 @@ const EditChannelModal = (props) => {
...
@@ -3062,8 +3078,9 @@ const EditChannelModal = (props) => {
'https://ark.ap-southeast.bytepluses.com'
,
'https://ark.ap-southeast.bytepluses.com'
,
},
},
{
{
value
:
'doubao-coding-plan'
,
value
:
DEPRECATED_DOUBAO_CODING_PLAN_BASE_URL
,
label
:
'Doubao Coding Plan'
,
label
:
doubaoCodingPlanOptionLabel
,
disabled
:
!
canKeepDeprecatedDoubaoCodingPlan
,
},
},
]
}
]
}
defaultValue=
'https://ark.cn-beijing.volces.com'
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