Skip to content

fix(callbacks): add gpt-5.2 pricing to OpenAICallbackHandler#556

Open
DoTA (dotuananh0712) wants to merge 2 commits intolangchain-ai:mainfrom
dotuananh0712:fix/gpt-5.2-pricing
Open

fix(callbacks): add gpt-5.2 pricing to OpenAICallbackHandler#556
DoTA (dotuananh0712) wants to merge 2 commits intolangchain-ai:mainfrom
dotuananh0712:fix/gpt-5.2-pricing

Conversation

@dotuananh0712
Copy link

Summary

  • Add model pricing for gpt-5.2 to fix total_cost returning 0.0 for gpt-5.2 models

Changes

  • Added pricing entries for gpt-5.2, gpt-5.2-2025-12-11 and their cached/completion variants
  • Pricing: Input /bin/zsh.00175/1K, cached /bin/zsh.000175/1K, output /bin/zsh.014/1K

Fixes #503

…s, fix CSV encoding

- Security: Add __repr__ method to ChatOpenAI that masks API keys with ***
- Feature: Add async (_arun) methods to 7 file management tools
- Fix: Pass encoding to partition_csv in UnstructuredCSVLoader (issue langchain-ai#505)
Add model pricing for gpt-5.2 to fix total_cost returning 0.0
for gpt-5.2 models.

Pricing (per 1K tokens):
- Input: /bin/zsh.00175 (cached: /bin/zsh.000175)
- Output: /bin/zsh.014
@github-actions github-actions bot added the fix label Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenAICallbackHandler returns total_cost=0.0 for gpt-5.2

1 participant