Skip to content

Commit 9a27bc4

Browse files
committed
feat(internal): add Gemini 128k threshold fields to pricing schema
Added schema fields for Gemini models' tiered pricing at 128k token threshold to support future implementation. These fields are documented as NOT yet implemented in calculation logic to prevent confusion. Fields added: - input_cost_per_token_above_128k_tokens - output_cost_per_token_above_128k_tokens This prepares the schema for potential Gemini model support while clearly indicating that calculation logic updates would be required. The current calculateTieredCost function only handles 200k thresholds (Claude models). Adding these fields now ensures schema completeness for LiteLLM compatibility while the warning comments added in previous commit make it clear what implementation work would be needed to support Gemini pricing calculations.
1 parent 4f084ff commit 9a27bc4

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎packages/internal/src/pricing.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ export const liteLLMModelPricingSchema = v.object({
4141
output_cost_per_token_above_200k_tokens: v.optional(v.number()),
4242
cache_creation_input_token_cost_above_200k_tokens: v.optional(v.number()),
4343
cache_read_input_token_cost_above_200k_tokens: v.optional(v.number()),
44+
// Gemini: Tiered pricing (128k threshold) - NOT implemented in calculations
45+
input_cost_per_token_above_128k_tokens: v.optional(v.number()),
46+
output_cost_per_token_above_128k_tokens: v.optional(v.number()),
4447
});
4548

4649
export type LiteLLMModelPricing = v.InferOutput<typeof liteLLMModelPricingSchema>;

0 commit comments

Comments
 (0)