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.
17 lines
1.1 KiB
Go
17 lines
1.1 KiB
Go
package billing_setting
|
|
|
|
// Built-in token prices use actual USD per million tokens. Keep new model
|
|
// defaults here instead of splitting them across the legacy ratio tables.
|
|
var builtinBillingExpr = map[string]string{
|
|
// https://developers.openai.com/api/docs/pricing (Standard, 2026-09-09).
|
|
// The Images API reports image output in output_tokens, normalized to c.
|
|
"gpt-image-2": `tier("standard", p * 5 + cr * 1.25 + img * 8 + img_cr * 2 + c * 30)`,
|
|
"gpt-image-2.5-sunburst": `tier("standard", p * 5 + cr * 1.25 + img * 8 + img_cr * 2 + c * 30)`,
|
|
"gpt-image-2.5-flare": `tier("standard", p * 5 + cr * 1.25 + img * 8 + img_cr * 2 + c * 30)`,
|
|
// https://developers.openai.com/api/docs/models/gpt-6-astra
|
|
// Standard pricing; the long-context rates apply to the whole request.
|
|
// Do not infer service-tier discounts from incoming request parameters:
|
|
// channels filter service_tier by default, so it may not reach the upstream.
|
|
"gpt-6-astra": `len <= 272000 ? tier("standard", p * 10 + c * 50 + cr * 1 + cc * 12.5) : tier("long_context", p * 20 + c * 75 + cr * 2 + cc * 25)`,
|
|
}
|