helicone icon indicating copy to clipboard operation
helicone copied to clipboard

chore: disable PTB on Azure models except gpt-5 and gpt-5-mini

Open connortbot opened this issue 3 months ago • 3 comments

connortbot avatar Nov 25 '25 01:11 connortbot

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
helicone Ready Ready Preview Comment Nov 25, 2025 2:03am
helicone-eu Ready Ready Preview Comment Nov 25, 2025 2:03am
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
helicone-bifrost Skipped Skipped Nov 25, 2025 2:03am

vercel[bot] avatar Nov 25 '25 01:11 vercel[bot]

Claude Code is working…

I'll analyze this and get back to you.

View job run

claude[bot] avatar Nov 25 '25 01:11 claude[bot]

Greptile Overview

Greptile Summary

Disabled pass-through billing (PTB) for Azure-hosted OpenAI models except gpt-5:azure and gpt-5-mini:azure. The changes affect 8 model endpoints across 4 files:

  • gpt-4.1 models: gpt-4.1:azure, gpt-4.1-mini:azure, gpt-4.1-mini-2025-04-14:azure, gpt-4.1-nano:azure
  • gpt-4o models: gpt-4o:azure, gpt-4o-mini:azure
  • o3 models: o3-mini:azure
  • o4 models: o4-mini:azure

All changes are straightforward boolean flips from ptbEnabled: true to ptbEnabled: false. OpenAI and OpenRouter provider endpoints remain unaffected. The PR correctly preserves PTB for gpt-5:azure and gpt-5-mini:azure as specified.

Confidence Score: 5/5

  • Safe to merge - simple configuration changes with no logical issues
  • The PR makes straightforward boolean configuration changes to disable PTB on Azure endpoints. All changes are consistent, isolated to configuration files, and correctly preserve PTB for gpt-5 and gpt-5-mini Azure models as intended. No logic changes or potential side effects.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
packages/cost/models/authors/openai/gpt-4.1/endpoints.ts 5/5 Disabled PTB for 4 Azure gpt-4.1 model variants (gpt-4.1, gpt-4.1-mini, gpt-4.1-mini-2025-04-14, gpt-4.1-nano)
packages/cost/models/authors/openai/gpt-4o/endpoints.ts 5/5 Disabled PTB for 2 Azure gpt-4o model variants (gpt-4o, gpt-4o-mini)
packages/cost/models/authors/openai/o3/endpoints.ts 5/5 Disabled PTB for Azure o3-mini model
packages/cost/models/authors/openai/o4/endpoints.ts 5/5 Disabled PTB for Azure o4-mini model

Sequence Diagram

sequenceDiagram
    participant Client
    participant ModelRegistry
    participant EndpointConfig
    participant BillingSystem
    
    Client->>ModelRegistry: Request model info (e.g., gpt-4o:azure)
    ModelRegistry->>EndpointConfig: Fetch endpoint configuration
    EndpointConfig-->>ModelRegistry: Return config with ptbEnabled: false
    
    alt ptbEnabled = true
        ModelRegistry->>BillingSystem: Enable pass-through billing
        BillingSystem-->>Client: Direct billing to customer
    else ptbEnabled = false (NEW for Azure)
        ModelRegistry->>BillingSystem: Disable pass-through billing
        BillingSystem-->>Client: Standard billing flow
    end
    
    Note over EndpointConfig,BillingSystem: Exception: gpt-5:azure and gpt-5-mini:azure<br/>remain with ptbEnabled: true

greptile-apps[bot] avatar Nov 25 '25 01:11 greptile-apps[bot]