feat: sync deployed v1.0.0-rc.38-custom.42
Publish Docker image (Multi-arch) / Build & push (amd64) (push) Failing after 1m40s
Release (Linux, macOS, Windows) / Linux Release (push) Failing after 42m16s
Publish Docker image (Multi-arch) / Build & push (arm64) (push) Canceled after 0s
Release (Linux, macOS, Windows) / macOS Release (push) Canceled after 0s
Release (Linux, macOS, Windows) / Windows Release (push) Canceled after 0s
Publish Docker image (Multi-arch) / Create multi-arch manifests (push) Canceled after 0s
Publish Docker image (Multi-arch) / Build & push (amd64) (push) Failing after 1m40s
Release (Linux, macOS, Windows) / Linux Release (push) Failing after 42m16s
Publish Docker image (Multi-arch) / Build & push (arm64) (push) Canceled after 0s
Release (Linux, macOS, Windows) / macOS Release (push) Canceled after 0s
Release (Linux, macOS, Windows) / Windows Release (push) Canceled after 0s
Publish Docker image (Multi-arch) / Create multi-arch manifests (push) Canceled after 0s
Sync production source including routing, billing, Astra detection and public uptime. Update custom build instructions and license packaging.
This commit is contained in:
1 parent
c2b44332d6
commit
a5f7b8e586
828 files changed
+122253
-13702
No files matched your search
@@ -18,6 +18,44 @@ func GetModelPricingConfig(c *gin.Context) {
|
||||
common.ApiSuccess(c, snapshot)
|
||||
}
|
||||
|
||||
func PreviewModelPricingConversion(c *gin.Context) {
|
||||
var request struct {
|
||||
ModelName string `json:"model_name"`
|
||||
Pricing model.PricingValues `json:"pricing"`
|
||||
}
|
||||
if err := common.DecodeJson(c.Request.Body, &request); err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"success": false, "message": err.Error()})
|
||||
return
|
||||
}
|
||||
preview, err := model.PreviewModelPricingConversion(request.ModelName, request.Pricing)
|
||||
if err != nil {
|
||||
common.ApiError(c, err)
|
||||
return
|
||||
}
|
||||
common.ApiSuccess(c, preview)
|
||||
}
|
||||
|
||||
func PreviewModelPricing(c *gin.Context) {
|
||||
var request struct {
|
||||
ModelName string `json:"model_name"`
|
||||
Pricing model.PricingValues `json:"pricing"`
|
||||
}
|
||||
if err := common.DecodeJson(c.Request.Body, &request); err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"success": false, "message": err.Error()})
|
||||
return
|
||||
}
|
||||
preview, err := model.PreviewModelPricing(request.ModelName, request.Pricing)
|
||||
if err != nil {
|
||||
common.ApiError(c, err)
|
||||
return
|
||||
}
|
||||
common.ApiSuccess(c, model.ModelPricingDescription{
|
||||
Effective: preview,
|
||||
CacheWriteMode: model.ResolveCacheWriteMode(request.ModelName, request.Pricing),
|
||||
BillingDetails: model.ResolveLegacyBillingDetails(request.ModelName, preview, request.Pricing),
|
||||
})
|
||||
}
|
||||
|
||||
func UpdateModelPricingConfig(c *gin.Context) {
|
||||
var request struct {
|
||||
Changes []model.ModelPricingChange `json:"changes"`
|
||||
|
||||
Reference in new issue
Block a user