fix openai image request handling
This commit is contained in:
@@ -128,6 +128,21 @@ func TestGetModelPricing_Gpt54NanoUsesDedicatedStaticFallbackWhenRemoteMissing(t
|
||||
require.Zero(t, got.LongContextInputTokenThreshold)
|
||||
}
|
||||
|
||||
func TestGetModelPricing_ImageModelDoesNotFallbackToTextModel(t *testing.T) {
|
||||
imagePricing := &LiteLLMModelPricing{InputCostPerToken: 3}
|
||||
textPricing := &LiteLLMModelPricing{InputCostPerToken: 9}
|
||||
|
||||
svc := &PricingService{
|
||||
pricingData: map[string]*LiteLLMModelPricing{
|
||||
"gpt-image-2": imagePricing,
|
||||
"gpt-5.4": textPricing,
|
||||
},
|
||||
}
|
||||
|
||||
got := svc.GetModelPricing("gpt-image-3")
|
||||
require.Same(t, imagePricing, got)
|
||||
}
|
||||
|
||||
func TestParsePricingData_PreservesPriorityAndServiceTierFields(t *testing.T) {
|
||||
raw := map[string]any{
|
||||
"gpt-5.4": map[string]any{
|
||||
|
||||
Reference in New Issue
Block a user