Commit c73480c
committed
fix(proxy): block every unpriced model a request names
A request can name more than one model, through a comma-separated model or target_model_names on
the batch and fine-tuning routes, and the gate only looked at the string case, so an unpriced model
riding alongside a priced one went through and billed. Check every candidate and name the unpriced
ones in the 403
Aliases had the same problem on the other side: a group that prices itself through its model_info
block lands in the cost map under its deployment id, and the explicit-cost check walked the raw
model list by group name, so an alias pointing at that group read as unpriced. Resolve the group
through the router the way the pricing check already does
Also correct the 403 copy. Providers that return their own usage cost still bill for these models,
so the accurate claim is that litellm has no pricing of its own for them1 parent df00c33 commit c73480c
2 files changed
Lines changed: 98 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
516 | 534 | | |
517 | 535 | | |
518 | 536 | | |
| |||
523 | 541 | | |
524 | 542 | | |
525 | 543 | | |
526 | | - | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
527 | 562 | | |
528 | 563 | | |
529 | 564 | | |
| |||
796 | 831 | | |
797 | 832 | | |
798 | 833 | | |
799 | | - | |
800 | | - | |
801 | | - | |
802 | | - | |
803 | | - | |
804 | | - | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
805 | 840 | | |
806 | | - | |
807 | | - | |
808 | | - | |
809 | | - | |
810 | | - | |
| 841 | + | |
811 | 842 | | |
812 | 843 | | |
813 | 844 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6784 | 6784 | | |
6785 | 6785 | | |
6786 | 6786 | | |
| 6787 | + | |
| 6788 | + | |
| 6789 | + | |
| 6790 | + | |
| 6791 | + | |
| 6792 | + | |
| 6793 | + | |
| 6794 | + | |
| 6795 | + | |
| 6796 | + | |
| 6797 | + | |
| 6798 | + | |
| 6799 | + | |
| 6800 | + | |
| 6801 | + | |
| 6802 | + | |
| 6803 | + | |
| 6804 | + | |
| 6805 | + | |
| 6806 | + | |
| 6807 | + | |
| 6808 | + | |
| 6809 | + | |
| 6810 | + | |
| 6811 | + | |
| 6812 | + | |
| 6813 | + | |
| 6814 | + | |
| 6815 | + | |
| 6816 | + | |
| 6817 | + | |
| 6818 | + | |
| 6819 | + | |
| 6820 | + | |
| 6821 | + | |
| 6822 | + | |
| 6823 | + | |
| 6824 | + | |
| 6825 | + | |
| 6826 | + | |
| 6827 | + | |
| 6828 | + | |
| 6829 | + | |
| 6830 | + | |
| 6831 | + | |
| 6832 | + | |
| 6833 | + | |
| 6834 | + | |
| 6835 | + | |
| 6836 | + | |
| 6837 | + | |
| 6838 | + | |
| 6839 | + | |
| 6840 | + | |
| 6841 | + | |
0 commit comments