| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| adaptor.go | ||
| constants.go | ||
| dto.go | ||
| image.go | ||
| image_wan.go | ||
| rerank.go | ||
| text.go |
The previous commit commented out AddOtherRatio("n") in the Ali
adaptor to fix double-counting but this could cause billing evasion
when n is specified via extra["parameters"] instead of request.N.
Root cause: ImagePriceRatio in GetTokenCountMeta() already included
n, AND channel adaptors added OtherRatio("n"), resulting in n²
billing.
Proper fix:
- Remove n from ImagePriceRatio (keep sizeRatio * qualityRatio only)
- In ImageHelper, add default OtherRatio("n") when adaptor hasn't
set one; set fallback tokens to 1 (base unit)
- Restore Ali adaptor's AddOtherRatio("n") — it uses actual upstream
parameters/response count, preventing billing evasion
| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| adaptor.go | Loading commit data... | |
| constants.go | Loading commit data... | |
| dto.go | Loading commit data... | |
| image.go | Loading commit data... | |
| image_wan.go | Loading commit data... | |
| rerank.go | Loading commit data... | |
| text.go | Loading commit data... |