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
4ae34175
authored
Jul 04, 2026
by
Seefs
Committed by
GitHub
Jul 04, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(channels): show field passthrough controls for Codex (#5902)
parent
bed4a3f9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
9 deletions
+15
-9
web/classic/src/components/table/channels/modals/EditChannelModal.jsx
+7
-3
web/default/src/features/channels/components/drawers/channel-mutate-drawer.tsx
+6
-4
web/default/src/features/channels/lib/channel-form.ts
+2
-2
No files found.
web/classic/src/components/table/channels/modals/EditChannelModal.jsx
View file @
4ae34175
...
@@ -1779,10 +1779,14 @@ const EditChannelModal = (props) => {
...
@@ -1779,10 +1779,14 @@ const EditChannelModal = (props) => {
}
}
// type === 1 (OpenAI) 或 type === 14 (Claude): 设置字段透传控制(显式保存布尔值)
// type === 1 (OpenAI) 或 type === 14 (Claude): 设置字段透传控制(显式保存布尔值)
if
(
localInputs
.
type
===
1
||
localInputs
.
type
===
14
)
{
if
(
localInputs
.
type
===
1
||
localInputs
.
type
===
14
||
localInputs
.
type
===
57
)
{
settings
.
allow_service_tier
=
localInputs
.
allow_service_tier
===
true
;
settings
.
allow_service_tier
=
localInputs
.
allow_service_tier
===
true
;
// 仅 OpenAI 渠道需要 store / safety_identifier / include_obfuscation
// 仅 OpenAI 渠道需要 store / safety_identifier / include_obfuscation
if
(
localInputs
.
type
===
1
)
{
if
(
localInputs
.
type
===
1
||
localInputs
.
type
===
57
)
{
settings
.
disable_store
=
localInputs
.
disable_store
===
true
;
settings
.
disable_store
=
localInputs
.
disable_store
===
true
;
settings
.
allow_safety_identifier
=
settings
.
allow_safety_identifier
=
localInputs
.
allow_safety_identifier
===
true
;
localInputs
.
allow_safety_identifier
===
true
;
...
@@ -2478,7 +2482,7 @@ const EditChannelModal = (props) => {
...
@@ -2478,7 +2482,7 @@ const EditChannelModal = (props) => {
</
Col
>
</
Col
>
</
Row
>
</
Row
>
{
inputs
.
type
===
1
&&
(
{
(
inputs
.
type
===
1
||
inputs
.
type
===
57
)
&&
(
<>
<>
<
div
className=
'mt-4 mb-2 text-sm font-medium text-gray-700'
>
<
div
className=
'mt-4 mb-2 text-sm font-medium text-gray-700'
>
{
t
(
'字段透传控制'
)
}
{
t
(
'字段透传控制'
)
}
...
...
web/default/src/features/channels/components/drawers/channel-mutate-drawer.tsx
View file @
4ae34175
...
@@ -932,7 +932,7 @@ export function ChannelMutateDrawer({
...
@@ -932,7 +932,7 @@ export function ChannelMutateDrawer({
currentSystemPromptOverride
currentSystemPromptOverride
)
)
let
fieldPassthroughConfigured
=
false
let
fieldPassthroughConfigured
=
false
if
(
currentType
===
1
)
{
if
(
currentType
===
1
||
currentType
===
57
)
{
fieldPassthroughConfigured
=
Boolean
(
fieldPassthroughConfigured
=
Boolean
(
currentAllowServiceTier
||
currentAllowServiceTier
||
currentDisableStore
||
currentDisableStore
||
...
@@ -983,7 +983,7 @@ export function ChannelMutateDrawer({
...
@@ -983,7 +983,7 @@ export function ChannelMutateDrawer({
configured
:
extraSettingsConfigured
,
configured
:
extraSettingsConfigured
,
},
},
]
]
if
(
currentType
===
1
||
currentType
===
14
)
{
if
(
currentType
===
1
||
currentType
===
14
||
currentType
===
57
)
{
advancedNavChildren
.
push
({
advancedNavChildren
.
push
({
id
:
ADVANCED_SETTINGS_SECTION_IDS
.
fieldPassthrough
,
id
:
ADVANCED_SETTINGS_SECTION_IDS
.
fieldPassthrough
,
title
:
t
(
'Field passthrough controls'
),
title
:
t
(
'Field passthrough controls'
),
...
@@ -4106,7 +4106,9 @@ export function ChannelMutateDrawer({
...
@@ -4106,7 +4106,9 @@ export function ChannelMutateDrawer({
</
fieldset
>
</
fieldset
>
</
div
>
</
div
>
{
(
currentType
===
1
||
currentType
===
14
)
&&
(
{
(
currentType
===
1
||
currentType
===
14
||
currentType
===
57
)
&&
(
<
div
<
div
id=
{
ADVANCED_SETTINGS_SECTION_IDS
.
fieldPassthrough
}
id=
{
ADVANCED_SETTINGS_SECTION_IDS
.
fieldPassthrough
}
className=
{
sideDrawerSectionClassName
(
className=
{
sideDrawerSectionClassName
(
...
@@ -4150,7 +4152,7 @@ export function ChannelMutateDrawer({
...
@@ -4150,7 +4152,7 @@ export function ChannelMutateDrawer({
)
}
)
}
/>
/>
{
currentType
===
1
&&
(
{
(
currentType
===
1
||
currentType
===
57
)
&&
(
<>
<>
<
FormField
<
FormField
control=
{
form
.
control
}
control=
{
form
.
control
}
...
...
web/default/src/features/channels/lib/channel-form.ts
View file @
4ae34175
...
@@ -549,13 +549,13 @@ function buildSettingsJSON(formData: ChannelFormValues): string {
...
@@ -549,13 +549,13 @@ function buildSettingsJSON(formData: ChannelFormValues): string {
// Field passthrough controls:
// Field passthrough controls:
// - OpenAI (type 1) and Anthropic (type 14): allow_service_tier
// - OpenAI (type 1) and Anthropic (type 14): allow_service_tier
// - OpenAI only: disable_store, allow_safety_identifier
// - OpenAI only: disable_store, allow_safety_identifier
if
(
formData
.
type
===
1
||
formData
.
type
===
14
)
{
if
(
formData
.
type
===
1
||
formData
.
type
===
14
||
formData
.
type
===
57
)
{
settingsObj
.
allow_service_tier
=
formData
.
allow_service_tier
===
true
settingsObj
.
allow_service_tier
=
formData
.
allow_service_tier
===
true
}
else
if
(
'allow_service_tier'
in
settingsObj
)
{
}
else
if
(
'allow_service_tier'
in
settingsObj
)
{
delete
settingsObj
.
allow_service_tier
delete
settingsObj
.
allow_service_tier
}
}
if
(
formData
.
type
===
1
)
{
if
(
formData
.
type
===
1
||
formData
.
type
===
57
)
{
settingsObj
.
disable_store
=
formData
.
disable_store
===
true
settingsObj
.
disable_store
=
formData
.
disable_store
===
true
settingsObj
.
allow_safety_identifier
=
settingsObj
.
allow_safety_identifier
=
formData
.
allow_safety_identifier
===
true
formData
.
allow_safety_identifier
===
true
...
...
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