fix: always serialize ratio/price values for all models to ensure fallback during sync delays
Some checks failed
Publish Docker image (Multi Registries, native amd64+arm64) / Build & push (amd64) [native] (push) Has been cancelled
Publish Docker image (Multi Registries, native amd64+arm64) / Build & push (arm64) [native] (push) Has been cancelled
Publish Docker image (Multi Registries, native amd64+arm64) / Create multi-arch manifests (Docker Hub) (push) Has been cancelled
Build Electron App / build (windows-latest) (push) Has been cancelled
Build Electron App / release (push) Has been cancelled
Release (Linux, macOS, Windows) / Linux Release (push) Has been cancelled
Release (Linux, macOS, Windows) / macOS Release (push) Has been cancelled
Release (Linux, macOS, Windows) / Windows Release (push) Has been cancelled
Some checks failed
Publish Docker image (Multi Registries, native amd64+arm64) / Build & push (amd64) [native] (push) Has been cancelled
Publish Docker image (Multi Registries, native amd64+arm64) / Build & push (arm64) [native] (push) Has been cancelled
Publish Docker image (Multi Registries, native amd64+arm64) / Create multi-arch manifests (Docker Hub) (push) Has been cancelled
Build Electron App / build (windows-latest) (push) Has been cancelled
Build Electron App / release (push) Has been cancelled
Release (Linux, macOS, Windows) / Linux Release (push) Has been cancelled
Release (Linux, macOS, Windows) / macOS Release (push) Has been cancelled
Release (Linux, macOS, Windows) / Windows Release (push) Has been cancelled
This commit is contained in:
parent
4e93148d9e
commit
bee339d279
@ -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;
|
|
||||||
}
|
|
||||||
|
|
||||||
const serialized = serializeModel(model, t);
|
// Always serialize ratio/price values for all models (including
|
||||||
Object.entries(serialized).forEach(([key, value]) => {
|
// tiered_expr) so they serve as fallback during multi-instance sync
|
||||||
if (value !== null) {
|
// delay. ModelPriceHelper checks billing_mode first, so these values
|
||||||
output[key][model.name] = value;
|
// are only used when billing_setting hasn't propagated yet.
|
||||||
|
try {
|
||||||
|
const serialized = serializeModel(model, t);
|
||||||
|
Object.entries(serialized).forEach(([key, value]) => {
|
||||||
|
if (value !== null) {
|
||||||
|
output[key][model.name] = value;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} catch (e) {
|
||||||
|
if (model.billingMode !== 'tiered_expr') {
|
||||||
|
throw e;
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const requestQueue = [
|
const requestQueue = [
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user