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
bee339d2
authored
Apr 27, 2026
by
CaIon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: always serialize ratio/price values for all models to ensure fallback during sync delays
parent
4e93148d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
web/src/pages/Setting/Ratio/hooks/useModelPricingEditorState.js
+10
-3
No files found.
web/src/pages/Setting/Ratio/hooks/useModelPricingEditorState.js
View file @
bee339d2
...
@@ -1050,16 +1050,23 @@ export function useModelPricingEditorState({
...
@@ -1050,16 +1050,23 @@ export function useModelPricingEditorState({
tieredOutput
[
'billing_setting.billing_expr'
][
model
.
name
]
=
finalBillingExpr
;
tieredOutput
[
'billing_setting.billing_expr'
][
model
.
name
]
=
finalBillingExpr
;
}
}
}
}
if
(
model
.
billingMode
===
'tiered_expr'
)
{
continue
;
}
// Always serialize ratio/price values for all models (including
// tiered_expr) so they serve as fallback during multi-instance sync
// delay. ModelPriceHelper checks billing_mode first, so these values
// are only used when billing_setting hasn't propagated yet.
try
{
const
serialized
=
serializeModel
(
model
,
t
);
const
serialized
=
serializeModel
(
model
,
t
);
Object
.
entries
(
serialized
).
forEach
(([
key
,
value
])
=>
{
Object
.
entries
(
serialized
).
forEach
(([
key
,
value
])
=>
{
if
(
value
!==
null
)
{
if
(
value
!==
null
)
{
output
[
key
][
model
.
name
]
=
value
;
output
[
key
][
model
.
name
]
=
value
;
}
}
});
});
}
catch
(
e
)
{
if
(
model
.
billingMode
!==
'tiered_expr'
)
{
throw
e
;
}
}
}
}
const
requestQueue
=
[
const
requestQueue
=
[
...
...
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