Skip to content

litellm_fix(tests): fix mapped tests - Azure AI cost calculator and Bedrock#20130

Closed
shin-bot-litellm wants to merge 1 commit intoBerriAI:mainfrom
shin-bot-litellm:litellm_fix_mapped_tests
Closed

litellm_fix(tests): fix mapped tests - Azure AI cost calculator and Bedrock#20130
shin-bot-litellm wants to merge 1 commit intoBerriAI:mainfrom
shin-bot-litellm:litellm_fix_mapped_tests

Conversation

@shin-bot-litellm
Copy link
Contributor

@shin-bot-litellm shin-bot-litellm commented Jan 31, 2026

Summary

Fixes failing mapped tests.


⚠️ Regression Analysis

1. Azure AI Cost Calculator Test

Test: test_additional_costs_in_cost_breakdown
Status: New test with bug (not a regression)
Introduced in: PR #20091 (5345a76) - "[Feat] v2 - Logs view with side panel"
Issue: Test imports non-existent LitellmLoggingObject class
Fix: Use Logging class with required parameters

2. Bedrock Tool Search Header Test

Test: test_advanced_tool_use_header_filtered_for_non_opus_4_5
Status: REGRESSION
Breaking commit: 7d5439a - PR #19871 "fix(bedrock): support tool search header translation for Sonnet 4.5"
Date: 2026-01-27
Why it broke: Test assumed only Opus 4.5 supports tool-search on Bedrock. PR #19871 added Sonnet 4.5 support, invalidating the test assumption.
Risk: ⚠️ LLM translation test - higher risk area
Fix: Change test model from Sonnet 4.5 to Claude 3.5 Sonnet (which genuinely does NOT support tool-search)


Changes

Azure AI Cost Calculator Test

  • Use Logging class instead of non-existent LitellmLoggingObject
  • Added required parameters for Logging instantiation

Bedrock Test

  • Changed test model from anthropic.claude-sonnet-4-5-20250929-v1:0 to anthropic.claude-3-5-sonnet-20241022-v2:0
  • Updated docstring to clarify which models support tool-search

Testing

  • Mapped tests should pass

…edrock

- Fix Azure AI cost calculator test: use Logging class instead of non-existent LitellmLoggingObject
- Fix Bedrock test: use Claude 3.5 Sonnet instead of Sonnet 4.5 (which now supports tool search)
@vercel
Copy link

vercel bot commented Jan 31, 2026

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

Project Deployment Actions Updated (UTC)
litellm Error Error Jan 31, 2026 8:26am

Request Review

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@shin-bot-litellm
Copy link
Contributor Author

Split into separate PRs:

  1. Non-regression (new test bug): litellm_fix(test): fix Azure AI cost calculator test - use Logging class #20134 - Azure AI cost calculator test
  2. Regression: litellm_fix(test): fix Bedrock tool search header test regression #20135 - Bedrock tool search header test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants